[{'Text': '{"url":"https://openai.github.io/openai-agents-python/ref/mcp/server/","title":"MCP servers - OpenAI Agents SDK","description":"Create a new MCP server based on the stdio transport. ... Create the streams for the server. ... Connect to the server. ... Cleanup the server. ... list_tools( run_context: RunContextWrapper[Any] | None = None, agent: AgentBase | None = None, ) -&gt; list[Tool]","extra_snippets":["See the [spec] (https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#http-with-sse) for details. ... A readable name for the server. __init__( params: MCPServerSseParams, cache_tools_list: bool = False, name: str | None = None, client_session_timeout_seconds: float | None = 5, tool_filter: ToolFilter = None, use_structured_content: bool = False, max_retry_attempts: int = 0, retry_backoff_seconds_base: float = 1.0, message_handler: MessageHandlerFnT | None = None, require_approval: RequireApprovalSetting = None, failure_error_function: ToolErrorFunction | None | _UnsetType = _UNSET, tool_meta_resolver: MCPToolMetaResolver | None = None, )","The text encoding error handler. Defaults to strict. See https://docs.python.org/3/library/codecs.html#codec-base-classes for explanations of possible values. ... MCP server implementation that uses the stdio transport. See the [spec] (https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#stdio) for details. ... A readable name for the server. __init__( params: MCPServerStdioParams, cache_tools_list: bool = False, name: str | None = None, client_session_timeout_seconds: float | None = 5, tool_filter: ToolFilter = None, use_structured_content: bool = False, max_retry_attempts: int = 0, retry_backoff_seconds_base: float = 1.0, message_handler: MessageHandlerFnT | None = None, require_approval: RequireApprovalSetting = None, failure_error_function: ToolErrorFunction | None | _UnsetType = _UNSET, tool_meta_resolver: MCPToolMetaResolver | None = None, )","Create a new MCP server based on the stdio transport. ... Create the streams for the server. ... Connect to the server. ... Cleanup the server. ... list_tools( run_context: RunContextWrapper[Any] | None = None, agent: AgentBase | None = None, ) -> list[Tool]","Create a new MCP server based on the HTTP with SSE transport. ... Create the streams for the server. ... Connect to the server. ... Cleanup the server. ... list_tools( run_context: RunContextWrapper[Any] | None = None, agent: AgentBase | None = None, ) -> list[Tool]"]}'}, {'Text': '{"url":"https://github.com/modelcontextprotocol/python-sdk/issues/1157","title":"How do i list all the tools in my mcp server in a custom route · Issue #1157 · modelcontextprotocol/python-sdk","description":"@mcp.custom_route(&quot;/debug/tools&quot;, methods=[&quot;GET&quot;]) async def list_tools_debug(request: Request): tool_manager = ToolManager() # &lt;-- Wrap FastMCP tool instance tools = tool_manager.list_tools() print(tools) # &lt;-- Official public API result = ListToolsResult(tools=tools) return JSONResponse( JSONRPCResponse( jsonrpc=&quot;2.0&quot;, id=&quot;tools/list&quot;, result=result.model_dump() ).model_dump() )","extra_snippets":["modelcontextprotocol / python-sdk Public · Notifications · You must be signed in to change notification settings · Fork 3.4k · Star 22.8k · New issueCopy link · New issueCopy link · Closed · Closed · How do i list all the tools in my mcp server in a custom route#1157 ·","Question Example: @mcp.custom_route(\\"/debug/tools\\", methods=[\\"GET\\"]) async def list_tools_debug(request: Request): tool_manager = ToolManager() #","@mcp.custom_route(\\"/debug/tools\\", methods=[\\"GET\\"]) async def list_tools_debug(request: Request): tool_manager = ToolManager() # <-- Wrap FastMCP tool instance tools = tool_manager.list_tools() print(tools) # <-- Official public API result = ListToolsResult(tools=tools) return JSONResponse( JSONRPCResponse( jsonrpc=\\"2.0\\", id=\\"tools/list\\", result=result.model_dump() ).model_dump() )"]}'}]