Skip to main content
Glama

Get QA document

get_qa

Read and parse a QA document by id, returning its frontmatter and body, or retrieve raw body text with optional line offset and limit.

Instructions

Read, parse, and return a full QA document (frontmatter and body) by its id. Pass raw=True to return the frontmatter-stripped body text verbatim instead. With raw=True, optional read-style offset/limit window the raw read: offset (1-based, default 1) is the first body line to return, limit (line count, default through end of body) how many; out-of-range values clamp (offset > N returns the empty string), and coordinates with raw=False raise ValueError. A document that exists but fails to parse returns a ParseFailureResult (error/path/id) instead of raising; its error text is byte-identical to the domain's own list tool's failed-row error for the same file (identical field path and cause, including the trailing pydantic documentation line; ADR 9080b37c-82b3-4f63-81f1-79641d0bf14c). An invalid id (path-injection attempt or wrong format) is also a ValueError, raised before any file access. With raw=True, an optional numbered=True prefixes every returned body line with its 1-based absolute body-line number in the "<n>: " form (plain decimal, no padding) -- under offset/limit windowing the numbers start at the clamped offset and never restart at 1, so a number seen in the output can be fed straight back into the generic update tool's offset. numbered is meaningful only with raw=True: combining it with raw=False raises ValueError (like offset/limit), and a numbered read of a document that fails to parse returns the ParseFailureResult described above, never numbered text. Numbered output must never be fed back verbatim into content for update or create_qa -- strip the "<n>: " prefix from each line first (it is likewise never a valid edit old_str). The optional language parameter (default 'en') selects the language variant to read: omitted/'en' = the flat docs/qa/ document, exactly the default behavior; any other ISO 639-1-shaped lowercase two-letter code (e.g. 'de') = that language's variant at docs/qa/{language}/ (the EN source's exact basename). The language is shape-validated before any file access (a path-injection-shaped payload is a ValueError, like an invalid id), and a shape-valid language without a packaged heading-mapping table is rejected up front with an actionable ValueError, also before any file access. A raw=True read of a variant returns the variant's on-disk body verbatim (translation preserved); a raw=False read parses it through the variant's heading table, so the structured model holds canonical heading text. The ParseFailureResult error of a broken variant is byte-identical to list_qa(language=...)'s failed row for the same file.

Input Schema

NameRequiredDescriptionDefault
idYes
rawNo
limitNo
offsetNo
languageNoen
numberedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.38.0
    • addedInput schema / properties / language
      Added value: +{
      +  "default": "en",
      +  "title": "Language",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.37.0
    • addedOutput schema / $defs / QaFrontmatter / properties / status / enum
      Added value: +[
      +  "active",
      +  "cancelled",
      +  "done",
      +  "draft"
      +]
    • addedOutput schema / $defs / QaQuestionAnswer / properties / question / pattern
      Added value: +"^\\*\\*\\d\\.\\d{4}\\*\\*:\\s"
  3. First observedv0.36.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that parse failures return a ParseFailureResult rather than raising, that invalid ids and incompatible parameter combinations raise ValueError before any file access, and that out-of-range offset/limit clamp. It stops short of explicitly stating the operation is read-only and side-effect free, which would matter more given the absence of annotations.

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?

The core behavior is front-loaded correctly in sentence one, but the body is a dense run-on paragraph dense with em-dashes and nested parentheticals. Detail like the ADR UUID, the repeated "byte-identical" guarantees, and the trailing pydantic documentation line note add length without changing how an agent would call the 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?

For a six-parameter tool with no annotations and a declared output schema, this is complete: failure modes, validation ordering, language-variant resolution, and cross-tool data-flow hazards (never feed numbered output into content or old_str) are all covered. Return-value shape is rightly left to the output schema.

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 coverage is 0%, so the description must compensate entirely, and it does: every one of the six parameters gets meaning beyond its type — raw's body-only behavior, offset's 1-based default and clamping, limit's through-end default, numbered's "<n>: " format and absolute numbering under windowing, language's flat-vs-subdirectory resolution and shape validation, and id's path-injection rejection.

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?

Opens with a specific verb and resource: "Read, parse, and return a full QA document (frontmatter and body) by its id," which is immediately actionable. It does not, however, distinguish itself from the sibling parse_qa tool, which an agent would reasonably consider interchangeable given the word "parse" in the description.

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?

It thoroughly explains the mode-selection logic for raw, offset/limit, numbered, and language, which is genuinely useful usage guidance. But it never routes between siblings: parse_qa is unmentioned, and list_qa/update/create_qa appear only as error-message or data-flow references, not as alternatives with a stated selection rule.

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