Skip to main content
Glama

Parse use case

parse_uc

Parse a use-case markdown file with YAML frontmatter and body into a structured document. Invalid content returns a non-raising validation result; missing or unreadable paths raise file-access errors.

Instructions

Parse a use-case markdown file (YAML frontmatter + body) from disk into a structured document. 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

B3.4/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 does so well: it discloses that a parseable-but-invalid existing file returns a non-raising ValidateResult (valid=False, errors[].message capped at 300 chars) while a missing/unreadable path still raises OSError-family exceptions. That exception contract is exactly the kind of behavioral detail an agent needs and cannot get from the schema. It stops short of stating read-only/side-effect and permission context beyond file access.

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?

Purpose is front-loaded and the sentence count is low, but the second sentence is an over-stuffed run-on packed with ADR UUIDs, issue numbers, feat-110, and 'case 5 of the ADR ... workaround chain' provenance that does not help an agent select or invoke the tool.

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 explanation is not required, and the description still documents the two distinct failure modes. With one required parameter and a clear read-from-disk purpose, the only real omission is when to prefer this over sibling parse/get/list tools.

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 description coverage is 0% for the single `path` parameter, so the description must compensate. It does add meaning by implying a filesystem path read via Path.read_text() ('from disk', 'Path.read_text()'), which rules out slug/ID interpretation, but it gives no format detail (absolute vs relative, extensions). Modest but real compensation.

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 (parse), resource (use-case markdown file), source (from disk) and output (structured document), plus the expected file shape (YAML frontmatter + body). It implicitly separates itself from get_uc/list_uc/create_uc by being a disk-to-structure parser, but it never explicitly contrasts with the many parse_* siblings or names an alternative.

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 when-to-use / when-not-to-use guidance and no routing to alternatives such as get_uc, list_uc, or the generic validate tool. The only sibling mention ('the generic validate tool caps it') is about error formatting, not about choosing between tools.

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