Skip to main content
Glama
cr7258

Elasticsearch MCP Server

delete_by_query

Deletes documents matching a query in an Elasticsearch index, optionally targeting a specific cluster, to remove records by condition.

Instructions

Deletes documents matching the provided query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesQuery to match documents for deletion
indexYesName of the index
clusterNoOptional cluster name. Uses the default cluster if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.1.4
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / body / description
      Added value: +"Query to match documents for deletion"
    • addedInput schema / properties / cluster / description
      Added value: +"Optional cluster name. Uses the default cluster if omitted."
    • addedInput schema / properties / index / description
      Added value: +"Name of the index"
  2. Addedv2.1.2
  3. Removedv2.1.1
  4. First observed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says 'deletes' but omits whether the operation is irreversible, what permissions it requires, whether it is transactional, and how many documents may be affected. For a destructive bulk operation this is a significant gap.

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?

A single short sentence with no filler or redundancy. However, its brevity comes at the cost of omitting useful behavioral context, so it is concise but not maximally informative.

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?

The output schema exists, so return values need not be described. But for a destructive, potentially bulk-mutating tool with no annotations, the definition should disclose safety-relevant behavior such as irreversibility and permissions; it does not.

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?

Schema description coverage is 100%, so all three parameters are already documented in the schema. The description adds no syntax or format details beyond what the schema provides, making the baseline 3 appropriate.

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?

States a specific verb and resource: deletes documents matching a query. It implies bulk deletion rather than single-document deletion, but does not explicitly contrast itself with the sibling delete_document, so it stops short of full sibling differentiation.

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 only restates the purpose. It gives no guidance on when to use delete_by_query versus delete_document or search_documents, and no prerequisites or warnings.

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