Skip to main content
Glama

Parse System Requirements Specification

parse_sysrs

Parses a System Requirements Specification markdown file from disk into a structured document and returns a validation result for parse failures instead of raising an error.

Instructions

Parse a System Requirements Specification markdown file (YAML frontmatter + body) from disk into a structured :class:~biz.dfch.specmgr.sysrs.models.v1.SysrsDocument. 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 System Requirements Specification base directory: a file in the flat docs/sysrs/ directory parses canonical (no heading-mapping table); a file in a direct two-letter docs/sysrs/{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 / SysrsFrontmatter / properties / status / enum
      Added value: +[
      +  "active",
      +  "approved",
      +  "draft",
      +  "retired",
      +  "review"
      +]
  2. 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 provided, the description carries the full burden and does substantial work: it discloses that parse failures return a non-raising ValidateResult with valid=False and a 300-char error message, that missing/unreadable paths still raise OSError-family exceptions, and that an unknown language table raises ValueError. It stops short of stating that the operation is read-only and side-effect free, which an agent would still have to assume.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is valuable but delivered as one dense paragraph salted with internal references (ADR UUIDs, 'feat-110', 'GitHub issue #204', 'case 5 of the ADR ... workaround chain') that add no decision-relevant information for an agent. The core behavioral facts are buried mid-paragraph rather than front-loaded.

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, and the description nonetheless covers the success path, the soft-failure path, the hard-failure path, and the path-based language resolution. The remaining gap is small but real: no statement of read-only behavior or of what the caller should do with a valid=False result.

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%, so the description must compensate, and it does: the single 'path' parameter is given real semantics via the base-directory-relative rules (flat docs/sysrs/ = canonical, docs/sysrs/{language}/ = language table, anything else = canonical). What it never states is whether the path is absolute or relative to that base directory, which is the one detail an agent most needs.

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?

The first sentence states a specific verb ('Parse') and resource ('System Requirements Specification markdown file ... from disk') and names the concrete return type (SysrsDocument). It does not, however, distinguish this from sibling readers like get_sysrs or list_sysrs, so an agent must infer that this one is the disk-to-model parser.

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 description makes clear this is the tool that turns an on-disk file into a model, and the language-directory rules tell you where the path may live. There is no explicit 'use this instead of X' routing against get_sysrs/validate, and no statement of prerequisites or when a caller should prefer another tool.

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