Skip to main content
Glama

docs_query

Read-onlyIdempotent

Query the source truth of a project — routes, symbols+doc-comments, import graph (depends-on/used-by), tables, task refs, coverage, and bounded rich route contracts — assembled from the source of the project's ACTIVE release. It answers questions about a project without grepping files.

By default the platform selects the sidecar of the exact active release (its ready, same-project version); there is no fallback to a newer or older sidecar. A successful default answer carries version_source: 'active_release', release_id and source_manifest_hash as selection metadata — what was selected, not independent certification of the artifact bytes. version selects an exact older sidecar; that answer carries version_source: 'explicit' and no release metadata. When the active release cannot be resolved (none active, not found, not ready, its source missing or temporarily unavailable) the answer is a neutral release-status error with version_source: 'active_release' and the release_id where one exists — no source hash, and never a claim that you must redeploy. A project whose selected release has no sidecar answers DOCS_SIDECAR_NOT_FOUND (404). Input problems are ordinary validation or project-not-found errors.

The result comes from the deploy-version-keyed docs sidecar selected for that release, not from a live grep. path, symbol, or route returns the matching methods/query actions, schema columns and constraints, sw.* and environment-name bindings (never values), and imported-helper evidence. The response never includes the whole readable Markdown document. If a sidecar is partial or omitted files, the response includes source hash/version/completeness flags so absence is not mistaken for proof that code is not deployed. The private canonical platform artifact is explicitly SOURCE truth, not serving/runtime-effective truth.

Examples:

{ "project_id": "my-saas" }
{ "project_id": "my-saas", "path": "api/checkout.ts" }
{ "project_id": "my-saas", "symbol": "createCheckout" }
{ "project_id": "my-saas", "route": "POST /api/checkout" }

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_id": "<project_id>"
    },
    "name": "docs_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOptional — exact deployed source path, e.g. api/checkout.ts or src/App.tsx.
routeNoOptional — route path or METHOD + path, e.g. /api/checkout or POST /api/checkout.
symbolNoOptional — exported symbol name to find, including its doc comment and file.
versionNoOptional — pins a specific deploy version. Defaults to the current live deploy sidecar.
project_idYesProject ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the release-selection model (exact active release, no fallback), the metadata fields returned with each selection path (`version_source: 'active_release'` vs `'explicit'`, `release_id`, `source_manifest_hash`), the neutral release-status error behavior, the `DOCS_SIDECAR_NOT_FOUND` 404 case, and the partial/omitted-file completeness caveat. It also explicitly limits exposure of environment bindings to names, never values.

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

Conciseness3/5

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

Purpose and scope are front-loaded and the example block is useful, but the prose is dense and repetitive: 'source truth' versus 'SOURCE truth' is restated, and the release-selection paragraph is a long nested sentence chain that could be tightened substantially. Length is driven by genuinely complex semantics rather than filler, which keeps it from scoring lower.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and mostly succeeds, enumerating what comes back and what is deliberately excluded plus completeness flags. Remaining gaps are result-size/truncation behavior and how the response is shaped when several selectors are combined, which the agent would still have to discover empirically.

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 coverage is 100%, so the schema already documents all five parameters, making 3 the baseline. The description does add some meaning beyond the schema — notably that `version` pins an older sidecar with a different `version_source` and no release metadata, and that `path`/`symbol`/`route` return schema columns, constraints, helper evidence, and bindings — but it does not clarify selectors' interaction or precedence when more than one is supplied.

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 first sentence states a specific verb and resource with an enumerated scope: routes, symbols+doc-comments, import graph, tables, task refs, coverage, and route contracts, plus the contrast 'answers questions about a project without grepping files.' It never names or differentiates itself from the `docs`, `project_docs`, or `api` siblings, so the agent must guess which documentation tool to pick.

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

Usage Guidelines3/5

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

Usage is only implied: it is for answering project questions from deployed source rather than grepping, and it 'never includes the whole readable Markdown document.' There is no explicit when-to-use/when-not statement and no routing to alternative documentation or API tools, so selection guidance rests on inference.

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