Skip to main content
Glama
Pawangunjkar

DB MCP Server

by Pawangunjkar

es_index_document

Insert a single document into an Elasticsearch index. Use optional doc_id to set the ID, or omit it for an auto-generated one.

Instructions

Index one Elasticsearch document. Omit doc_id to let Elasticsearch assign one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
doc_idNo
session_nameNodefault
document_jsonYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations available, the description carries the full burden of behavioral disclosure. It only notes doc_id omission for auto-assignment, but omits that this is a write/mutation operation, potential errors (e.g., missing index), or side effects. For a mutation tool, 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.

Conciseness5/5

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

The description is exactly two sentences with no fluff. The primary action is front-loaded, and the additional doc_id note is concise. Every word earns its place, making it highly efficient.

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?

Given four parameters (two required), an output schema, and a write operation, the description is far too brief. It fails to explain the format of document_json, the meaning of index, or what the tool returns. An agent would have to guess the semantics of essential inputs, leaving the tool under-specified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it only touches doc_id ('Omit doc_id...'). It does not explain index, document_json, or session_name at all. The added value is minimal and leaves three of four parameters semantically unexplained.

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 clearly states the action and object: 'Index one Elasticsearch document.' It also adds behavioral detail about omitting doc_id, which spreads the scope precisely. Among sibling tools (es_search, es_delete_document), the verb 'index' uniquely identifies this operation, so no confusion is likely.

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. The description does not mention that es_search is for querying, es_delete_document for removals, or any specific scenario that selects this tool. It is purely procedural without contextual selection criteria.

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