Skip to main content
Glama
cloudsmithy

Easysearch MCP Server

by cloudsmithy

doc_update_by_query

Update multiple documents in an Easysearch index using a query to specify which documents to modify, applying a script to change their fields.

Instructions

    按查询更新文档
    
    参数:
        index: 索引名称
        query: 查询条件(可选,不传则匹配所有)
        script: 更新脚本
        refresh: 是否刷新
    
    示例:
        doc_update_by_query("products", 
            query={"term": {"category": "electronics"}},
            script={"source": "ctx._source.on_sale = true"}
        )
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
queryNo
scriptNo
refreshNo
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool updates documents by query but doesn't describe important traits: whether this is a bulk operation, what permissions are required, if it's idempotent, what happens on partial failures, or what the response format looks like. The example shows a script parameter but doesn't explain script language or limitations.

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 description is well-structured with purpose statement, parameter list, and example. It's appropriately sized with no redundant information. Every sentence serves a purpose: the title-like statement, parameter explanations, and practical example. However, the parameter explanations could be more detailed given the 0% schema coverage.

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?

For a mutation tool with 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description is incomplete. It covers basic purpose and parameters but lacks crucial information about behavior, error handling, return values, and usage context. Given the complexity of update-by-query operations, more guidance 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 0%, so the description must compensate. It lists all 4 parameters with brief Chinese explanations and provides an example showing usage. However, the explanations are minimal ('查询条件(可选,不传则匹配所有)' for query) and don't fully explain parameter formats, constraints, or interactions. The example helps but doesn't replace proper documentation.

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's purpose: '按查询更新文档' (update documents by query). It specifies the verb (update) and resource (documents) with a method (by query). However, it doesn't explicitly differentiate from sibling tools like doc_update or doc_delete_by_query, which would require more specific scope or behavior details.

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 provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when-not-to-use scenarios, or comparisons with similar tools like doc_update (single document update) or doc_delete_by_query (delete by query). The example shows usage but doesn't explain context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cloudsmithy/easysearch-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server