Skip to main content
Glama

Parse goal

parse_gol

Parse a goal markdown file (YAML frontmatter and body) from disk into a structured GolDocument, returning validation errors for malformed existing files instead of raising exceptions.

Instructions

Parse a goal markdown file (YAML frontmatter + body) from disk into a structured :class:~biz.dfch.specmgr.gol.models.v1.GolDocument. 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/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does so thoroughly: a parse failure on an existing file yields a non-raising ValidateResult (valid=False, single 300-char error message) rather than exceptions, while an absent/unreadable path still raises OSError-family errors. This precisely tells the agent what to expect on success and every failure path.

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, and the error-behavior detail genuinely earns its place. But the ADR UUIDs, feat-110, GitHub #204, and 'case 5 of the ADR ... workaround chain' references are implementation provenance that adds length without helping an agent select or call 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 documentation is not needed, and the description still usefully explains the failure-shaped return. Combined with the exception taxonomy it is largely complete for correct invocation; only path-format expectations remain unstated.

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 coverage is 0% and the single parameter (path) is documented only as 'string'. The description indirectly clarifies that path is a filesystem path read via Path.read_text(), which adds some meaning, but it does not state format, relative-vs-absolute expectations, or extensions.

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) plus resource (a goal markdown file with YAML frontmatter + body) and names the exact output type (GolDocument). An agent can immediately distinguish it from the many sibling parse_* tools (parse_tsk, parse_prb, parse_req, etc.) purely by document type.

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: use it to read a goal file off disk into a structured object, as opposed to get_gol (in-memory/retrieval) or create_gol. However, no alternative is named and no explicit when/when-not condition is given, so the agent has to infer the file-path vs other-source distinction.

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