Skip to main content
Glama
rjwalters

openkonnect

by rjwalters

run_kct_handoff

Destructive

Runs an allow-listed kicad-tools write command on the open KiCad board through a handoff: check session, save when allowed, enforce timeout, and reload only after a successful file change.

Instructions

Run one allow-listed kicad-tools write command (kct) on the board open in KiCad, following the handoff protocol: check the session, save the editor (allow_save=true is needed when dirty state is unknown, as on KiCad 10), run the command with a timeout, then reload the editor from the file only if the command succeeded and changed it. An edit made in KiCad while the command ran makes the reload refuse with document_dirty, and nothing is lost; discard_unsaved=true reloads anyway and discards that edit. command is an argv list without 'kct', and must contain the token {board}, which is replaced by the board's path, e.g. ["route", "{board}", "-o", "{board}"]. Board only on KiCad 10.

Input Schema

NameRequiredDescriptionDefault
commandYes
documentsNo
timeout_sNo
allow_saveNo
discard_unsavedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds real operational context beyond them: the reload refuses with document_dirty when an edit races the command and nothing is lost, discard_unsaved discards that edit, and only allow-listed commands are accepted. It also surfaces the KiCad 10 board-path constraint, which is the kind of gotcha annotations cannot express.

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?

Front-loaded with the core action, then the protocol, then parameter detail. The prose is dense but each clause carries a real constraint (document_dirty behavior, version caveat). The second sentence is long enough that the argument example has to be parsed out of a run-on.

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 destructive, multi-step external-command tool with no output schema, the description covers ordering, failure modes, and the concurrency hazard. What remains thin is the return shape (no output schema and no statement of what comes back on success vs. a refused reload) and the undocumented `documents` parameter.

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

Parameters4/5

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

Schema coverage is 0%, so the description has to carry the parameters. It covers command thoroughly (argv list without 'kct', must contain the {board} token, worked example) and clarifies allow_save and discard_unsaved semantics. The `documents` parameter is never mentioned, and timeout_s is acknowledged only as 'a timeout' with no unit or default context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: run one allow-listed kicad-tools write command on the board open in KiCad, wrapped in a defined handoff protocol. That is distinguishable from the siblings (saving, syncing, session checking) by the fact it executes an external CLI command. It stops short of naming the sibling tools it sequences with, so a 4 rather than a 5.

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?

It gives the ordered handoff: check the session, save the editor, run the command, then reload only if the command succeeded and changed the file. It also states the conditions that select allow_save (dirty state unknown, as on KiCad 10) and discard_unsaved (accept losing a concurrent edit). No explicit 'use X instead of this tool' branching is given.

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