Skip to main content
Glama

Parse feature

parse_feat

Parse a feature markdown file with YAML frontmatter and body from disk into a structured FeatDocument. Returns a non-raising validation result for malformed files, while missing or unreadable paths still raise file-access errors.

Instructions

Parse a feature markdown file (YAML frontmatter + body) from disk into a structured :class:~biz.dfch.specmgr.feat.models.v1.FeatDocument. 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

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.37.0
    • addedOutput schema / $defs / AcceptanceCriterionItem / pattern
      Added value: +"^\\[( |x|X)\\]\\s*(.*)$"
    • addedOutput schema / $defs / FeatFrontmatter / properties / status / enum
      Added value: +[
      +  "done",
      +  "planning",
      +  "progress",
      +  "review"
      +]
    • addedOutput schema / $defs / FeatTaskItem / pattern
      Added value: +"^\\[( |x|X)\\]\\s*(.*)$"
  2. First observedv0.36.0

TDQS

A4.6/5.0
Behavior5/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 explicitly states that parse failures on an existing file return a non-raising ValidateResult with valid=False and a capped error message, while absent or unreadable paths raise OSError-family exceptions.

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?

The description is front-loaded with the core purpose and remains compact at two sentences. The second sentence is dense with internal ADR/issue identifiers that do not help an agent invoke the tool, but the actionable behavioral details are still present.

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 the description need not detail return values. It covers the key contextual gaps: success behavior, non-raising parse failure behavior, and file-access exceptions for missing or unreadable paths.

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 description coverage is 0% for the single path parameter, so the description must compensate. It clarifies that the parameter is a disk path to a feature markdown file and distinguishes existing-file parse failures from truly absent or unreadable paths, though it does not specify absolute versus relative path conventions.

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?

The description states a specific verb and resource: parse a feature markdown file from disk into a FeatDocument. It clarifies the source (disk path) and output type, which distinguishes it from retrieval-oriented siblings like get_feat.

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

Usage Guidelines4/5

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

The description gives clear context for use: it parses an existing feature markdown file from disk. It does not explicitly name alternatives such as get_feat or validate as when-to-use choices, but the file-based operation is clear from the wording.

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