|
Entropic 2.14.3
Local-first agentic inference engine
|
Tool for executing shell commands. More...


Public Member Functions | |
| ExecuteTool (ToolDefinition def, BashServer &server) | |
| Construct from tool definition with server ref. | |
| ServerResponse | execute (const std::string &args_json) override |
| Execute a shell command. | |
Public Member Functions inherited from entropic::ToolBase | |
| ToolBase (ToolDefinition def) | |
| Construct with a pre-built definition. | |
| const std::string & | name () const |
| Get the tool name. | |
| const ToolDefinition & | definition () const |
| Get the full tool definition. | |
| virtual std::string | anchor_key (const std::string &args_json) const |
| Generate anchor key for this tool result. | |
| virtual MCPAccessLevel | required_access_level () const |
| Minimum access level required to execute this tool. | |
Additional Inherited Members | |
Protected Attributes inherited from entropic::ToolBase | |
| ToolDefinition | definition_ |
| Tool definition. | |
Tool for executing shell commands.
@dg_internal
|
inline |
Construct from tool definition with server ref.
| def | Tool definition loaded from JSON. |
| server | Owning BashServer reference. @dg_internal |
|
overridevirtual |
Execute a shell command.
| args_json | JSON with "command" and optional "working_dir". |
Operator approval is the gate.
Security model: the engine's tool-call approval flow gates whether this method runs at all. There is no command-content allowlist or denylist here; the operator approves a specific command value shown in the prompt, and that's what runs. The only validation we do is on working_dir, because that field is concatenated into a shell cd clause and could smuggle commands the operator never saw.
v2.13.0: the server's timeout is ENFORCED — see run_shell. A command that hits it returns the typed timeout error instead of an exit code.
| args_json | JSON with "command" and optional "working_dir" (defaulting to the server's own working directory). |
timeout error (limit, elapsed, partial output) when the command outlived the limit; or the working_dir rejection error when the cwd failed validation — in which case no shell ran. @req REQ-MCP-023 Implements entropic::ToolBase.