Skip to main content
Glama
agrica

elasticsearch7-mcp

by agrica

Elasticsearch 7.x MCP Server

用于从任何 MCP 客户端(如 Claude Desktop、Cursor)直接连接你的 Elasticsearch 集群的 MCP 服务器。

[!IMPORTANT] 这个 fork 仅面向 Elasticsearch 7.x。 它将 @elastic/elasticsearch 客户端锁定在 7.17 版本,该版本的 product check 会接受早于 7.14 的服务端。对于 Elasticsearch 8.x 集群,请使用上游项目 @awesome-ai/elasticsearch-mcp,本 fork 亦衍生自此。8.x 客户端无法与 7.x 服务端通信,反之亦然。

该服务器通过 Model Context Protocol 将代理连接到你的 Elasticsearch 数据。它允许你通过自然语言对话与 Elasticsearch 索引交互。

功能概览

工具分为三组。只有第一组始终开放;另外两组通过环境变量选择启用,因此生产环境可以在不提供删除能力的情况下提供诊断。控制发生在注册时:被禁用的工具永远不会出现在 tools/list 中,模型无法调用它,也不会在代理上下文中占用任何成本。

始终可用 —— 读写数据

集群

  • elasticsearch_health: cluster health, optionally down to index level

  • cluster_info:群集名称、Elasticsearch 版本和构建风格

索引操作

  • list_indices:按 Elasticsearch 通配符过滤列出索引

  • create_index:创建索引,可含可选的 settings 和 mappings

  • reindex:复制一个索引,可通过查询过滤或脚本转换

  • get_aliases:哪些别名指令哪些索引

mappings

  • get_mappings:索引的字段,先后以 dotted paths 及其类型显示,再显示原始 mapping

  • create_mapping:创建或更新索引的映射

搜索和数据

  • search:运行 queries DSL 搜索,自动在全部 text field 上注入高亮——包括嵌套字段——除非查询自带 highlight

  • count:匹配的文档数量,不传输文档内容

  • get_document:按 id 获取一个 document

  • bulk:一次索引多个 document

模板

  • create_index_template:创建或更新 composable index template

  • get_index_template:读取 index templates

Tasks

  • get_task:查询关于长任务(如 reindex 返回的任务)的进度

ES_ADMIN_TOOLS=true —— 诊断功能(只读)

这些工具仅读取,因此可以在生产中安全启用——这也是这组工具的意义所在:代理可以解释为什么某个索引不健康,任何人都无需登录集群。

  • explain_allocation: 为什么某个分片未分配,每个 allocator 做作什么决策

  • list_shards: 分片级状态,把不是 STARTED 的副本列在最前

  • list_nodes: 每个节点的堆内存、CPU、负载和磁盘压力

  • get_index_stats: Per-index 计数器 —— size, segments, indexing, search, merges

  • get_index_settings: 索引的 settings(refresh_interval, replicas, read-only blocks)

  • get_cluster_settings: 在运行中被修整的 cluster settings

  • list_tasks: 集群目前在执行什么任务

ES_ALLOW_DESTRUCTIVE=true —— 不可逆操作

适合部署环境用于环境本身,并且默认关闭,使生产环境无法触及这些操作。

  • delete_index:删除索引及其 data

  • delete_document:按 id 删除一个 document

  • delete_by_query:删除所有 matching query 的 document — 异步,返回 task id,删除会在后台继续

  • delete_index_template:删除 index template

即使开启此 flag,它们也会拒绝 wildcard、逗号分隔列表、* 和 _all:一次只操作一个指定的可引用索引。一个把 logs-* 误认为单个索引的模型只会收到拒绝,而不是会让集群被清空。

工作原理

  1. MCP 客户端分析你的请求,并决定需要哪些 Elasticsearch 操作。

  2. MCP 服务器执行这些操作(列出 indices、获取 mapping、执行 search)。

  3. MCP 客户端处理结果并以用户友好的格式呈现。

Related MCP server: Elasticsearch 7.x MCP Server

快速开始

前置条件

  • 一个 Elasticsearch 7.x 实例(针对 7.8 验证;7.17 以及客户端支持 6.8 到 7.x)

  • Elasticsearch 凭据——API key,或者 username/password

  • 一个 MCP 客户端:Claude Code、Claude Desktop、Codex、Cursor 或任何可以通过 stdio 与 MCP 通信的客户端

向 GitHub Packages 作一次性认证

[!IMPORTANT] 本包发布到的是 GitHub Packages,而不是 npmjs.com。GitHub Packages 即便是公开的包也要 token。如果你不加 token,以下每次以及安装都会以 401 失败。请将其写入 user-level 的 ~/.npmrc:

@agrica:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN

YOUR_GITHUB_TOKEN 是一个具有 read:packages scope 的 personal access token。

请把它保留在你自己的 ~/.npmrc,不要放在 project file 中——提交到仓库的 token 就是泄漏的 token,而且某些包管理器可能拒绝从此处读取 token。

连接到你的 client

下面的每个示例都会设置 ES_HOST 和 ES_API_KEY。如果想改用 basic auth,请替换成 ES_USERNAME/ES_PASSWORD;如需诊断工具则设置 ES_ADMIN_TOOLS=true;声明多个实例时,设置 ES_INSTANCE_LABEL——见 配置选项。

claude mcp add elasticsearch7 \
  --env ES_HOST=https://your-cluster:9200 \
  --env ES_API_KEY=your-api-key \
  --env ES_ADMIN_TOOLS=true \
  -- npx -y @agrica/elasticsearch7-mcp

然后在会话中输入 /mcp 即可看到该 Server。它的工具列表可被列出。

这两个细节容易被弄错:

  • -- 后面的所有内容是运行 Server 的命令——如果没有它,Claude Code 会尝试把 -y 当成它自己的 flag 来解析。

  • 不要紧跟着 --env 后面立刻放 Server name —— CLI 会把下面接受成另一个 KEY=value 对并拒绝。上面 name 在前,所以才会成功。

该 Server 以 local scope 添加,因此只加载于当前 project。要全局可用加 --scope user,或用 --scope project 写入 .mcp.json 并分享给团队——注意,提交 .mcp.json 会带上你的 API key,所以 is prefer 使用 user scope 放置 credentials。

编辑 claude_desktop_config.json — 可通过 Settings > Developer > Edit Config 打开,在 Windows 上位于 %APPDATA%\Claude\,在 macOS 上位于 ~/Library/Application Support/Claude/:

{
  "mcpServers": {
    "elasticsearch7": {
      "command": "npx",
      "args": ["-y", "@agrica/elasticsearch7-mcp"],
      "env": {
        "ES_HOST": "https://your-cluster:9200",
        "ES_API_KEY": "your-api-key",
        "ES_ADMIN_TOOLS": "true"
      }
    }
  }
}

随后重启 Claude Desktop;它只会在启动时读取该文件。

codex mcp add elasticsearch7 \
  --env ES_HOST=https://your-cluster:9200 \
  --env ES_API_KEY=your-api-key \
  -- npx -y @agrica/elasticsearch7-mcp

或者手动编辑 ~/.codex/config.toml。注意 Codex 将表名拼写为 mcp_servers(带下划线),并且环境变量放在它自己的子表中,而不是内联:

[mcp_servers.elasticsearch7]
command = "npx"
args = ["-y", "@agrica/elasticsearch7-mcp"]

[mcp_servers.elasticsearch7.env]
ES_HOST = "https://your-cluster:9200"
ES_API_KEY = "your-api-key"
ES_ADMIN_TOOLS = "true"

在 Codex 中查看 /mcp 可确认 Server 已加载。

该 Server 是一个纯 stdio MCP Server,因此任何支持 MCP 客户端的应用 都可以使用。它需要三样东西:命令 npx、参数 -y @agrica/elasticsearch7-mcp,以及环境中的 ES_* 变量。它不监听端口,不往 stdout 写非 MCP 协议内容——diagnostic 信息只发暗去 stderr。

配置选项

Elasticricsearch MCP Server 支持以下配置选项来连接你的 Elasticsearch:

[!NOTE] 必须提供 API key 或 username 和 password 两者之一来进行身份验证。

Environment Variable

Description

Required

CHOST

你的 Elasticsearch 实例 URL,可单个或逗号分隔多个(兼容旧变量 HOST)

是

ES_API_KEY

Elasticsearch API key 用于认证(也支持旧变量 API_KEY)

否

ES_USERNAME

Elasticsearch basic auth 用户名(兼容旧变量 USERNAME)

否

ES_PASSWORD

Elasticsearch basic auth 密码(兼容旧变量 PASSWORD)

否

ES_CA_CERT

自定义 CA 证书路径(用于 Elasticsearch SSL/TLS,兼容旧变量 CA_CERT)

否

ES_REQUEST_TIMEOUT

单次请求的 timeout,以毫秒为单位;默认 30000,若大量索引上的 aggregation 超时请调大。

否

ES_MAX_RETRIES

每请求重试次数;默认 3,设为 0 表示禁用重试。

否

ES_MAX_RESULT_BYTES

单个工具结果的上限;默认 32768。超过后会省略 details 并在结果中说明。

否

ES_INSTANCE_LABEL

对某部署的自由文本名称,如 production;会作为服务器标题,便于并排区分多个实例。

否

ES_ADMIN_TOOLS

设为 true 可暴露只读诊断工具。默认关闭。

否

ES_ALLOW_DESTRUCTIVE

设为 true 可暴露不可逆操作。默认关闭。

否

[!WARNING] ES_ADMIN_TOOLS 和 ES_ALLOW_DESTRUCTIVE 没有像上面的连接变量那样提供不带前缀的旧别名。这是设计上故意的:一个无前缀的 ADMIN_TOOLS 或 ALLOW_DESTRUCTIVE 放在环境中,对于决定是否 enable delete 的开关而言,实在是太容易误设了。

两者都接受 true 或 1;其他任意值(包括未设置变量)都表示关闭。

结果大小

单个工具结果上限为 32 KB(由 ES_MAX_RESULT_BYTES 控制)。这在 logging 集群上很关键:超过上限之前,一次 list_shards 调用可能对一整年的 daily indices 返回 385 KB——约为 96,000 个 token——这在单次答复中可能会超过大多数会话能承受的量。

当结果被截断时,它会说明已截断、被省略了多少,并告诉用户如何提出更小的问题。三个工具会以此为基础来组织返回内容:

  • list_indices 和 list_shards 返回容易阅读的 summary;同样的 rows 可作为文本由 verbose 提供。

  • search 每次调用把 size 限制为 100,并返回用于后续分页的 from。

  • get_mappings 先列出 fields 再列出 raw mapping,因此即使带有上千个 field 的 index 也能回答所问的问题。

四个工具—— list_indices、list_shards、get_index_settings 和 get_mappings —— 除了可读文本,还会以类型风格的结构化输出返回数据,因此客户端可以直接读取 rows,无需解析文本。该结构化结果由可读答案剩余部分的空间组装而成,用 returned 对照 total 显示,使得部分列表也能作为数字被看到。

运行 pnpm run measure 针对构建出的结果检查 static 当前实际数据。

为多实例添加标签

大多数环境会不止一次为 server 声明多个实例(每个 cluster 一个 entry)。这些 entry 看起来完全相同,客户端会显示两个同名的 server,无法区分。 ES_INSTANCE_LABEL 会用作 server 的显示标题,因此它很适合用来标识某个 entry 对应的是哪个环境:

{
  "mcpServers": {
    "es7-prod": {
      "command": "npx",
      "args": ["-y", "@agrica/elasticsearch7-mcp"],
      "env": {
        "ES_HOST": "https://es-prod:9200",
        "ES_API_KEY": "prod-key",
        "ES_INSTANCE_LABEL": "production",
        "ES_ADMIN_TOOLS": "true"
      }
    },
    "es7-staging": {
      "command": "npx",
      "args": ["-y", "@agrica/elasticsearch7-mcp"],
      "env": {
        "ES_HOST": "https://es-staging:9200",
        "ES_API_KEY": "staging-key",
        "ES_INSTANCE_LABEL": "staging",
        "ES_ADMIN_TOOLS": "true",
        "ES_ALLOW_DESTRUCTIVE": "true"
      }
    }
  }
}

这对配置是预期形态:**两侧都提供诊断,删除操作仅在 staging 上提供。**模型无法调用从未注册过的东西。

该标识也会在启动时打印到 stderr。如果某个 client 报告连接问题,但你不能确定是哪个集群在响应,就去 stderr 里找。

多个 URL 的配置

您可以配置多个 Elasticsearch 节点,以实现高可用性和负载均衡:

{
  "mcpServers": {
    "elasticsearch7-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@agrica/elasticsearch7-mcp"
      ],
      "env": {
        "ES_HOST": "https://es-node1:9200,https://es-node2:9200,https://es-node3:9200",
        "ES_API_KEY": "your-api-key"
      }
    }
  }
}

客户端会自动处理已配置节点之间的故障转移和负载均衡。

使用 Docker 运行

每个版本都会向 GitHub Container Registry 发布一个多架构镜像(linux/amd64、linux/arm64):

docker pull ghcr.io/agrica/elasticsearch7-mcp:latest

该 server 通过 stdio 通信,因此容器需要一个交互式 stdin,并且不需要公开任何端口。在 MCP client 中:

{
  "mcpServers": {
    "elasticsearch7-mcp": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "ES_HOST",
        "-e", "ES_API_KEY",
        "ghcr.io/agrica/elasticsearch7-mcp:latest"
      ],
      "env": {
        "ES_HOST": "your-elasticsearch-host",
        "ES_API_KEY": "your-api-key"
      }
    }
  }
}

[!NOTE] 与 npm 包一样,该镜像也存在于 GitHub Packages 中:拉取它需要一个具有 read:packages 范围的 token,即使仓库是公开的也如此。

该镜像无需公开发布端口,也无需卷:它通过 stdio 通信,并由 MCP client 拥有其 stdin 和 stdout。

查询示例

[!TIP] 以下是一些您可以在 MCP client 中尝试的自然语言查询。

集群管理

  • “我的 Elasticsearch 集群的健康状态如何?”

  • “我的集群中有多少个 active 节点?”

索引操作

  • “我的 Elasticsearch 集群中有哪些索引?”

  • “创建一个名为 ‘users’ 的新索引,分片数为 3,副本数为 1。”

  • “将数据从 ‘old_index’ 重新索到 ‘new_index’。”

映射管理

  • “显示 ‘products’ 索引的字段映射。”

  • “向 ‘products’ 索引添加一个名为 ‘tags’ 的 keyword 类型字段。”

搜索与数据操作

  • “查找上月所有超过 $500 的订单。”

  • “哪些产品收到了最多的 5 星评价?”

  • “将这批客户记录批量导入到 ‘customers’ 索引中。”

模板管理

  • “为模式为 ‘logs-*’ 的日志创建一个索引模板。”

  • “显示我所有的索引模板。”

诊断(需要 ES_ADMIN_TOOLS=true)

  • “‘logs-2026’ 索引显示为黄色——为什么它的分片未分配?”

  • “是否有任意节点接近磁盘水位?”

  • “我的哪个索引最大,其中有多少是已删除文档?”

  • “是否有人在此集群上 Web房分片分配?”

  • “是否有重新索仍在运行?”

破坏性操作(需要 ES_LLOW_DESTRUCTIVE=true)

  • “删除 ‘smoke-test-source’ 索引。”

  • “从 ‘logs-archive’ 中清除所有早于 2046 的文档。”

故障排查

症状说明

原因

安装或 npx 时出现 ` 无样的错 E401

用户级 ~/.npmrc 中的 GitHub Packages token 不存在。请参阅 向 GitHub Packages 验证。

启动时出现 Server error: ... invalid url

CSS_OST 未设置或设置错误。这一项有意在启动时验证,而非在之后的第一次查询中才失败。

Client 能连接,但没有诊断或删除工具

该工具集是受限的。请设置 ES_ADMIN_TOOLS=true 或 ES_ALLOW_DESTRUCTIVE=true并重启 client。

Refusing to charge on pattern "logs-*"

这是预期行为:破坏性工具只能接收一个具体的索引名,不能接收通配符模式,即使开启对应标志也不行。

错误中提到了某 product check 的集群

集群是 8.x,或无法访问。本构建只与 7.x 通信。

发现了一个 bug 或需要有一个不存在的工具?请在 GitHub 仓库中打开 issue。要参与代码开发,请从 CONTIRBUTING.md 开始。

Available Tools

17 tools
analyzeAnalyze textA
Read-onlyIdempotent

Show the terms a text is broken into, which is what a query must produce to match. Pass field with index to use the analyzer that index really applies to that field; that is the form that explains a search returning nothing.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to analyze
fieldNoUse this field's analyzer, taken from the index mapping.
indexNoIndex whose analyzers to use. Required with field.
analyzerNoNamed analyzer to test instead, e.g. standard, french.

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so no safety disclosure is missing. The description adds semantic behavior: output is the token terms a query must match, and using field/index routes to the real per-field analyzer. It neither contradicts annotations nor reveals side-effect caveats beyond that, so a mid score is appropriate.

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?

Two compact sentences, the first states the core function and the second adds the key usage nuance. No filler or repetition of schema details.

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 read-only diagnostic with one required parameter, the description plus schema covers what the tool does, how to choose a real-field analyzer, and why it matters for debugging searches. No output schema exists, but the description directly states the observable result ('terms a text is broken into'). It doesn't discuss response shape details, but they are unnecessary for basic invocation.

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

Parameters4/5

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

Schema coverage is 100%, so parameter basics are already documented. The description adds the important combination rule (field must be paired with index) and explains that the analyzer is taken from the index mapping, which is value beyond individual property docs. It earns an above-baseline score.

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 names a concrete operation — showing the tokenized terms produced from text — and ties it to query matching, so an agent understands what analyze returns. It also distinguishes the field/index form from a standalone analyzer test. This goes well beyond the vague title.

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?

It gives explicit guidance on the field-index combination as the way to use the actual analyzer applied by the index, and states this is the form that explains an empty search result. It doesn't explicitly enumerate alternatives or when to use the analyzer parameter, but the context is sufficient for a user to choose sensibly.

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

bulkBulk index documentsA

Index up to 1000 documents in one call. The index is refreshed by default, so they are searchable immediately; per-document failures are reported without failing the call.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYesTarget index
idFieldNoField whose value becomes the document _id. Omit to let Elasticsearch generate ids.
refreshNoDefaults to true, making documents searchable at once. Set false when loading many batches: forcing a refresh per batch is the expensive part.
documentsYesDocuments to index, at most 1000. Send more in successive batches.

TDQS

A4.3/5.0
Behavior4/5

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

The description adds useful behavioral detail beyond the annotations: the index is refreshed by default so documents are immediately searchable, and per-document failures are reported without failing the whole call. This meaningfully informs the agent about side effects and error handling.

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?

Two sentences deliver the key information without redundancy: the action, the batch limit, the refresh behavior, and the failure handling. It is front-loaded with the most important operational constraint.

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?

Given a complete input schema, a moderate number of parameters, and annotations covering the read/write profile, the description covers the important behavioral nuances—immediate searchability and partial failures. No critical information for invoking the tool correctly is missing.

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 the parameters are already well documented in the schema. The description reinforces the 1000-document limit and the default refresh behavior, but adds little semantic value beyond what the schema already states.

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 action ('Index'), a concrete resource ('documents'), and a clear constraint ('up to 1000 documents in one call'). This clearly separates it from siblings like create_index, create_mapping, and reindex, which target different operations.

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 establishes when bulk indexing is appropriate: when you have up to 1000 documents to index in a single call. It also explains the default refresh behavior, which helps an agent decide when to override it. It does not explicitly name alternatives, but the batching context is clear.

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

cluster_infoCluster version and identityA
Read-onlyIdempotent

Cluster name, Elasticsearch version and build flavour. The version decides which query DSL features exist.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds useful context about the returned fields and the role of the version, but it does not disclose additional behavioral traits like response structure, authentication needs, or whether values are cached.

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: the first front-loads the exact fields returned, and the second gives a brief reason the version matters. There is no filler or redundant restating of the title.

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 parameterless, read-only metadata tool without an output schema, the description adequately covers what the agent gets (name, version, flavour) and why version is useful. It could be slightly richer by noting the response is a flat JSON object, but that is a minor omission for such a simple tool.

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

Parameters4/5

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

The tool takes zero parameters, so there is no parameter burden on the description. The schema is effectively empty and the baseline for 0 params is 4.

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 identifies the resource (cluster identity: name, version, build flavour), but it uses a noun phrase rather than a specific verb like 'returns' or 'lists'. It is distinguishable from siblings by its focus on cluster metadata, yet it never explicitly differentiates itself from elasticsearch_health or other info tools.

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

Usage Guidelines3/5

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

The statement 'The version decides which query DSL features exist' implies when this tool is relevant: checking version-dependent DSL feature support. However, it does not explicitly say when to use it versus alternatives, nor does it mention any exclusions or prerequisites.

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

countCount documentsA
Read-onlyIdempotent

Count the documents matching a query, without transferring any. Cheaper than search when only the number matters.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYesIndex to count in
queryNoQuery DSL. Omit to count every document.

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds useful behavioral context beyond annotations: no documents are transferred and this operation is cheaper than search. This is meaningful information without contradicting the annotations.

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?

Two short sentences with no redundant words. The core action is front-loaded and the benefit/alternative is stated in the second sentence.

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 simple read-only counting tool, the description, schema, and annotations together cover the required parameters, the optional query behavior, the safety profile, and the use case. The return value (a count) is obvious from the tool's purpose, so no output schema is needed.

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 the schema already documents index and query, including that omitting query counts every document. The description does not add further parameter-level meaning but does not need to.

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 uses a specific verb-resource pairing ('Count the documents matching a query') and immediately differentiates from the sibling search tool by noting it transfers no documents. An agent can tell exactly what operation this performs and how it differs from search.

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

Usage Guidelines5/5

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

It explicitly states the condition for choosing count over search: 'when only the number matters,' and notes it is 'Cheaper than search.' The phrase 'without transferring any' also implies that search should be used when actual documents are needed.

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

create_indexCreate an indexA

Create a new index. Fails if it already exists — use create_mapping to add fields to an existing one.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYesIndex name
mappingsNoField mappings, e.g. { properties: { title: { type: 'text' } } }
settingsNoIndex settings, e.g. number_of_shards, number_of_replicas

TDQS

A4.4/5.0
Behavior4/5

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

The description adds a valuable behavioral detail beyond the annotations: the operation fails rather than overwriting when the index already exists. This complements the annotations, which already indicate a non-read-only, non-idempotent write operation. It does not elaborate on all side effects, but the conflict behavior is the key operational trait.

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 sentences with no filler. It leads with the core action, then immediately states the failure condition and the correct alternative. Every sentence serves a distinct purpose and the structure makes it easy to scan.

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?

The description, together with the fully documented schema and annotations, provides enough context for correct invocation: required parameter, optional mapping/settings parameters, and the failure mode. It does not mention the create_index_template sibling, but that is not essential for invoking this specific tool correctly.

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?

All three parameters are already documented in the input schema, including examples for mappings and settings, so schema coverage is 100%. The description does not add additional parameter-level meaning, but it does not need to; the schema carries that burden effectively.

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 action and resource: 'Create a new index.' It also differentiates itself from the closest sibling, create_mapping, by explicitly saying to use that tool for adding fields to an existing index. The purpose is immediately clear and not a tautology.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: use this tool for creating a new index. It also gives an explicit when-not-to-use and alternative: 'Fails if it already exists — use create_mapping to add fields to an existing one.' This leaves little ambiguity about which tool to select.

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

create_index_templateCreate or update an index templateA
Idempotent

Create or update a composable index template (Elasticsearch 7.8+). It applies only to indices created after it, never to existing ones.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesTemplate name
versionNoVersion number, for your own tracking
priorityNoPrecedence when several templates match; higher wins
templateYesWhat to apply: { settings, mappings, aliases }
indexPatternsYesIndex wildcards the template applies to, e.g. ['logs-*']

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate a mutating, idempotent, non-destructive operation. The description adds important behavior beyond the annotations: the Elasticsearch 7.8+ requirement and the non-retroactive nature of the template. No contradiction exists between description and annotations.

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?

A single sentence communicates the action, resource, version constraint, and the most important behavioral caveat with no filler. The key scoping limitation is front-loaded and easy to parse.

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 write tool with 5 parameters, a nested template object, and no output schema, the description covers the decisive behavioral constraint and version compatibility while relying on the fully documented schema for parameter details. It does not mention the response format, but that is a minor gap for a create/update tool.

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 five parameters already have inline documentation. The description does not add substantial parameter-level meaning beyond the schema, making the baseline 3 appropriate.

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 ('Create or update') and a specific resource ('composable index template'), which clearly distinguishes it from sibling tools like create_index or create_mapping. The version qualifier and 'applies only to indices created after it' add further precision about what the tool does.

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 clear context: this tool is for defining templates that affect future indices only, and it explicitly states it never affects existing indices. It does not name alternative tools for existing-index changes, but the exclusion is clear enough for an agent to reason about when to use it.

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

create_mappingCreate or update a mappingA
Idempotent

Add or update fields on an index, creating the index if it does not exist. Elasticsearch cannot change the type of an existing field.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYesIndex name
mappingsYesMapping to apply, e.g. { properties: { tags: { type: 'keyword' } } }

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate idempotent, non-read-only, and non-destructive behavior. The description adds valuable constraints beyond annotations, especially the critical limitation that 'Elasticsearch cannot change the type of an existing field', which helps agents anticipate failures.

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?

Two tightly written sentences. The first conveys the core action and index-creation behavior, and the second adds the most important caveat. There is no filler or repetition.

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 two-parameter tool with a clear schema, the description covers the main behavioral caveat and typical usage. It does not describe the response shape, but given no output schema and the simplicity of the operation, the description is largely sufficient.

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%, with both parameters documented well; the mappings parameter even includes an example shape. The description itself adds no additional parameter-level detail, so the baseline of 3 is appropriate.

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 ('Add or update') and resource ('fields on an index') and clarifies that it can create the index if needed. This clearly differentiates it from sibling tools like get_mappings or create_index.

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 clear context: use this tool to mutate mappings, including when the index does not yet exist. It does not explicitly name alternatives or state when not to use it, but the operational scope is clear enough to guide selection.

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

elasticsearch_healthCluster healthB
Read-onlyIdempotent

Cluster health: status, node counts and shard counts.

ParametersJSON Schema
NameRequiredDescriptionDefault
includeIndicesNoAdd per-index health detail

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, so the description does not need to re-establish safety. The description does add useful information about the return content (status, node counts, shard counts), which is helpful because there is no output schema. It does not add deeper behavioral context such as whether includeIndices changes response structure substantially, but that is partially covered by the parameter description.

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 one short, front-loaded sentence: 'Cluster health: status, node counts and shard counts.' Every word earns its place, and there is no redundancy or filler.

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 read-only tool with zero required parameters and a well-documented optional parameter, the description covers the essential return content. The annotations cover the safety profile, and the schema covers the parameter. It is only missing explicit guidance for distinguishing it from cluster_info, which is already penalized under usage guidelines.

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 the only parameter, includeIndices, already has a meaningful description: 'Add per-index health detail'. The tool description adds no additional parameter semantics beyond the schema, so the baseline of 3 applies.

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 names the exact resource ('cluster health') and the specific output areas (status, node counts, shard counts), which makes the tool's purpose reasonably clear. It lacks an explicit verb like 'get', but the noun-phrase style with tool name 'elasticsearch_health' is sufficient. It is distinguishable from index-focused siblings like list_indices and get_mappings, though cluster_info could overlap without more detail.

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 gives no guidance on when to use this tool versus alternatives. With sibling cluster_info likely covering similar cluster-level information, the absence of a routing note is a real gap. Any usage guidance is only implied by the name and the word 'health'.

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

field_capsField capabilitiesA
Read-onlyIdempotent

Which fields exist across an index pattern and whether each is searchable and aggregatable. Takes a wildcard, unlike get_mappings, and is the only way to see a field mapped as two different types across indices — which makes an aggregation over it silently partial rather than failing.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYesIndex, alias or wildcard, e.g. logs-app-*
fieldsNoField name or wildcard to ask about, e.g. log.* — comma-separated for several. Defaults to every field.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond annotations: wildcard acceptance, cross-index type conflict visibility, and the non-obvious consequence that aggregations over such fields become silently partial rather than failing. This is exactly the kind of behavioral warning an agent needs.

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?

Two tight sentences: the first delivers the core purpose, the second adds the distinguishing behavior and its operational warning. Every clause earns its place, and the most decision-relevant information is front-loaded.

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 simple two-parameter, read-only tool, the description covers the essential facts: what it returns, how it differs from its sibling, and a critical edge-case consequence. The schema and annotations carry the remaining details, so nothing an agent needs to invoke it correctly is missing.

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 input schema already describes both parameters clearly, including wildcard behavior and defaults, giving 100% schema description coverage. The description does not substantially add parameter-level meaning beyond that, so the baseline of 3 is appropriate; it reinforces the wildcard theme but introduces no new parameter detail.

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 opens with a precise statement of what the tool returns: fields across an index pattern plus whether each is searchable and aggregatable. It further distinguishes itself from get_mappings by calling out wildcard support and the special case of fields mapped as two different types, making the tool's identity unmistakable.

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 explicitly names get_mappings as the alternative and gives a concrete differentiator ('Takes a wildcard, unlike get_mappings'). It also establishes a strong when-to-use condition: it is the only way to detect a field mapped as two different types. It does not spell out the reverse case ('use get_mappings when...'), but the intended routing is clear.

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

get_aliasesList aliasesA
Read-onlyIdempotent

List which aliases point to which indices. A name you query may be an alias, which changes what get_mappings returns.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexNoIndex or wildcard. Omit for the whole cluster.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior. The description adds behavioral context by warning that aliases affect get_mappings results, which is useful beyond the annotations. No contradiction exists.

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?

Two sentences, no filler. The core purpose is front-loaded, and the second sentence adds valuable contextual information without unnecessary length.

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 read-only tool with one optional parameter and no output schema, the description provides sufficient guidance. It could mention what the response contains, but the annotations and sibling context cover most operational concerns.

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 the optional 'index' parameter is already documented. The description doesn't add parameter-level detail beyond what the schema states, which matches the baseline for high schema coverage.

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 uses a specific verb and resource: 'List which aliases point to which indices.' It clearly communicates the tool's purpose and implicitly distinguishes it from sibling tools like list_indices and get_mappings.

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 concrete context for when this tool matters: when a queried name may be an alias and alters what get_mappings returns. It does not explicitly name alternatives or exclusion criteria, but the usage context is clear enough for an agent.

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

get_documentGet a document by idA
Read-onlyIdempotent

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

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesDocument _id
indexYesIndex holding the document

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.

get_index_templateGet index templatesA
Read-onlyIdempotent

Get composable index templates. Omit name to list all.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoTemplate name. Omit to list every template.

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, covering safety semantics. The description adds the list-all behavior when name is omitted, but does not disclose output shape, errors, or other runtime behavior.

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, purposeful sentences with no filler. The main operation is front-loaded, and the optional-name behavior is expressed efficiently.

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, optional-parameter, read-only tool with strong annotations, the description is nearly complete. It could mention the return format or that it returns template definitions, but an agent has enough information to invoke it correctly.

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 the schema already explains that 'name' is optional and that omitting it lists every template. The description restates this without adding new semantic details, so the baseline score of 3 is appropriate.

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 operation ('Get'), the resource ('composable index templates'), and the key behavior ('Omit name to list all'). This makes the tool's purpose immediately obvious and distinguishes it from create_index_template and other read-only sibling tools.

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

Usage Guidelines3/5

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

The description gives clear guidance on omitting the name to list all templates, but it does not explicitly discuss when to choose this tool over alternatives such as get_mappings or create_index_template. Usage context is mostly implied rather than stated.

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

get_mappingsGet index mappingsA
Read-onlyIdempotent

List the fields of one index as dotted paths with their types, nested fields included, then the raw mapping. Give a concrete index name: an alias or a wildcard returns nothing.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYesIndex name

Output Schema

ParametersJSON Schema
NameRequiredDescription
foundYes
indexYes
totalYes
fieldsYes
omittedYes
returnedYes

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds useful behavior beyond annotations by specifying the output format (dotted paths with types, then raw mapping) and the alias/wildcard caveat, which is exactly the kind of context an agent needs.

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?

Two compact sentences front-load the tool's output behavior and then give the critical input constraint. Every sentence earns its place, with no filler or repetition of the schema.

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?

Given the simple one-parameter schema, the presence of an output schema, and annotations covering safety, the description is complete. It explains what the response contains, when a call will succeed, and when it will return nothing.

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

Parameters4/5

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

The schema fully documents the single 'index' parameter with 100% coverage, so the baseline is 3. The description adds real semantic value by requiring a concrete index and warning that aliases and wildcards yield no results, which is not inferable from the schema alone.

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 action ('List the fields of one index as dotted paths with their types') and a concrete resource ('one index'), and it distinguishes the tool by noting nested fields are included and the raw mapping follows. This separates get_mappings from siblings like get_index_template or field_caps without requiring the agent to inspect schemas.

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 clear operational guidance: pass a concrete index name, and avoid aliases or wildcards because they return nothing. It does not explicitly name alternative sibling tools, but the precondition and failure mode are actionable enough for an agent to decide when to invoke this tool.

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

get_taskGet task progressA
Read-onlyIdempotent

Check an asynchronous task, such as the one reindex returns: progress, completion and failure.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask id as returned by reindex, e.g. node-1:428

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive, so the safety profile is covered. The description adds that the task reports progress, completion, and failure, but it does not explain response format or polling behavior; this is modest added value beyond the annotations.

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 a single front-loaded sentence that names the action, the resource, the source of the task id, and the relevant outcomes. Every phrase earns its place with no redundant wording.

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 single-parameter polling tool with rich annotations, the description is complete: it says what to check, where the task id comes from, and what aspects are reported. No output schema exists, but the description names the key result dimensions well enough for correct invocation.

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 schema already provides 100% coverage for taskId, including its meaning and an example. The description only reinforces that the task id comes from reindex, adding no new parameter semantics beyond what the schema already supplies.

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 tool checks an asynchronous task and identifies the specific scenario (tasks returned by reindex). It names the observable outcomes (progress, completion, failure), making the purpose unambiguous, though it does not explicitly differentiate from siblings.

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 provides a clear usage context: use this after an asynchronous operation such as reindex that returns a task id. It does not state when-not-to-use or name alternatives, but the context is concrete enough for an agent to select it appropriately.

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

list_indicesList indicesA
Read-onlyIdempotent

List indices, one compact line each: name, health, status, document count and size in bytes. Large results are trimmed and say so.

ParametersJSON Schema
NameRequiredDescriptionDefault
patternNoElasticsearch wildcard, e.g. `logs-*`. Not a regex. Defaults to `*`.
verboseNoAlso repeat the rows as JSON text, for a client that does not read structured output.

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalYes
indicesYes
omittedYes
patternYes
returnedYes

TDQS

A4.3/5.0
Behavior4/5

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

The description goes beyond the read-only and idempotent annotations by disclosing the compact per-line format and the important trimming behavior for large results. This prevents an agent from assuming the output is always complete. Safety is already covered by annotations.

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?

Two short sentences front-load the purpose and output shape, then add the trimming caveat. Every phrase earns its place and there is no boilerplate.

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?

With only two optional parameters, a full output schema, and annotations covering safety and idempotence, the description supplies the key behavioral caveat (trimming) and output fields. An agent has everything needed to invoke list_indices correctly.

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 input schema already documents both parameters at 100% coverage, including the wildcard-vs-regex distinction for pattern and the purpose of verbose. The description adds no parameter-level detail, so the baseline score of 3 is appropriate.

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 operation ('List indices') and defines the exact output fields (name, health, status, document count, size in bytes), making it immediately distinguishable from sibling tools like get_mappings or field_caps. It clearly identifies the resource and the compact representation.

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 output description clearly implies its use case: obtaining a compact overview of indices with health and size information. It does not explicitly name sibling alternatives or state exclusions, so it falls just short of full routing guidance.

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

reindexReindex into another indexA

Copy documents between indices. Asynchronous: returns a task id at once and the copy is still running on return — poll it with GET _tasks/.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNoQuery DSL selecting which documents to copy. Omit to copy all.
scriptNoTransform each document while copying
destIndexYesDestination index, created if absent
sourceIndexYesSource index

TDQS

A4/5.0
Behavior4/5

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

The description goes beyond the annotations by disclosing the crucial asynchronous behavior: it returns a task id immediately while the copy continues, and it tells the caller how to poll progress. Annotations already cover read/write/destructive aspects, and the description adds meaningful operational context without contradicting them.

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?

Two tight sentences: the first states the action clearly, and the second adds the key behavioral caveat and how to follow up. No filler or repetition of schema content.

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 tool with nested parameters and no output schema, the description explains the main return signal (task id) and the continuation mechanism. It is sufficient for an agent to select and invoke the tool correctly, though it does not detail edge cases or result formats beyond the task id.

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 the schema already documents sourceIndex, destIndex, query, and script with meaningful descriptions. The tool description adds no parameter-specific detail, but the schema carries that burden fully, so the baseline 3 is appropriate.

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 uses a specific verb and resource pair: 'Copy documents between indices.' This clearly distinguishes reindex from read-only search, single-document get, and indexing/bulk operations, and the title reinforces the same intent.

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

Usage Guidelines3/5

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

The description clearly implies when to use this tool: when documents must be copied between indices. However, it does not explicitly explain when not to use it or mention alternatives such as bulk for direct writes or search for read-only queries. The async polling hint gives practical usage context, but no explicit routing guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 17 tool updatesv0.4.1
    • First observedanalyze
    • First observedbulk
    • First observedcluster_info
    • First observedcount
    • First observedcreate_index
    • First observedcreate_index_template
    • First observedcreate_mapping
    • First observedelasticsearch_health
    • First observedfield_caps
    • First observedget_aliases
    • First observedget_document
    • First observedget_index_template
    • First observedget_mappings
    • First observedget_task
    • First observedlist_indices
    • First observedreindex
    • First observedsearch

TDQS

A3.7/5.0

Scored across 17 tools

Disambiguation5/5

Each tool targets a distinct operation or resource: field inspection is split cleanly between get_mappings and field_caps, with explicit notes about wildcard vs concrete index behavior. create_index, create_mapping, bulk, and reindex are also clearly differentiated, so an agent should not confuse them.

Naming Consistency3/5

Most tools use get_, list_, or create_ prefixes, but bare nouns and verbs like bulk, count, reindex, field_caps, cluster_info, and elasticsearch_health break the verb_noun pattern. Naming is readable and consistently snake_case, but the conventions are mixed.

Tool Count3/5

17 tools is on the heavy side for a single server and makes agent tool selection slightly harder. Each tool does map to a real Elasticsearch operation, so the count is not excessive, but it is borderline.

Completeness2/5

The surface covers health, mappings, search, indexing, and templates, but lacks delete/update operations for documents and indices, and has no deletion for aliases or templates. This creates significant dead ends for common lifecycle workflows.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Facilitates interaction with Elasticsearch clusters by allowing users to perform index operations, document searches, and cluster management via a Model Context Protocol server and natural language commands.
    20
    311
    Apache 2.0
  • A
    license
    C
    quality
    D
    maintenance
    Provides an MCP protocol interface for interacting with Elasticsearch 7.x databases, supporting comprehensive search functionality including aggregations, highlighting, and sorting.
    3
    11
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    Connects Claude and other MCP clients to Elasticsearch data, allowing users to interact with their Elasticsearch indices through natural language conversations.
    3
    2,743 npm
    717
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    Enables interaction with Elasticsearch clusters for health checks, index management, document CRUD operations, and search via natural language.
    10
    10 npm
    MIT