Skip to main content
Glama

Get problem statement

get_prb

Reads and parses a full problem statement by ID, returning structured frontmatter and body or raw body text with optional offset, limit, line numbering, and language selection.

Instructions

Read, parse, and return a full problem statement 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_prb -- 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/prb/ document, exactly the default behavior; any other ISO 639-1-shaped lowercase two-letter code (e.g. 'de') = that language's variant at docs/prb/{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_prb(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 / Prb / properties / problem_statement / pattern
      Added value: +"^(?:.+)\\s+is\\s+causing\\s+(?:.+),\\s+for\\s+(?:.+)\\s+because\\s+(?:.+)\\.$"
    • addedOutput schema / $defs / PrbFrontmatter / properties / status / enum
      Added value: +[
      +  "active",
      +  "cancelled",
      +  "draft",
      +  "resolved"
      +]
  3. First observedv0.36.0

TDQS

A4.2/5.0
Behavior5/5

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

With zero annotations the description carries the full burden and does so richly: it discloses that a broken document returns a ParseFailureResult instead of raising, that invalid ids and path-injection payloads raise ValueError before any file access, that offset/limit clamp out of range, that unsupported language codes are rejected up front, and that raw=True preserves translation while raw=False maps headings to canonical text. It also warns that numbered output must be stripped before reuse in content/old_str, which is exactly the kind of behavioral context annotations would otherwise supply.

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

Conciseness2/5

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

The purpose is front-loaded, but the body is a run-on of em-dash-chained clauses that repeats itself: the byte-identical ParseFailureResult error claim appears twice, and the ValueError conditions for offset/limit/numbered are restated. Dense as it is, an agent must parse one very long paragraph to extract the several distinct modes, when short bullets or a mode table would convey the same content far more efficiently.

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?

An output schema exists, so return values need not be restated, and against that lower bar the description covers error paths, language variants, windowing, and numbered output thoroughly for a 6-parameter tool. The only real gap is the missing distinction from the sibling parse_prb, which occupies the same parse-the-document niche and is never mentioned.

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% across 6 parameters, so the description must compensate, and it documents every one: offset is 1-based with default 1, limit defaults to end-of-body, out-of-range values clamp and offset > N yields the empty string, offset/limit/numbered are only valid with raw=True, and language defaults to 'en' mapping to docs/prb/ versus docs/prb/{language}/. It also states that numbered emits a 'n: ' prefix whose numbers start at the clamped offset, which is meaning no schema could convey.

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 opening sentence gives a precise verb+resource: 'Read, parse, and return a full problem statement document (frontmatter and body) by its id', and names the sibling behaviors it is not (update, create_prb, edit) when warning about feeding numbered output back. It never distinguishes itself from the equally-named sibling parse_prb or from list_prb beyond error-text parity, so it falls short of full sibling differentiation.

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?

It clearly says when to use the two modes ('Pass raw=True to return the frontmatter-stripped body text verbatim instead') and when offset/limit/numbered apply, including that they raise ValueError with raw=False. It gives no guidance at the tool level, however: nothing says when to call get_prb versus parse_prb, list_prb, or get_prb_example.

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