(
simple_mode: bool = False,
include_mcp: bool = True,
permission_context: ToolPermissionContext | None = None,
)
| 60 | |
| 61 | |
| 62 | def 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 | |
| 75 | def find_tools(query: str, limit: int = 20) -> list[PortingModule]: |
no test coverage detected