Skip to main content
Glama
cloudsmithy

Easysearch MCP Server

by cloudsmithy

doc_update

Update specific documents in an Easysearch index using partial field updates or script-based modifications, with options to insert new documents when needed.

Instructions

    更新文档
    
    参数:
        index: 索引名称
        id: 文档 ID
        doc: 部分更新的字段
        script: 脚本更新
        upsert: 文档不存在时插入的内容
        refresh: 刷新策略
    
    示例 - 部分更新:
        doc_update("products", "1", doc={"price": 899})
    
    示例 - 脚本更新:
        doc_update("products", "1", script={
            "source": "ctx._source.price -= params.discount",
            "params": {"discount": 100}
        })
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
idYes
docNo
scriptNo
upsertNo
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. While it shows update operations through examples, it doesn't describe important behavioral aspects like: whether this is a mutating operation (implied but not stated), what permissions are required, whether updates are atomic, what happens on conflicts, error conditions, or what the response format looks like. The examples help but leave critical operational context unspecified.

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 clear sections: purpose statement, parameter list, and two practical examples. Every sentence serves a purpose, with the examples being particularly valuable for understanding different update modes. The Chinese-only text is concise and focused, though the formatting could be slightly cleaner.

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

Completeness3/5

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

For a 6-parameter mutation tool with no annotations and no output schema, the description provides adequate basics but has significant gaps. It covers the core update functionality and parameter purposes through examples, which is valuable. However, it lacks information about error handling, response format, performance characteristics, concurrency behavior, and detailed parameter constraints - important context for a document update operation in what appears to be a search/indexing system.

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?

With 0% schema description coverage, the description compensates well by listing all 6 parameters with brief explanations and providing two detailed examples that demonstrate how 'doc' and 'script' parameters work differently. The examples clarify that 'doc' is for partial field updates while 'script' allows programmatic updates, adding significant semantic value beyond the bare schema. However, it doesn't explain 'refresh' parameter options or 'upsert' behavior in detail.

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 with the verb '更新' (update) and resource '文档' (document), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'doc_update_by_query' or 'doc_index', which perform similar document operations but with different approaches.

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 provides two concrete examples showing when to use partial updates vs. script updates, which gives implied guidance on usage scenarios. However, it doesn't explicitly state when to choose this tool over alternatives like 'doc_update_by_query' for bulk updates or 'doc_index' for full document replacement, nor does it mention prerequisites or constraints.

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