Skip to main content
Glama

search_corpus

Find passages across the corpus relevant to a question, ranked with citations and query terms. Use it before answering to ground responses in cited source material.

Instructions

Find passages across the corpus that bear on a question.

Call this before answering anything of substance. Returns ranked passages,
each with a citation `ref` and the list of query terms it actually contains.
Not for reading a passage you already have a ref for — use read_passage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoHow many passages to return.
workNoRestrict to one work by slug (see list_works). Leave unset to search everything.
queryYesThe idea to look for, in a few content words. Older vocabulary matches better: 'sympathy' over 'empathy', 'master and men' over 'management'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
statusYesok — passages found that match most of the question's terms. weak — something matched, but thinly; say so if you use it. no_coverage — the corpus does not speak to this. Say that. Do not answer from elsewhere. not_found — a specific reference did not resolve.
constraintNoAnswer only from these passages. Quote or closely paraphrase, and cite each claim as [Author, Title §n]. If the passages do not speak to the question, say so plainly rather than filling the gap from elsewhere.
provenanceNoEvery passage is from a work by a named woman author, in the public domain, via Project Gutenberg.
limitationsNoPart of the answer, not a disclaimer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burdenconcern. It discloses the ranked-passage return shape, the presence of citation refs, and that it reports which query terms are actually contained. It also signals that this is a lookup/search operation, not a passage-reader, which adds useful behavioral context beyond the schema.

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

Conciseness5/5

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

The description is compact and front-loaded: purpose first, then when to use it, then key return details, then a clear exclusion with an alternative. Every sentence contributes, and there is no filler or repetition of schema content.

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?

Given a rich input schemachers, an output schema, and sibling tools, the description covers all essential invocation context: what it searches, when to call it, what it returns, and which tool to use instead. The 'work' field's reference to list_works fills any remaining routing gap.

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 the baseline is 3 even though the main description adds no parameter-level detail. The query, k, and work parameters already have meaningful descriptions in the schema, including vocabulary guidance for query, so no compensation is needed.

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?

The description states a specific action ('Find passages across the corpus') and a clear resource ('the corpus') tied to a question, and it explicitly contrasts itself with read_passage. This is a distinctive, non-tautological purpose that an agent can immediately act on.

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?

It gives an explicit when-to-use rule: 'Call this before answering anything of substance.' It also names the alternative for the negative case: 'Not for reading a passage you already have a ref for — use read_passage.' The schema's work parameter further references list_works, covering the sibling alternatives.

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