get_called_tools
Retrieve a list of Python functions executed on the Simple HTTP MCP Server via its JSON-RPC interface to monitor activity and manage tool usage.
Instructions
Get the list of called tools.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tests/app/tools.py:88-93 (handler)The async handler function that executes the get_called_tools tool logic, retrieving called tools from context.async def get_called_tools( args: Arguments[GetCalledToolsInput], ) -> GetCalledToolsOutput: """Get the list of called tools.""" context = args.get_state_key("context", Context) return GetCalledToolsOutput(called_tools=context.get_called_tools())
- tests/app/tools.py:80-86 (schema)Pydantic models defining input (empty) and output schema for get_called_tools tool.class GetCalledToolsInput(BaseModel): pass class GetCalledToolsOutput(BaseModel): called_tools: list[str] = Field(description="The list of called tools")
- tests/app/tools.py:112-116 (registration)Registration of the get_called_tools tool in the TOOLS tuple.Tool( func=get_called_tools, inputs=GetCalledToolsInput, output=GetCalledToolsOutput, ),
- tests/app/context.py:8-9 (helper)Helper method on Context class that returns the list of called tools.def get_called_tools(self) -> list[str]: return self.called_tools