Skip to main content
Glama

Get QA document

get_qa

Read, parse, and return a QA document by ID, or fetch its raw body with optional offset/limit windowing and numbered lines for precise referencing.

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
rawNo
limitNo
offsetNo
numberedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral burden and does so thoroughly: parse failures return a ParseFailureResult instead of raising, invalid ids raise ValueError before any file access, offset/limit out-of-range values clamp, and combining offset/limit/numbered with raw=False raises ValueError. It even documents the anti-pattern of feeding numbered output back into content or edit old_str.

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 purpose is front-loaded and most content earns its place, but the whole definition is a single dense paragraph riddled with nested parentheticals, an ADR UUID, and low-value detail about byte-identical pydantic trailing lines. Bullet points or shorter clauses would convey the same constraints with far less parsing effort.

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 five parameters, a required id, an output schema, and no annotations, the description covers everything an agent needs: mode selection, windowing semantics, error/exception behavior, and cross-tool constraints. Return-value shape is partly handled by the output schema, so no meaningful gap remains.

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 does: raw is defined as a verbatim frontmatter-stripped mode, offset is 1-based with default 1, limit is a line count defaulting to end-of-body, and numbered is defined only under raw=True with absolute line numbers that do not restart at 1. This is far beyond the bare type/default information 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?

The first sentence states a specific verb (read/parse/return) and resource (full QA document, frontmatter and body) keyed by id, which is unambiguous. It also names two modes (raw=False default vs raw=True). However it never explicitly contrasts itself with the adjacent siblings parse_qa or get_qa_template, so an agent still has to infer which sibling is appropriate.

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 description gives clear in-tool usage context: pass raw=True for frontmatter-stripped body text, use offset/limit to window raw reads, and use numbered=True only with raw=True, including the routing hint that numbered line numbers can be fed back into update's offset. It does not, however, state when to choose this tool over the sibling parse_qa/list_qa/get_qa_template tools.

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