mcptool

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildResponse

func BuildResponse(exitCode int, files *output.Files) *mcp.CallToolResult

func HandleRunCommand

func HandleRunCommand(ctx context.Context, cmd string, cfg HandlerConfig) (*mcp.CallToolResult, any, error)

func Register

func Register(s *mcp.Server, cfg HandlerConfig)

Types

type CommandRunner added in v0.15.0

type CommandRunner = broker.CommandRunner

CommandRunner is the broker's execution interface, re-exported so existing callers keep their import.

type HandlerConfig

type HandlerConfig struct {
	OutputDir     string
	CommandRunner CommandRunner
}

type RunCommandInput

type RunCommandInput struct {
	Command        string `json:"command"`
	TimeoutSeconds *int   `json:"timeout_seconds,omitempty"`
}

type ToolResult

type ToolResult struct {
	ExitCode   int    `json:"exit_code"`
	StdoutPath string `json:"stdout_path,omitempty"`
	StderrPath string `json:"stderr_path,omitempty"`
}

Jump to

Keyboard shortcuts

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