Skip to main content
Glama

Autonomous 0-DRC PCB Routing Foundry & Hardware MCP Server

Audit PCB DFM Fabrication Rules

audit_pcb_dfm_rules
Read-onlyIdempotent

Audit routed traces and arcs in a .kicad_pcb or .dsn board against commercial fab minimum trace width limits (JLCPCB, PCBWay, Sierra). Call before Gerber export or after manual edits. Accepts pcb_text or project_path plus fab_tier ('standard_2l', 'standard_4l', 'fine_hdi'). Returns JSON dfm_passed and min_observed_trace_width_mm. Example: fab_tier='standard_4l'.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fab_tier": "standard_4l",
      "project_path": "board.kicad_pcb"
    },
    "name": "audit_pcb_dfm_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
fab_tierNoTarget fabrication rule tier (standard_2l, standard_4l, or fine_hdi).standard_2l
pcb_textNoRaw UTF-8 .kicad_pcb or .dsn text with routed copper.
project_pathNoLocal filesystem path to .kicad_pcb or .dsn (STDIO mode).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / fab_tier / description
      Previous value: -"Target fabrication capability tier: 'standard_2l' (0.127 mm / 5 mil), 'standard_4l' (0.090 mm / 3.5 mil), or 'fine_hdi' (0.075 mm / 3 mil)."New value: +"Target fabrication rule tier (standard_2l, standard_4l, or fine_hdi)."
    • changedInput schema / properties / fab_tier / examples
      Previous value: -[
      -  "standard_2l",
      -  "standard_4l",
      -  "fine_hdi"
      -]New value: +[
      +  "standard_4l"
      +]
    • changedInput schema / properties / pcb_text / description
      Previous value: -"Raw UTF-8 .kicad_pcb or Specctra .dsn file content containing routed '(segment ... (width ...))' or '(arc ...)' elements in millimeters (mm)."New value: +"Raw UTF-8 .kicad_pcb or .dsn text with routed copper."
    • changedInput schema / properties / pcb_text / examples
      Previous value: -[
      -  "(kicad_pcb (version 20240108) (generator \"pcbnew\") ...)"
      -]New value: +[
      +  "(kicad_pcb (version 20240108))"
      +]
    • changedInput schema / properties / project_path / description
      Previous value: -"Local filesystem path to a .kicad_pcb or .dsn file when running in local STDIO mode. Example: 'board.kicad_pcb'."New value: +"Local filesystem path to .kicad_pcb or .dsn (STDIO mode)."
    • changedInput schema / properties / project_path / examples
      Previous value: -[
      -  "board.kicad_pcb",
      -  "2l_rp2040"
      -]New value: +[
      +  "board.kicad_pcb"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / fab_tier / examples
      Added value: +[
      +  "standard_2l",
      +  "standard_4l",
      +  "fine_hdi"
      +]
    • addedInput schema / properties / pcb_text / examples
      Added value: +[
      +  "(kicad_pcb (version 20240108) (generator \"pcbnew\") ...)"
      +]
    • addedInput schema / properties / project_path / examples
      Added value: +[
      +  "board.kicad_pcb",
      +  "2l_rp2040"
      +]
  3. Changed4 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / fab_tier / description
      Previous value: -"Fab rule tier."New value: +"Target fabrication capability tier: 'standard_2l' (0.127 mm / 5 mil), 'standard_4l' (0.090 mm / 3.5 mil), or 'fine_hdi' (0.075 mm / 3 mil)."
    • changedInput schema / properties / pcb_text / description
      Previous value: -"Raw .kicad_pcb or .dsn content."New value: +"Raw UTF-8 .kicad_pcb or Specctra .dsn file content containing routed '(segment ... (width ...))' or '(arc ...)' elements in millimeters (mm)."
    • changedInput schema / properties / project_path / description
      Previous value: -"Path to .kicad_pcb or .dsn file."New value: +"Local filesystem path to a .kicad_pcb or .dsn file when running in local STDIO mode. Example: 'board.kicad_pcb'."
  4. Changed4 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "fab_tier": "standard_4l",
      -    "pcb_text": "(kicad_pcb (version 20240108))"
      -  }
      -]New value: +[
      +  {
      +    "fab_tier": "standard_4l",
      +    "project_path": "board.kicad_pcb"
      +  }
      +]
    • removedInput schema / properties / fab_tier / examples
      Removed value: -[
      -  "standard_4l"
      -]
    • removedInput schema / properties / pcb_text / examples
      Removed value: -[
      -  "(kicad_pcb (version 20240108))"
      -]
    • removedInput schema / properties / project_path / examples
      Removed value: -[
      -  "board.kicad_pcb"
      -]
  5. Changed7 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "fab_tier": "standard_4l",
      +    "pcb_text": "(kicad_pcb (version 20240108))"
      +  }
      +]
    • changedInput schema / properties / fab_tier / description
      Previous value: -"Target fabrication rule tier ('standard_2l', 'standard_4l', or 'fine_hdi')"New value: +"Fab rule tier."
    • addedInput schema / properties / fab_tier / examples
      Added value: +[
      +  "standard_4l"
      +]
    • changedInput schema / properties / pcb_text / description
      Previous value: -"Raw `.kicad_pcb` or `.dsn` file content"New value: +"Raw .kicad_pcb or .dsn content."
    • addedInput schema / properties / pcb_text / examples
      Added value: +[
      +  "(kicad_pcb (version 20240108))"
      +]
    • changedInput schema / properties / project_path / description
      Previous value: -"Local path to `.kicad_pcb` or `.dsn` file"New value: +"Path to .kicad_pcb or .dsn file."
    • addedInput schema / properties / project_path / examples
      Added value: +[
      +  "board.kicad_pcb"
      +]
  6. Changed1 schema field changed
    • addedInput schema / properties / fab_tier / description
      Added value: +"Target fabrication rule tier ('standard_2l', 'standard_4l', or 'fine_hdi')"
  7. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), so the bar is lower; the description still adds what the annotations cannot, namely the two accepted input forms (pcb_text vs project_path, the latter STDIO-only per schema) and the returned fields. It does not state failure behavior or how the three fab rule sets differ in practice.

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?

Four short sentences, front-loaded with purpose, then timing, then inputs, then return values and an example. Nothing is redundant with the title or schema beyond what is needed for quick selection.

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?

With no output schema, the description usefully names the two return fields (dfm_passed, min_observed_trace_width_mm), so an agent knows what to expect. Complete for a single-purpose read-only audit, though it omits what happens when no traces are found or when both pcb_text and project_path are supplied.

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 100%, so all three parameters and the fab_tier enum are already documented structurally. The description restates the tier names and gives a usage example but adds no new meaning about how tiers change thresholds.

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: audit routed traces and arcs in a .kicad_pcb or .dsn board against minimum trace width limits from named commercial fabs (JLCPCB, PCBWay, Sierra). This is concrete enough that an agent can distinguish it from impedance/stackup or routing siblings without opening the schema.

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?

Gives explicit timing guidance ('Call before Gerber export or after manual edits'), which tells the agent where this fits in a workflow. It does not explicitly contrast with siblings such as the pre-route RF/fab stackup audit, leaving some ambiguity about which fab check to run first.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.