Skip to main content
Glama
agrica

elasticsearch7-mcp

by agrica

Get a document by id

get_document
Read-onlyIdempotent

Retrieve a single document from an Elasticsearch index by its _id. Returns a clear absence response when the document does not exist.

Instructions

Fetch one document by its _id. Reports that it is absent rather than failing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument _id
indexYesIndex holding the document

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds a meaningful behavioral trait beyond those annotations: it reports that a document is absent rather than failing. This tells the agent how missing documents are handled, which is useful for interpreting results.

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 two short sentences with no wasted words. The core action is front-loaded, and the second sentence adds a useful behavioral note. It is concise without sacrificing important information.

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 simple get-by-id tool with two fully documented parameters and strong annotations, the description is largely complete. It does not specify the exact return shape or concrete absent representation, such as null or an empty result, but 'Fetch one document' and 'Reports that it is absent rather than failing' cover the essential behavior an agent needs.

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 both parameters are already documented in the schema. The description adds little beyond the schema, aside from referring to '_id' in a way that maps to the id parameter. Baseline 3 is appropriate because the schema carries the parameter semantics.

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 states a specific verb and resource: 'Fetch one document by its _id.' It clearly distinguishes this from sibling tools like search or get_index_template by narrowing scope to a single document identified by _id. The additional detail about reporting absence rather than failing reinforces its unique purpose.

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?

The description gives a clear usage context: use this tool when you need exactly one document by its _id. It does not explicitly name alternatives or exclusions, but the stated single-document-by-id behavior is enough to imply the appropriate scenario and separate it from broader search or listing tools.

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