Skip to main content
Glama

Search the source library

search_documents
Read-onlyIdempotent

Searches primary-source documents (laws, budgets, contracts, reports) by title, summary or reference. Open a match with get_document. Matching is the content store's substring match and accents count; search_site folds accents and searches every kind at once. Paginates: when more results remain, the structured answer has a nextCursor (absent on the last page). To continue, call this tool again with the same arguments and cursor set to that value.

Input Schema

NameRequiredDescriptionDefault
qYesWords or a reference number.
langNoen (English) or dv (Dhivehi).en
limitNoResults to return (1-25, default 10).
cursorNoContinue a previous result: the nextCursor it returned, unchanged. Only valid with the same other arguments (limit may differ).

Output Schema

NameRequiredDescriptionDefault
totalYesAll matching documents, not just this page.
documentsYes
nextCursorNoOpaque cursor for the next page: pass it back as the cursor argument, with the same other arguments. Absent on the last page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered; the description adds genuinely non-obvious traits: substring matching semantics, accent sensitivity, and the nextCursor-absent-on-last-page pagination contract. Only the result payload shape is unexplained, and an output schema exists to cover that.

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?

Front-loaded with purpose, then routing, then matching caveats, then pagination — a sensible priority order. Dense but every clause carries information; the pagination sentence is slightly long but justified by the ambiguity it prevents.

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 read-only search with a full schema and an output schema, all the agent needs is here: what is searched, how matching works, how to get the next page, and which sibling to use instead. Nothing material is missing.

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 baseline is 3; the description earns extra by explaining cursor reuse rules (same arguments, cursor unchanged, limit may differ) and by describing what q is matched against rather than just 'words or a reference number'. No added detail for lang or limit beyond the schema.

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?

Specific verb+resource with the searchable corpus enumerated (laws, budgets, contracts, reports) and the fields searched (title, summary, reference). It also explicitly contrasts with search_site, so an agent can distinguish it from the nearest sibling without inspecting schemas.

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?

Names the follow-up tool (get_document) to open a match and names the alternative (search_site) with the exact condition that selects it — accent folding and searching every kind at once. Continue-vs-freshpage behavior is also spelled out with the cursor mechanics.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources