Skip to main content
Glama

Parse problem statement

parse_prb

Parse a problem statement markdown file with YAML frontmatter into a structured PrbDocument; invalid content returns validation errors, missing or unreadable files raise access errors.

Instructions

Parse a problem statement markdown file (YAML frontmatter + body) from disk into a structured :class:~biz.dfch.specmgr.prb.models.v1.PrbDocument. An existing file that fails to parse returns a non-raising ValidateResult (valid=False, a single errors[].message capped at 300 chars as the generic validate tool caps it, feat-110) instead of raising AssertionError/pydantic.ValidationError/yaml.YAMLError (ADR f14f125e-eaad-4f4f-a6fd-3c931bed726e, GitHub issue #204 -- case 5 of the ADR 519d1206 non-raising-structured-result workaround chain); a truly-absent or unreadable path still raises the OSError-family file-access error (FileNotFoundError/PermissionError/OSError) from Path.read_text().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A3.5/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 behavioral burden, and it does this well: it discloses the non-raising ValidateResult contract on parse failure (valid=False, single 300-char errors[].message), names the specific exceptions avoided, and specifies that absent/unreadable paths still raise FileNotFoundError/PermissionError/OSError. It omits side-effect (read-only) confirmation and permission/auth needs, but this is unusually rich error-contract detail.

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?

One dense but front-loaded sentence: purpose first, then failure behavior. Every clause carries information (result shape, exception families, ADR references), though the parenthetical IDs and issue numbers add bulk that could be trimmed.

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?

Given an output schema exists, return values need not be explained, and the description thoroughly covers the non-obvious failure contract. The main gap is that it says nothing about when to choose this parser over sibling retrieval/validation tools, and the path argument's expected form is left implicit.

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 0% and the description never names the path parameter explicitly, so it does not add format/syntax detail. However, by describing what happens for 'a truly-absent or unreadable path', it implicitly conveys that path must reference an existing, readable file on disk, which is some semantics beyond the bare string type.

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 description states a specific verb+resource ('Parse a problem statement markdown file ... from disk into a structured PrbDocument'), so the agent knows exactly what the tool does. It does not explicitly contrast with siblings like get_prb, create_prb, or validate, which keeps it from a 5, but the resource scope is unambiguous.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus get_prb, list_prb, or validate. The word 'parse' implies loading a file into a model, but no conditions, alternatives, or prerequisites are named.

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