MCPcopy Create free account
hub / github.com/0xKarl-dev/claw-codes / get_tools

Function get_tools

src/tools.py:62–72  ·  view source on GitHub ↗
(
    simple_mode: bool = False,
    include_mcp: bool = True,
    permission_context: ToolPermissionContext | None = None,
)

Source from the content-addressed store, hash-verified

60
61
62def get_tools(
63 simple_mode: bool = False,
64 include_mcp: bool = True,
65 permission_context: ToolPermissionContext | None = None,
66) -> tuple[PortingModule, ...]:
67 tools = list(PORTED_TOOLS)
68 if simple_mode:
69 tools = [module for module in tools if module.name in {'BashTool', 'FileReadTool', 'FileEditTool'}]
70 if not include_mcp:
71 tools = [module for module in tools if 'mcp' not in module.name.lower() and 'mcp' not in module.source_hint.lower()]
72 return filter_tools_by_permission_context(tuple(tools), permission_context)
73
74
75def find_tools(query: str, limit: int = 20) -> list[PortingModule]:

Callers 3

assemble_tool_poolFunction · 0.85
mainFunction · 0.85

Calls 1

Tested by

no test coverage detected