apptool

package
v1.153.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package apptool is the manage_application MCP tool (#2411, #2412): an application's record, parts, releases, rollbacks, and its export and import between deployments, over the one service the portal routes use.

Index

Constants

View Source
const (
	CmdCreate     = "create"
	CmdGet        = "get"
	CmdList       = "list"
	CmdUpdate     = "update"
	CmdDelete     = "delete"
	CmdAddPart    = "add_part"
	CmdRemovePart = "remove_part"
	CmdRelease    = "release"
	CmdRollback   = "rollback"
	CmdReleases   = "releases"
	CmdExport     = "export"
	CmdImport     = "import"
)

The commands.

View Source
const ToolName = "manage_application"

ToolName is the tool's name.

Variables

Commands is every command, in the order the schema lists them.

Reads is the commands that change nothing.

Functions

This section is empty.

Types

type Bundles

type Bundles interface {
	Export(ctx context.Context, actor application.Actor, ref string, release int) (any, error)
	Import(ctx context.Context, actor application.Actor, bundle string, mapping map[string]string) (any, error)
}

Bundles exports and imports applications; nil on a deployment that cannot.

type Input

type Input struct {
	Command     string `json:"command"`
	Application string `json:"application,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Connection  string `json:"connection,omitempty"`
	Schema      string `json:"schema,omitempty"`
	OwnerEmail  string `json:"owner_email,omitempty"`
	Kind        string `json:"kind,omitempty"`
	PartID      string `json:"part_id,omitempty"`
	Note        string `json:"note,omitempty"`
	ToRelease   int    `json:"to_release,omitempty"`
	Release     int    `json:"release,omitempty"`
	// Bundle is the managed resource an import reads, by id or URI.
	Bundle string `json:"bundle,omitempty"`
	// Map names, for each connection and secret the bundle names, the one on
	// this deployment it becomes.
	Map map[string]string `json:"map,omitempty"`
}

Input is the tool's arguments.

type Tool

type Tool struct {
	Service *appsvc.Service
	Bundles Bundles
}

Tool is the registered tool.

func (*Tool) Handle

func (t *Tool) Handle(ctx context.Context, in Input) (*mcp.CallToolResult, any, error)

Handle runs one command.

func (*Tool) Register

func (t *Tool) Register(server *mcp.Server)

Register adds manage_application to the server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL