Skip to main content
Glama

delete_api

Remove a registered API and all associated data including endpoints, embeddings, dependency graphs, and authentication credentials from the JitAPI server.

Instructions

Delete a registered API and all its data including endpoints, embeddings, dependency graph, and authentication credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_idYesThe API identifier to delete

Implementation Reference

  • The handler function `_delete_api` which implements the tool logic for deleting an API.
    async def _delete_api(self, args: dict[str, Any]) -> ToolResult:
        """Delete an API and all its data."""
        api_id = args["api_id"]
    
        # Check if API exists
        if not self.spec_store.api_exists(api_id):
            return ToolResult(
                success=False,
                data=None,
                error=f"API not found: {api_id}",
            )
    
        # Track what was deleted
        deleted = {
            "spec": False,
            "graph": False,
            "embeddings": 0,
            "auth": False,
        }
    
        # Delete from spec store (includes endpoints)
        deleted["spec"] = self.spec_store.delete_api(api_id)
    
        # Delete from graph store
        deleted["graph"] = self.graph_store.delete_graph(api_id)
    
        # Delete from vector store
        deleted["embeddings"] = self.vector_store.delete_api(api_id)
    
        # Delete auth credentials
        deleted["auth"] = self.auth_handler.remove_auth(api_id)
    
        logger.info(f"Deleted API {api_id}: {deleted}")
  • The `DeleteApiInput` Pydantic model defining the input schema for the `delete_api` tool.
    class DeleteApiInput(BaseModel):
        """Input for delete_api tool."""
    
        api_id: str = Field(
            ...,
            description="The API identifier to delete",
            min_length=1,
            max_length=100,
            pattern=r"^[a-zA-Z0-9_-]+$",
        )
  • Registration of the `delete_api` tool within the MCP tool mapping dictionary.
    "delete_api": self._delete_api,
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses the destructive cascade (endpoints, embeddings, credentials). However, it omits critical mutation context such as irreversibility, permission requirements, or confirmation behavior.

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, front-loaded sentence with zero waste. Every clause earns its place by specifying the action and enumerating the cascading deletion scope without redundancy.

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

Completeness4/5

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

For a single-parameter destructive operation with no output schema, the description adequately covers the deletion scope. It could be improved by mentioning return value indicators or confirmation requirements, but it satisfies the essential disclosure needs for this tool type.

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 for the single 'api_id' parameter. The description does not add semantic detail beyond the schema's 'The API identifier to delete', meeting the baseline expectation when schema coverage is high.

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

Purpose5/5

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

The description provides a specific verb ('Delete') and resource ('registered API'), and explicitly distinguishes this from sibling tools by detailing the comprehensive scope of deletion ('all its data including endpoints, embeddings, dependency graph, and authentication credentials').

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

Usage Guidelines3/5

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

The description implies the tool is for permanent removal by enumerating what gets destroyed, but lacks explicit when-to-use guidance, prerequisites, or named alternatives (e.g., when to use this vs. simply unregistering or disabling).

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/nk3750/jitapi'

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