list_available_tools
Discover all current tools available in the MCP server by using this function, helping users identify and access resources efficiently.
Instructions
List all currently available tools
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Handler function that executes the 'list_available_tools' tool. It iterates over self.tools_config to create a formatted list of available tools and returns it as TextContent.elif name == "list_available_tools": tools_list = "\n".join([ f"- {tool['name']}: {tool.get('description', 'No description')}" for tool in self.tools_config ]) return [types.TextContent( type="text", text=f"Available tools:\n{tools_list}" )]
- Tool schema definition including name, description, and inputSchema (empty object, no parameters required). This is part of the static registration in the list_tools handler.types.Tool( name="list_available_tools", description="List all currently available tools", inputSchema={ "type": "object", "properties": {}, "required": [] } ),
- src/mcp_tool_builder/tool_builder_server.py:37-86 (registration)The list_tools MCP handler where 'list_available_tools' is statically registered alongside dynamic tools from tools_config. This makes the tool discoverable by MCP clients.@self.server.list_tools() async def handle_list_tools() -> List[types.Tool]: """List all available tools including tool management tools.""" tools = [ types.Tool( name="create_tool", description="Create a new Python tool with specified functionality", inputSchema={ "type": "object", "properties": { "tool_name": { "type": "string", "description": "Name of the new tool" }, "description": { "type": "string", "description": "Description of what the tool should do" }, "code": { "type": "string", "description": "Python code implementing the tool" } }, "required": ["tool_name", "description", "code"] } ), types.Tool( name="list_available_tools", description="List all currently available tools", inputSchema={ "type": "object", "properties": {}, "required": [] } ), # Add existing tools dynamically *[types.Tool( name=tool["name"], description=tool.get("description", "No description available"), inputSchema={ "type": "object", "properties": { param: {"type": "string"} for param in tool.get("parameters", {}) }, "required": list(tool.get("parameters", {}).keys()) } ) for tool in self.tools_config] ] return tools