Skip to main content
Glama

corpus_query

Read-onlyIdempotent

Formats all observations of a named corpus into markdown context paired with a question, so AI assistants can answer queries grounded in that corpus. Requires a corpus name and a question.

Instructions

Format all observations of a named corpus as markdown context + a question, ready for answering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCorpus name previously built via corpus_build.
projectNoProject name/path (default: active).
questionYesQuestion to answer with the corpus context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds the useful detail that the output is markdown context packaged with the question, hinting at the return shape, but says nothing about size limits, truncation, or what happens if the corpus is missing.

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?

A single compact sentence with the core action front-loaded and no wasted words. The phrasing 'markdown context + a question' is slightly informal but efficient and clear.

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 3-parameter read-only retrieval tool with no output schema, the description covers the essentials of what is produced. However, it leaves genuine ambiguity about whether the tool answers the question or merely assembles the context, which could mislead an agent about the result.

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%, with all three parameters documented including the corpus_build dependency and the project default. The description adds no parameter-level meaning beyond this, so the baseline 3 applies since the schema does the heavy lifting.

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 names a specific action (format observations of a named corpus as markdown context plus a question) and a clear resource. It implicitly separates this from corpus_build, which constructs the corpus, but never names that sibling explicitly. The 'ready for answering' framing usefully clarifies it prepares context rather than producing a final answer.

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, and no exclusions or alternatives are named. The only hint of usage context is in the schema field ('previously built via corpus_build'), which is not part of the description. An agent gets no routing help from the description text itself.

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