Skip to main content

get_tools

Method
This is a method of the MCP class in the mcp module.
Get the list of tool functions from this MCP instance. This method provides explicit access to the tools list, which is useful when you need to inspect or manipulate the tools programmatically.

Signature

def get_tools() -> List[Callable]

Returns

Returns
List[Callable]
List of tool functions that can be called

Usage

mcp = MCP("npx -y @modelcontextprotocol/server-time")
    tools = mcp.get_tools()
    for tool in tools:
        print(f"Tool: {tool.__name__}")