Skip to main content
Glama

import_spec

Translates a controlled-vocabulary product spec into per-peripheral design parameters for design_framework, then cross-checks it against an imported netlist to flag conflicts and unresolved intents.

Instructions

Translate a controlled-vocabulary product spec (human/product terms) into the per-peripheral design params design_framework consumes, and cross-check it against the imported netlist. This is the upstream guard the pipeline lacked: instead of hand-writing HAL macros, supply intent -- UART framing '8N1', direction 'txrx', flow_control 'rtscts'; SPI role 'master', spi_mode 0..3, data_size, bit_order; I2C speed 'fast', addressing '7bit'; ADC resolution 12, conversion 'continuous'; a timer update_hz; plus dma / interrupt / priority opt-ins -- and the machine expands it deterministically (8E1 -> UART_WORDLENGTH_9B + UART_PARITY_EVEN, honoring HAL's parity-bit-in-word-length rule). A peripheral named in the spec but absent from the netlist is a conflict; an intent key or value the machine does not model is surfaced as unresolved -- never guessed. Then design_framework(from_spec=true) builds the plan from the translated params. Import a netlist first so the spec is cross-checked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specNoPer-peripheral intent, e.g. {'USART1': {'baud': 115200, 'framing': '8N1', 'direction': 'txrx'}, 'ADC1': {'resolution': 12, 'conversion': 'continuous', 'dma': true}}.
sessionNoTarget session id (default 'default').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare this is a mutation (readOnlyHint=false) that is non-destructive and non-idempotent. Beyond that, the description adds real behavioral context: deterministic expansion, a named-but-absent peripheral being a 'conflict,' unmodeled intent surfaced as 'unresolved -- never guessed.' It stops short of describing the returned conflict/unresolved payload, but it substantially enriches the annotation profile.

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?

Front-loaded with purpose and workflow, and the prerequisite/downstream sequencing bookends the text well. It is dense with examples and slightly verbose, but nearly every clause conveys new vocabulary or behavior rather than padding.

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 mutating tool with no output schema, the description covers the translation contract, conflict/unresolved handling, prerequisite import, and downstream consumption. It does not state the exact response shape (e.g., what the unresolved/conflict report looks like), which is the main residual gap.

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 100%, so the baseline is 3. The description goes beyond the schema's single example, enumerating the accepted vocabulary per peripheral type (framing, direction, flow_control, spi_mode, data_size, resolution, conversion, update_hz, dma/interrupt/priority opt-ins) and the HAL expansion rule. This meaningfully clarifies the opaque 'spec' object.

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 and resource: translate a controlled-vocabulary product spec into per-peripheral design params and cross-check against the netlist. It explicitly distinguishes itself from its siblings import_netlist (prerequisite) and design_framework (downstream consumer), so an agent can tell them apart without opening schemas.

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

Usage Guidelines5/5

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

Gives explicit ordering: 'Import a netlist first so the spec is cross-checked,' and names the downstream call 'design_framework(from_spec=true) builds the plan from the translated params.' The when-to-use context and the alternative route are both stated, leaving little to inference.

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