Skip to main content
Glama

design_synthesize_rules

Synthesize PCB design rules and stackup operations from a validated fab profile and design plan, tracing every width and impedance value to profile fields or IPC calculators.

Instructions

Synthesize PCB design rules + stackup ops from a fab profile.

Stage 8 of the autonomous flow (rules & stackup, reference/autonomy-roadmap.md): turn the validated fab profile, the plan's net classes, and a few board-level targets into the concrete pcb_create_design_rule and pcb_modify_layer parameter dicts, dispatched verbatim after pcb_create_net_class creates classes named after the synthesized groups. Every number traces to a profile field or a verified calculator (IPC-2221 width inverse, IPC-2141 impedance inverse); a rule whose inputs are missing is skipped with a note, never guessed. Pure Python, no Altium.

Args: profile: FabProfile as a dict (see design_load_fab_profile). plan_json: Optional DesignPlan (JSON string or dict). When given and net_class_map is not, net classes are derived from the plan (flags + net roles, naming-agnostic). net_class_map: Optional explicit {net_name: class} map; takes precedence over plan_json derivation. options: Optional synthesis targets: stackup (name, default first), class_current_a ({class: amps} -> per-class width rules), delta_t_c, track_margin, layer, copper_oz, geometry, diff_pair_target_ohms (required for differential rules), diff_pair_spacing_mils.

Returns: {"ok": True, "rules": [...], "stackup_ops": [...], "notes": [...], "stackup": name|None, "net_classes": {...}} -- rule values are INTEGER MILS -- or {"ok": False, "reason": "..."}.

Input Schema

NameRequiredDescriptionDefault
optionsNo
profileYes
plan_jsonNo
net_class_mapNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses that it is 'Pure Python, no Altium' (no live-app side effects), that rules with missing inputs are 'skipped with a note, never guessed,' and that output values are INTEGER MILS. It doesn't state idempotency or repeat-call behavior, which keeps it from a 5.

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?

Purpose is front-loaded in sentence one, followed by flow context, args, and returns in a scannable structure. The Returns block restates what the existing output schema already covers, which is some redundancy, and the roadmap reference is decorative 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 4-param tool with untyped nested objects and an output schema, the description supplies the missing parameter semantics, the upstream dependency (fab profile from design_load_fab_profile), and failure shape ({ok: false, reason}). What the FabProfile must contain is deferred to the sibling tool, which is reasonable but leaves a small gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and every parameter is opaque (nested objects with additionalProperties), yet the Args block defines all four, including the precedence rule between plan_json and net_class_map and the accepted sub-keys of `options` (stackup, class_current_a, delta_t_c, diff_pair_target_ohms as required for differential rules). This adds substantial meaning the schema cannot convey.

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?

Opens with a specific verb+resource+input: 'Synthesize PCB design rules + stackup ops from a fab profile.' It also names the concrete outputs it produces (pcb_create_design_rule and pcb_modify_layer parameter dicts), which cleanly distinguishes it from those sibling tools that actually apply rules.

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?

Places the tool explicitly in a workflow ('Stage 8 of the autonomous flow'), states dispatch ordering ('dispatched verbatim after pcb_create_net_class creates classes'), and gives precedence between plan_json and net_class_map. It stops short of explicitly naming when NOT to use it versus calling pcb_create_design_rule directly, so not a 5.

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