Skip to main content
Glama

Parse verification case record

parse_vcr

Parse a verification case record markdown file from disk into a structured VcrDocument. If an existing file fails to parse, return a non-raising validation result instead of raising errors.

Instructions

Parse a verification case record markdown file (YAML frontmatter + body) from disk into a structured :class:~biz.dfch.specmgr.vcr.models.v1.VcrDocument. 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

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: it discloses that a malformed existing file yields a non-raising ValidateResult (valid=False, message capped at 300 chars) while an absent/unreadable path still raises OSError-family errors. This is exactly the failure-mode context an agent needs and is not derivable from the schema.

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?

Front-loaded with the purpose, which is good, but the body is a dense run-on sentence packed with internal identifiers (ADR UUIDs, GitHub issue #204, feat-110) that add little for an agent selecting or invoking the tool. The error-semantics content earns its place; the ADR/issue citations do not.

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?

An output schema exists, so return values need not be explained, and the description still covers the behavioral contract (non-raising result vs raised exceptions) that structured fields omit. For a one-parameter parse tool with no annotations, this is complete enough for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single required parameter with 0% schema coverage, so the description must compensate. It does add meaning: 'from disk' and the explicit discussion of what a 'truly-absent or unreadable path' triggers tells the agent how the path argument behaves on failure. It never states the expected path format (relative vs absolute), keeping it just short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Parse), a concrete resource (a verification case record markdown file with YAML frontmatter + body), and the return type (a VcrDocument), and clarifies it reads 'from disk'. This distinguishes it from siblings like get_vcr (retrieval) and parse_tsk/parse_gol (other document types) without opening any schema.

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 by the 'from disk' phrasing and the parse_* sibling pattern, but the description never states when to prefer parse_vcr over get_vcr, list_vcr, or validate. No explicit exclusions or prerequisites for callers are given.

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