Skip to main content
Glama

mfg_correct_cpl_rotations

Correct KiCad-exported CPL rotation values to match JLCPCB's SMT assembly requirements. Applies footprint-specific offsets from a lookup table and writes a corrected CSV for direct upload.

Instructions

Apply JLCPCB CPL rotation corrections to a KiCad-exported pick-and-place CSV.

KiCad exports component orientations relative to its own coordinate system, which differs from what JLCPCB's SMT assembly service expects. This tool reads a CPL CSV (produced by export_pos), applies per-footprint rotation offsets from the bundled jlcpcb_rotations.json table, and writes a corrected CSV ready for direct upload to JLCPCB.

Columns expected (KiCad default CPL export): Ref, Val, Package, PosX, PosY, Rot, Side

Args: cpl_csv_path: Path to the CPL CSV file (relative to project dir). output_path: Output path for the corrected CSV. Defaults to <stem>_jlcpcb_corrected.csv next to the input file. dry_run: If True, return a preview table without writing the file.

Returns: Summary of corrections applied, or a preview table for dry_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
output_pathNo
cpl_csv_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It clearly discloses that the tool reads a CSV, applies rotation offsets from a bundled table, and writes a corrected file. It also explicitly states that dry_run returns a preview without writing, which is a key behavioral side effect. It does not detail error conditions or overwrite behavior, but the core side effects are transparent.

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?

The description is well-organized with clear paragraphs and an Args section. Each sentence contributes essential information—input format, transformation logic, output destination, and return values. It is appropriately sized for the tool's complexity and avoids unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides everything an agent needs to select and invoke the tool correctly: purpose, workflow context, expected input columns, parameter meanings, and return behavior. The presence of an output schema reduces the need to describe return structures in detail, and the description still summarizes the return type. It is complete for this tool's complexity.

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 description coverage is 0%, so the description fully compensates by explaining each parameter: cpl_csv_path (required input), output_path (with default behavior), and dry_run (with effect). This adds meaning well beyond the bare schema property definitions and ensures correct invocation.

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 opens with a specific verb and resource: 'Apply JLCPCB CPL rotation corrections to a KiCad-exported pick-and-place CSV.' It clearly distinguishes itself from sibling export tools by focusing on correcting existing CPL files for JLCPCB, not merely exporting. The mention of 'direct upload to JLCPCB' further clarifies the exact purpose.

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?

The context is clearly implied: use this after a KiCad CPL export and before JLCPCB upload. It states what the tool does and its role in the workflow. However, it does not explicitly name alternative tools or state when not to use it, leaving some ambiguity about selection among similar manufacturing tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Valxyria/kicad-mcp-pro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server