Skip to main content
Glama
lucatib

kicad-mcp

by lucatib

run_kicad_script

Run Python code with KiCad's API pre-loaded to perform custom actions on live PCB or board files when built-in tools fall short.

Instructions

Execute Python with the KiCad API pre-imported. Use this for anything the curated tools do not cover.

Available names: kicad (live KiCad client), board (open board, or None), kipy, pcbnew, and sexpr for KiCad file parsing. Print output is captured; assign to result to return a value.

This runs arbitrary local code with your privileges. Do not import kipy.schematic - it is broken in kipy 0.7.1 and KiCad 10 has no schematic API anyway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeoutNo
Behavior5/5

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

With no annotations provided, the description carries the full burden of disclosure and does so well: it states that the tool runs arbitrary local code with the user's privileges, explains how print output is captured, and how to return a value via the 'result' variable. It also warns about a known broken import.

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 compact and front-loaded, with every sentence providing necessary information: purpose, usage, environment, return mechanism, and warnings. No filler or redundancy.

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?

Despite having no annotations or output schema, the description sufficiently covers the important behavioral aspects of a fallback script execution tool, including environment, return protocol, and safety considerations. Minor gaps like timeout semantics are partially covered by the schema default.

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?

The description provides context for the `code` parameter by listing available Python names and showing how to return values, but it does not explain the `timeout` parameter at all. With 0% schema description coverage, this gap is not fully compensated.

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 clearly states the tool executes Python with the KiCad API pre-imported, and explicitly frames it as a fallback for anything the curated tools do not cover. The verb 'Execute' and resource 'Python with the KiCad API' are specific and distinguish it from the sibling tools.

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?

It gives explicit when-to-use guidance: 'Use this for anything the curated tools do not cover,' implying curated tools should be preferred. It also provides a specific exclusion about kipy.schematic, making limitations clear.

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/lucatib/kicad-mcp'

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