Skip to main content
Glama

remove_api

Delete a saved API configuration from the OpenAPI proxy server to manage stored endpoints and schemas.

Instructions

Remove a saved API configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the API to remove

Implementation Reference

  • RemoveApiTool class: core handler for 'remove_api' tool. Sets name, description, references schema via create_name_input_schema(), and handle_call executes by calling config_manager.remove_api with the provided name.
    class RemoveApiTool(ConfigTool, ToolDefinitionMixin):
        """Tool for removing API configurations."""
    
        def __init__(self, config_manager):
            super().__init__(
                name="remove_api",
                description="Remove a saved API configuration",
                config_manager=config_manager,
            )
    
        def get_tool_definition(self) -> Tool:
            return Tool(
                name=self.name,
                description=self.description,
                inputSchema=self.create_name_input_schema(),
            )
    
        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)
  • Static method defining the input schema for remove_api tool: object with required 'name' string field.
    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"],
        }
  • Registration: instantiation of RemoveApiTool with config_manager and addition to the tools list in ToolRegistry._register_tools().
    # API Management Tools
    AddApiTool(self.config_manager),
    ListSavedApisTool(self.config_manager),
    RemoveApiTool(self.config_manager),
  • ConfigManager.remove_api(): invoked by tool handler, calls storage.remove_api(name), saves config if successful, returns success message.
    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}'"
  • ApiConfigStorage.remove_api(name): low-level storage operation that deletes the API by name from the internal apis dict if exists.
    def remove_api(self, name: str) -> bool:
        """Remove an API configuration. Returns True if removed, False if not found."""
        if name in self.apis:
            del self.apis[name]
            return True
        return False
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool performs a removal operation, implying it's destructive, but doesn't clarify if the action is reversible, what permissions are required, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a destructive mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address behavioral aspects like safety, permissions, or response format, which are critical for an agent to use the tool correctly in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'name' parameter fully documented in the schema itself. The description doesn't add any additional meaning or context about the parameter beyond what's in the schema, so it meets the baseline score when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Remove') and the target resource ('a saved API configuration'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'add_api' or 'list_saved_apis' beyond the obvious verb difference, so it doesn't reach the highest level of sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., that the API must exist), exclusions, or suggest related tools like 'list_saved_apis' for verification, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nyudenkov/openapi-mcp-proxy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server