Skip to main content
Glama

Parse QA document

parse_qa

Parse a QA document markdown file from disk into a structured QaDocument. Returns a non-raising ValidateResult for parse failures; missing or unreadable paths raise file-access errors.

Instructions

Parse a QA document markdown file (YAML frontmatter + body) from disk into a structured :class:~biz.dfch.specmgr.qa.models.v2.QaDocument. 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.6/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 delivers strong failure-mode disclosure: parse failures return a non-raising ValidateResult (valid=False, single errors[].message capped at 300 chars) while missing/unreadable paths still raise FileNotFoundError/PermissionError/OSError. It does not state the read-only nature or side-effect profile, keeping it short of a 5.

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 well, but the remaining text is bloated with internal ADR/GitHub/feat references (ADR f14f125e..., issue #204, case 5 of the ... chain, feat-110) that consume space without helping an agent invoke the tool. Half the content could be trimmed without losing actionable meaning.

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-value detail is not required, and the description usefully covers the error contract anyway. For a one-parameter read/parse tool it is essentially complete, minus an explicit read-only/mutation statement.

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% on the single 'path' parameter, but the description supplies context ('markdown file ... from disk') that implies a filesystem path to a QA markdown file. It adds only marginal meaning, no format/allowed-value detail, so baseline 3 is fair.

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?

States a specific verb and resource: 'Parse a QA document markdown file ... into a structured QaDocument.' The 'from disk' scoping and the target type clearly separate this from create_qa/get_qa/validate, though it never names a sibling directly.

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 implied (parse an on-disk markdown file) rather than stated as explicit when/when-not guidance. There is no instruction on when to prefer this over get_qa or validate, so the agent must infer the fit from the verb.

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