MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / build_terminal_tool

Function build_terminal_tool

tools/registry.py:30–46  ·  view source on GitHub ↗
(
    shell: InteractiveShell | None = None,
    runtime_config: RuntimeConfig | None = None,
    tools_config: ToolsConfig | None = None,
)

Source from the content-addressed store, hash-verified

28
29
30def build_terminal_tool(
31 shell: InteractiveShell | None = None,
32 runtime_config: RuntimeConfig | None = None,
33 tools_config: ToolsConfig | None = None,
34) -> ToolSpec:
35 shell = shell or InteractiveShell(
36 runtime_config or RuntimeConfig(),
37 scanner_provider=tools_config.scanner.to_command_provider_config() if tools_config else None,
38 )
39 return ToolSpec(
40 name="EXECMD",
41 description=(
42 "Execute a single command in the configured local or remote shell environment. "
43 "The final implementation should preserve the shared terminal adapter behavior."
44 ),
45 handler=shell.execute_command,
46 )
47
48
49def build_html_tool() -> ToolSpec:

Callers 1

build_default_tool_specsFunction · 0.85

Calls 4

RuntimeConfigClass · 0.90
InteractiveShellClass · 0.85
ToolSpecClass · 0.85

Tested by

no test coverage detected