Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Description ¶
Description honestly lists the sandbox environment so the agent knows the available capabilities and limits (FR-016).
Types ¶
type ExecRequest ¶
type ExecRequest struct {
Code string `json:"code" jsonschema:"Python source to execute (required)"`
TimeoutS int `json:"timeout_s,omitempty" jsonschema:"wall-clock timeout in seconds (default 30, clamped to [1,300])"`
Stdin string `json:"stdin,omitempty" jsonschema:"data piped to the program's stdin (max 1 MiB)"`
}
ExecRequest is the public input schema of the exec tool.
type ExecResult ¶
type ExecResult struct {
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
ExitCode int `json:"exit_code"`
DurationMS int64 `json:"duration_ms"`
Truncated bool `json:"truncated"`
TimedOut bool `json:"timed_out"`
}
ExecResult is the public output schema of the exec tool. The field set is a versioned contract (constitution III) and is identical across all transports.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the exec tool. Runs are serialized within the instance (constitution VIII): only one execution proceeds at a time.
func (*Handler) Handle ¶
func (h *Handler) Handle(ctx context.Context, _ *mcp.CallToolRequest, in ExecRequest) (*mcp.CallToolResult, ExecResult, error)
Handle is the MCP tool handler. Invalid input returns an error (tool-call error); a non-zero exit or a timeout is a successful result with the corresponding fields set.
Click to show internal directories.
Click to hide internal directories.