Skip to main content
Glama

Delete documents

search_delete_documents
DestructiveIdempotent

Delete up to 1,000 documents of an index by id. Use when records were deleted in the app. Before: the ids to remove. Returns the task: deleted and not_found counts. Scope: search:write. Cost: priced at get_pricing; any price is reserved on the prepaid balance before the call. Refused for balance or a limit: follow next_action.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ids": [
        "sku-1"
      ],
      "name": "products",
      "idempotency_key": "delete-sku-1-0001"
    },
    "name": "search_delete_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesThe ids to delete.
nameYesIndex name.
idempotency_keyYesUnique per request. Reuse it on retry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the destructive/idempotent annotations, the description discloses the authorization scope (search:write), the cost model (priced at get_pricing, price reserved against the prepaid balance before the call), the capacity cap (1,000 ids), and refusal behavior for balance or limit failures with an instruction to follow next_action. It also states the return shape (task with deleted and not_found counts), which no output schema provides.

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 definition is terse and front-loaded: operation, trigger, prerequisite, return, scope, cost, failure handling, in that order. A few clauses are telegraphic, and "Before: the ids to remove" largely repeats the required ids parameter, but nothing is padded.

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

Completeness5/5

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

For a destructive, three-parameter mutation with no output schema, the description covers everything an agent needs: what is removed, the trigger, auth scope, cost and balance reservation, and what to do on a refusal. Return values are spelled out even though no output schema exists.

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% and includes a worked example with name, ids and idempotency_key, so the schema already carries parameter meaning. The description only restates "the ids to remove" and adds the 1,000-item ceiling, which is already encoded as maxItems in the schema.

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?

"Delete up to 1,000 documents of an index by id" gives a specific verb, resource and unit of operation, so it is naturally distinguishable from index-level or object-level deletion siblings. It stops short of naming the near-miss sibling (search_delete_index), leaving the agent to infer the boundary between deleting documents and deleting the index itself.

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

Usage Guidelines4/5

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

"Use when records were deleted in the app" supplies a concrete triggering condition, and the prerequisite ("Before: the ids to remove") is stated. No explicit when-not guidance or named alternative is given, so the agent must reason about the delete-index vs delete-documents choice on its own.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources