feat: add export_ipcd356 tool (kicad-cli, IPC-D-356 netlist)
New MCP tool `export_ipcd356` wrapping `kicad-cli pcb export ipcd356`: generates an IPC-D-356 bare-board electrical-test netlist for flying-probe and bed-of-nails testers. Minimal option set (outputPath + boardPath only, matching the subcommand's --help). Self-contained interface handler reading the saved .kicad_pcb. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -534,5 +534,29 @@ export function registerExportTools(server: McpServer, callKicadScript: CommandF
|
||||
},
|
||||
);
|
||||
|
||||
// ------------------------------------------------------
|
||||
// Export IPC-D-356 Netlist Tool (kicad-cli)
|
||||
// ------------------------------------------------------
|
||||
server.tool(
|
||||
"export_ipcd356",
|
||||
"Generate an IPC-D-356 bare-board electrical-test netlist via kicad-cli. Consumed by flying-probe and bed-of-nails testers. Reads the last SAVED state of the .kicad_pcb.",
|
||||
{
|
||||
outputPath: z.string().describe("Output .ipc / netlist file path"),
|
||||
boardPath: z.string().optional().describe("Path to the .kicad_pcb (default: current board)"),
|
||||
},
|
||||
async (args) => {
|
||||
logger.debug(`Exporting IPC-D-356 netlist to: ${args.outputPath}`);
|
||||
const result = await callKicadScript("export_ipcd356", args);
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: JSON.stringify(result),
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
logger.info("Export tools registered");
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ export const toolCategories: ToolCategory[] = [
|
||||
"export_drill",
|
||||
"export_ipc2581",
|
||||
"export_odb",
|
||||
"export_ipcd356",
|
||||
"export_pdf",
|
||||
"export_svg",
|
||||
"export_3d",
|
||||
|
||||
Reference in New Issue
Block a user