remove_api
Delete a specific API configuration by name from the OpenAPI MCP Proxy server to manage and streamline API schema storage effectively.
Instructions
Remove a saved API configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the API to remove |
Implementation Reference
- The handler method of RemoveApiTool that executes the tool by calling config_manager.remove_api with the provided name.async def handle_call(self, arguments: Dict[str, Any]) -> List[TextContent]: try: result = await self.config_manager.remove_api(arguments["name"]) return self._create_text_response(result) except Exception as e: return self._create_error_response(e)
- The input schema definition for the 'remove_api' tool, requiring a 'name' parameter. Used by RemoveApiTool.get_tool_definition().@staticmethod def create_name_input_schema() -> Dict[str, Any]: """Create input schema for name parameter.""" return { "type": "object", "properties": { "name": {"type": "string", "description": "Name of the API to remove"} }, "required": ["name"], }
- openapi_mcp_proxy/services/tool_registry.py:43-43 (registration)Registration of the RemoveApiTool instance in the ToolRegistry._register_tools() method.RemoveApiTool(self.config_manager),
- openapi_mcp_proxy/services/tool_registry.py:21-21 (registration)Import of RemoveApiTool class for registration.RemoveApiTool,
- Helper method in ConfigManager that performs the actual API removal and persistence, called by the tool handler.async def remove_api(self, name: str) -> str: """Remove an API configuration.""" if not self._storage.remove_api(name): raise ValueError(f"API '{name}' not found") await self.save_config() logger.info(f"Removed API configuration: {name}") return f"Removed API '{name}'"