tools

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 22 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentTool

type EnvironmentTool struct {
	// contains filtered or unexported fields
}

EnvironmentTool handles environment-related MCP operations

func NewEnvironmentTool

func NewEnvironmentTool(client client.Client, name string) *EnvironmentTool

NewEnvironmentTool creates a new environment tool

func (*EnvironmentTool) Definition

func (t *EnvironmentTool) Definition() ToolDefinition

Definition returns the tool definition for MCP

func (*EnvironmentTool) Execute

func (t *EnvironmentTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the tool with given parameters

type ExtendedTool added in v1.9.0

type ExtendedTool struct {
	// contains filtered or unexported fields
}

ExtendedTool handles additional typed environment/API MCP operations.

func NewExtendedTool added in v1.9.0

func NewExtendedTool(client client.Client, name string) *ExtendedTool

NewExtendedTool creates a typed MCP tool for the given name.

func (*ExtendedTool) Definition added in v1.9.0

func (t *ExtendedTool) Definition() ToolDefinition

Definition returns the MCP tool definition.

func (*ExtendedTool) Execute added in v1.9.0

func (t *ExtendedTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the named tool.

type LogsTool

type LogsTool struct {
	// contains filtered or unexported fields
}

LogsTool handles log-related MCP operations

func NewLogsTool

func NewLogsTool(client client.Client, name string) *LogsTool

NewLogsTool creates a new logs tool

func (*LogsTool) Definition

func (t *LogsTool) Definition() ToolDefinition

Definition returns the tool definition for MCP

func (*LogsTool) Execute

func (t *LogsTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the tool with given parameters

type OrgTool

type OrgTool struct {
	// contains filtered or unexported fields
}

OrgTool handles organization-related MCP operations

func NewOrgTool

func NewOrgTool(client client.Client, name string) *OrgTool

NewOrgTool creates a new organization tool

func (*OrgTool) Definition

func (t *OrgTool) Definition() ToolDefinition

Definition returns the tool definition for MCP

func (*OrgTool) Execute

func (t *OrgTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the tool with given parameters

type ServiceTool

type ServiceTool struct {
	// contains filtered or unexported fields
}

ServiceTool handles service-related MCP operations

func NewServiceTool

func NewServiceTool(client client.Client, name string) *ServiceTool

NewServiceTool creates a new service tool. Exec stays disabled: use NewServiceToolWithExec for the exec tool itself.

func NewServiceToolWithExec added in v1.9.0

func NewServiceToolWithExec(apiClient client.Client, name string, allowExec bool) *ServiceTool

NewServiceToolWithExec creates a service tool, saying whether running commands in a customer's containers is permitted. Off unless the operator turned it on: every other tool here reads or restarts something Shipyard owns, while this one runs arbitrary code inside a running container.

func (*ServiceTool) Definition

func (t *ServiceTool) Definition() ToolDefinition

Definition returns the tool definition for MCP

func (*ServiceTool) Execute

func (t *ServiceTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the tool with given parameters

type TelepresenceTool

type TelepresenceTool struct {
	// contains filtered or unexported fields
}

TelepresenceTool handles telepresence operations

func NewTelepresenceTool

func NewTelepresenceTool(client client.Client, name string) *TelepresenceTool

NewTelepresenceTool creates a new telepresence tool

func (*TelepresenceTool) Definition

func (t *TelepresenceTool) Definition() ToolDefinition

Definition returns the tool definition for MCP

func (*TelepresenceTool) Execute

func (t *TelepresenceTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the tool with given parameters

type Tool

type Tool interface {
	Definition() ToolDefinition
	Execute(ctx context.Context, params json.RawMessage) (string, error)
}

Tool interface for MCP tools

type ToolAnnotations added in v1.10.0

type ToolAnnotations struct {
	Title           string `json:"title"`
	ReadOnlyHint    bool   `json:"readOnlyHint"`
	DestructiveHint bool   `json:"destructiveHint"`
	IdempotentHint  bool   `json:"idempotentHint"`
	OpenWorldHint   bool   `json:"openWorldHint"`
}

ToolAnnotations are the MCP behavior hints clients use to decide whether a tool call needs approval. Every hint is serialized even when false: the spec defaults an absent destructiveHint to true and openWorldHint to true, and some directories require all hints to be explicit.

type ToolDefinition

type ToolDefinition struct {
	Name        string           `json:"name"`
	Title       string           `json:"title,omitempty"`
	Description string           `json:"description"`
	InputSchema interface{}      `json:"inputSchema"`
	Annotations *ToolAnnotations `json:"annotations,omitempty"`
}

ToolDefinition describes an MCP tool

func Annotate added in v1.10.0

func Annotate(def ToolDefinition) ToolDefinition

Annotate returns def with its title and behavior hints attached. A tool with no entry is returned unchanged, so the server test that checks every registered tool catches it.

type VolumeTool

type VolumeTool struct {
	// contains filtered or unexported fields
}

VolumeTool handles volume-related MCP operations

func NewVolumeTool

func NewVolumeTool(client client.Client, name string) *VolumeTool

NewVolumeTool creates a new volume tool

func (*VolumeTool) Definition

func (t *VolumeTool) Definition() ToolDefinition

Definition returns the tool definition for MCP

func (*VolumeTool) Execute

func (t *VolumeTool) Execute(ctx context.Context, params json.RawMessage) (string, error)

Execute runs the tool with given parameters

Jump to

Keyboard shortcuts

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