| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | package msi |
| 10 | |
| 11 | import "github.com/modelcontextprotocol/go-sdk/mcp" |
| 12 | |
| 13 | var RunShellCommand = &mcp.Tool{ |
| 14 | Name: "run_shell_command", |
| 15 | Description: `Executes a given shell command.`, |
| 16 | } |
| 17 | |
| 18 | type RunShellCommandParams struct { |
| 19 | Command []string `json:"command" jsonschema:"The exact shell command to execute. Defined as a string slice, unlike Gemini's run_shell_command that defines it as a single string."` |
| 20 | Description string `json:"description,omitempty" jsonschema:"A brief description of the command's purpose, which will be potentially shown to the user."` |
| 21 | Directory string `json:"directory" jsonschema:"The absolute directory in which to execute the command. Unlike Gemini's run_shell_command, this must not be a relative path, and must not be empty."` |
| 22 | } |
| 23 | |
| 24 | type RunShellCommandResult struct { |
| 25 | Stdout string `json:"stdout" jsonschema:"Output from the standard output stream."` |
| 26 | Stderr string `json:"stderr" jsonschema:"Output from the standard error stream."` |
| 27 | Error string `json:"error,omitempty" jsonschema:"Any error message reported by the subprocess."` |
| 28 | ExitCode *int `json:"exit_code,omitempty" jsonschema:"Exit code of the command."` |
| 29 | } |