Skip to main content
Glama

Parse use case

parse_uc

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…

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(). The file's language is derived from its path position relative to the use case base directory: a file in the flat docs/uc/ directory parses canonical (no heading-mapping table); a file in a direct two-letter docs/uc/{language}/ subdirectory parses through that language's table (an actionable ValueError when no table exists for the language); any other location parses canonical.

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.37.0
    • addedOutput schema / $defs / UcFrontmatter / properties / status / enum
      Added value: +[
      +  "accepted",
      +  "deprecated",
      +  "draft",
      +  "proposed",
      +  "superseded"
      +]
  2. First observedv0.36.0

TDQS

A3.7/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 parse failure returns a non-raising ValidateResult with valid=False and a 300-char-capped error message, that absent/unreadable paths still raise OSError-family errors from Path.read_text(), and that no language table yields an actionable ValueError. The one gap is whether parsing has any side effect (e.g. indexing or persistence), which is left unstated.

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 core purpose is front-loaded in the first sentence, which is good. However the remainder is a single dense paragraph freighted with ADR UUIDs, a GitHub issue number, and feature tickets ('feat-110', 'case 5 of the ADR ... chain') that add provenance but little decision-relevant meaning for an agent, diluting the operational content.

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 explained, yet the description still covers the notable result-shape exception (ValidateResult) and the error taxonomy. Path routing and failure modes are both addressed, making it largely complete for a one-parameter read tool; only the absence of side-effect disclosure and absolute/relative path guidance leave a small hole.

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?

Schema coverage is 0% and the schema is a bare required string 'path', so the description must compensate, and it largely does: it explains the base-directory-relative semantics of the path (flat docs/uc/ = canonical, docs/uc/{language}/ = table-driven, anything else = canonical). It does not give concrete path format examples or say whether the path is absolute or relative, which keeps it below a 5.

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 use-case markdown file (YAML frontmatter + body) from disk into a structured document.' That is unambiguous and separable from create_uc/get_uc by naming the disk-file source and the structured-document output. It stops short of an explicit contrast with the get_uc/validate siblings, so not a 5.

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 rather than stated: the tool is for turning on-disk use-case markdown into a document, and the language-table routing rules tell you which paths behave how. There is no explicit 'use this when X instead of get_uc/validate' routing, and no stated prerequisite about when a caller would want parse versus get.

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