Skip to main content
Glama
egitiaec

MCP Spec Generator

by egitiaec

generate_spec

Convert User Story docs into {hu-name}-SPEC.md files in workspace/specs/ and return the path for development.

Instructions

Converts a User Story document into a SPEC_KIT formatted .md file named {hu-name}-SPEC.md and saves it to workspace/specs/. Returns the file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hu_nameNoName of the HU/US used for the file name (e.g. 'HU-016-whatsapp'). If omitted, it is extracted from the document content.
file_pathNoAbsolute path to a .docx, .pdf, .md or .txt file containing the User Story. Use this OR user_story_text, not both.
spec_numberNo3-digit spec number (e.g. '007'). If omitted, the next available number is used.
feature_slugNoShort slug for the feature folder name (e.g. 'pagos-online'). If omitted, it is inferred from the content.
user_story_textYesPlain text content of the User Story document. Use this OR file_path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/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 behavioral burden and does disclose key traits: it writes a file to workspace/specs/, follows a naming convention, and returns the path. It does not mention authentication needs, rate limits, or overwrite behavior (what happens if a file with the same name exists), leaving a residual gap.

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

Conciseness5/5

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

Two sentences, front-loaded with the core conversion behavior and then the side effect/return. Every clause earns its place with no repetition of the schema's field descriptions.

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?

For a 5-parameter file-generating tool with no output schema, the description covers purpose, destination, naming, and return value. It stops short of explaining overwrite behavior and permission requirements, but the core contract an agent needs is present.

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 100%, so the schema already explains all five parameters, including that file_path and user_story_text are alternatives. The description adds the {hu-name}-SPEC.md naming convention, which reinforces the hu_name semantics, but otherwise does not extend parameter meaning beyond the schema. Baseline 3 is appropriate.

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 specifies a concrete verb (converts), a source artifact (User Story document), a target format (SPEC_KIT formatted .md file), a naming convention ({hu-name}-SPEC.md), a destination (workspace/specs/), and a return value. This clearly distinguishes it from read_spec, list_specs, and get_spec_template, which read or list rather than generate.

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?

The description implies when to use it (when you have a User Story document to convert into a spec), but it never states when not to use it or how it differs from siblings such as get_spec_template. An agent could reasonably infer the context, but routing among get_spec_template, list_specs, and read_spec remains undocumented.

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