list_saved_apis
Retrieve all saved API configurations for quick reference and management within the OpenAPI-MCP-Proxy server, enabling efficient endpoint and schema exploration.
Instructions
List all saved API configurations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handle_call method implements the core logic of the list_saved_apis tool: retrieves APIs from config_manager, formats them using a helper, and returns a text response.async def handle_call(self, arguments: Dict[str, Any]) -> List[TextContent]: try: apis = self.config_manager.list_apis() result = self._format_api_list(apis) return self._create_text_response(result) except Exception as e: return self._create_error_response(e)
- Defines the tool schema with an empty input object (no parameters required).def get_tool_definition(self) -> Tool: return Tool( name=self.name, description=self.description, inputSchema={ "type": "object", "properties": {}, "required": [], }, )
- openapi_mcp_proxy/services/tool_registry.py:40-43 (registration)Registers the ListSavedApisTool instance in the ToolRegistry's list of tools.# API Management Tools AddApiTool(self.config_manager), ListSavedApisTool(self.config_manager), RemoveApiTool(self.config_manager),
- Helper function to format the list of saved APIs into a human-readable string.def _format_api_list(self, apis: List[Dict[str, str]]) -> str: """Format API list for display.""" if not apis: return "No saved APIs found" result = f"Saved APIs ({len(apis)}):\n\n" for api in apis: result += f"- {api['name']}: {api['url']}" if api.get("description"): result += f" - {api['description']}" result += "\n" return result