Local tool API¶
seqoria_agent.toolbox.local_public.LocalToolbox
¶
In-process tool registry and executor.
Provides tool registration and execution without requiring an HTTP server. Tools can have server-populated parameters and dependencies, similar to remote MCP servers.
Example
toolbox = LocalToolbox()
@toolbox.tool() def add(a: int, b: int) -> int: ... return a + b
result = await toolbox.call_tool("add", {"a": 1, "b": 2})
call_tool(name: str, arguments: dict[str, Any] | None = None, *, server_args: dict[str, Any] | None = None) -> List[SimpleNamespace]
async
¶
Execute a tool by name.
get_tool_info(name: str) -> ToolInfo | None
¶
Get metadata for a specific tool.
list_tools() -> List[SimpleNamespace]
¶
List all registered tools with their metadata.
tool(name: str | None = None, *, description: str | None = None, server_populated: Sequence[str] | None = None, depends_on: Sequence[str] | None = None) -> Callable[[Callable[..., Any]], Callable[..., Any]]
¶
Register a tool with the toolbox.
Example
@toolbox.tool(server_populated=["user_id"]) async def my_tool(name: str, user_id: str) -> str: ... return f"Hello {name} (user: {user_id})"