Skip to main content
Glama

query_repo

Answer repo-wide questions by ingesting all repository files into the model's context and returning a single answer with a summary of files and tokens used.

Instructions

Answer question using the whole repo's files in-context.

Ingests the repo's ingestible files into the selected model's context window (cache-aware ShardPlan ordering; GLM-5.2 1M by default, DeepSeek V4 128k via model="deepseek") and asks the question in a single model round-trip. Returns the answer prefixed with a one-line context summary (files + tokens). Transient API errors (429/5xx) are retried with backoff; a terminal failure returns a structured error (v0.2).

Args: question: the repo-wide question (e.g. "where is the auth middleware handled?"). repo: optional repo root override (defaults to the --repo arg or CTXFEED_REPO_ROOT env var). model: optional model override ("glm" | "deepseek"; defaults to the server's --model / CTXFEED_MODEL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
modelNo
questionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and does so well: it explains the ingestion model (ShardPlan ordering, model context windows), the single round-trip behavior, the retry policy on 429/5xx, and the structured terminal-error shape. These are exactly the operational traits an agent needs beyond a bare schema.

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 the core purpose, then behavior, then args, which is a sensible ordering. The parenthetical detail around model IDs and version tags is dense but each clause carries real information; slightly heavy for a three-parameter tool.

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 no annotations, 0% schema coverage, and an existing output schema, the description supplies everything an agent needs: purpose, scope, model selection, retry/error semantics, and arg defaults. Nothing required for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and it fully does: it documents question (with an example), repo (defaults to --repo arg or env var), and model (enum-like 'glm'|'deepseek' with default resolution). All three parameters gain meaning not present in the schema.

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?

States a specific verb (answer question) over a clearly-scoped resource (the whole repo's files in-context), which cleanly separates it from siblings like list_files and cost_delta. The core action and scope are unambiguous, though it never explicitly names the siblings it is not.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'whole repo's files in-context' framing makes the use case (repo-wide questions) clear, reinforced by the example question. It does not name alternatives or state when-not to use it, so no exclusions are provided.

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

Deploy Server

Other Tools