Skip to main content
Glama
cr7258

Elasticsearch MCP Server

delete_alias

Remove an alias from a specific Elasticsearch index to manage index references and streamline data organization.

Instructions

        Delete an alias for a specific index.

        Args:
            index: Name of the index
            name: Name of the alias
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
nameYes

Implementation Reference

  • The main handler function for the 'delete_alias' MCP tool. It is decorated with @mcp.tool() for registration and executes the deletion by calling the search client's delete_alias method. The docstring and type hints define the input schema.
    @mcp.tool()
    def delete_alias(index: str, name: str) -> Dict:
        """
        Delete an alias for a specific index.
    
        Args:
            index: Name of the index
            name: Name of the alias
        """
        return self.search_client.delete_alias(index=index, name=name)
  • Supporting helper method in the AliasClient class that implements the core deletion logic using the underlying search client's indices.delete_alias.
    def delete_alias(self, index: str, name: str) -> Dict:
        """Delete an alias for the specified index."""
        return self.client.indices.delete_alias(index=index, name=name)
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 action is 'Delete', implying a destructive mutation, but lacks details on permissions, reversibility, error conditions, or effects on related data. This is insufficient 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.

Conciseness4/5

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

The description is brief and front-loaded with the core purpose, followed by parameter details. It avoids unnecessary fluff, but the parameter section could be more integrated into the flow rather than a separate 'Args:' block, slightly affecting structure.

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?

For a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context such as success/error responses, side effects, or prerequisites, making it inadequate for safe and effective tool invocation in a complex environment.

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 description lists both parameters ('index' and 'name') with brief explanations, adding meaning beyond the schema's 0% coverage. However, it doesn't specify format constraints (e.g., index naming rules) or provide examples, leaving gaps in understanding despite compensating somewhat for the low schema coverage.

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 verb 'Delete' and the resource 'alias for a specific index', making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'delete_index' or 'delete_document', which would require explicit comparison to achieve a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives like 'delete_index' or 'put_alias' for modification. The description only states what it does, not when it's appropriate, leaving the agent to infer usage from context without explicit direction.

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/cr7258/elasticsearch-mcp-server'

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