Skip to main content
Glama

Search project documents

search_docs
Read-onlyIdempotent

Search the documents uploaded to a project (policy wordings, product guides, underwriting guidelines or anything else) for the passages that answer a question about the product: what is covered or excluded, excesses, conditions, definitions, claims notice, eligibility. Takes project_reference, query (the question in plain words, or an exact term like "Section 4" or a defined term), optional version_reference (default: the latest live version, else the latest of any status; pass the version that ran $1 so the wording matches it), optional k (passages to return, default 5, max 20) and optional document_references to search only some documents. Every passage is scored by meaning (a local embedding model) and by keywords, blended 70/30. Returns { project_reference, version_reference, query, documents: { indexed, pending, failed }, results: [{ document_reference, title, filename, version_reference, chunk, page, section, text, score, similarity, keyword }], next_steps }. score is relative to this search (the best passage scores near 1); similarity is the cosine similarity to the question (below about 0.5 is rarely relevant). Answer only from the returned text, citing title, section and page; read around a passage with get_doc. Nothing is changed.

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": {
      "project_reference": "<project_reference>",
      "query": "<query>"
    },
    "name": "search_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoOptional. How many passages to return, default 5, max 20.
queryYesThe question, in plain words (e.g. "is flood damage to a basement covered"), or an exact term to find (a clause number, a defined term).
project_referenceYesUUID of the project whose documents to search.
version_referenceNoOptional. The version whose documents to search: documents for every version plus any pinned to this one. Defaults to the latest live version.
document_referencesNoOptional. Only search these documents (from get_project's or run_quote's documents).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and closed-world, and the description confirms "Nothing is changed." Beyond that it discloses genuinely useful behavior the annotations do not: the 70/30 semantic/keyword blend, the relative-vs-cosine score distinction with a 0.5 relevance floor, and the indexed/pending/failed document states. A 3 rather than higher because this is largely return-shape explanation rather than operational behavior such as cost, latency, or limits.

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 before parameters and returns, and nearly every clause carries information. It is dense to the point of being one long paragraph, and the full return-shape enumeration could be trimmed, but nothing is wasted filler.

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?

No output schema exists, so describing the result object, score semantics and next_steps is necessary and is done thoroughly. Defaults, limits, filtering options and the citation workflow are all covered, leaving nothing an agent needs in order to call it correctly.

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 the baseline is 3, and the description still adds meaning: how version_reference defaults resolve (latest live, else latest of any status), that document_references should come from get_project or run_quote, and that query accepts either a plain question or an exact term. These are selection-relevant nuances the schema fields only partly convey.

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?

Opens with a specific verb and resource ("Search the documents uploaded to a project") and immediately enumerates the content types and question kinds it handles (coverage, exclusions, excesses, definitions, claims notice). An agent can distinguish it from get_doc/list_docs purely from this text.

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?

Explicitly scopes use to answering product questions, gives the follow-up alternative ("read around a passage with get_doc"), and states the downstream constraint "Answer only from the returned text, citing title, section and page." It also tells the agent to pass the version that ran $1 so wording matches.

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