Skip to main content
Glama

search_documents

Search ERPNext/Frappe documents by DocType and field-filter query to find records matching specific criteria. Retrieve targeted document data for AI-assisted lookups and workflows.

Instructions

Advanced search for documents

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doctype": "<doctype>",
      "query": "<query>"
    },
    "name": "search_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesQuery object (field filters)
doctypeYesDocType name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden and delivers almost nothing. It does not confirm read-only behavior, describe pagination or result limits, explain what the query object accepts, or state what happens with an invalid or empty query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Four words are certainly concise and the purpose leads immediately, but the brevity is under-specification rather than economy. There is no second sentence to carry the heavy lifting that the single phrase cannot.

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 tool with a nested query object, no annotations, and no output schema, this description is far too thin. The agent has no information about result format, matching semantics, or how to construct the filter object, all of which the description should supply given the absent structured context.

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 nominally documented and the baseline of 3 applies. However, the query parameter is a nested object described only as "Query object (field filters)", and the description adds nothing about its structure or supported filter operators, leaving the most complex input unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Advanced search for documents" states a verb (search) and resource (documents), but "advanced" is an undefined qualifier that gives no sense of scope, query capability, or result shape. Nothing distinguishes it from sibling retrieval tools like get_documents or export_documents, so an agent cannot tell what makes this one the right choice.

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?

There is no when-to-use or when-not-to-use guidance whatsoever. With retrieval siblings such as get_documents present, the agent is left to guess when the "advanced" path is warranted instead of a simple fetch.

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