Skip to main content
Glama

Query a KiCad file's structure

query_design
Read-onlyIdempotent

Use to read a KiCad file as STRUCTURE rather than text: pass a file path from list_board_files and a select path of node names from the root, and get the matching nodes back as data. For example select ["kicad_pcb","layers"] for the layer stack, ["kicad_pcb","footprint"] for the footprints, ["kicad_pcb","via"] / ["kicad_pcb","segment"] for raw via and track nodes, ["kicad_pcb","zone"] for copper pours, ["kicad_sch","lib_symbols"] for symbol definitions, or use read_file for JSON .kicad_pro design rules and net classes. Far cheaper and more reliable than reading a multi-megabyte board as raw text with read_file. For schematic CONNECTIVITY prefer read_schematic; for copper nets, vias and pads prefer read_pcb. Use this for what those two do not carry (zones, stackup details, footprint properties, design rules).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe exact file path within the board, as returned by list_board_files. Do not guess.
boardYesA board: handle/slug or a boardrepo.com URL. Use search_boards for public boards or list_my_boards for personal and authorised organisation boards. Do not invent references.
depthNoHow many levels of children to expand (default 2). Keep it small: a deep expansion of a large board is a large response.
cursorNoOpaque pagination cursor from a previous call; pass to fetch the next page of matches.
selectYesNode names from the root downward, e.g. ["kicad_pcb","layers"], ["kicad_pcb","via"], ["kicad_pcb","zone"], or ["kicad_sch","lib_symbols","symbol"]. The first entry is the file's root node.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
pathYes
selectYes
matchesYes
nextCursorYes
hasNextPageYes
totalMatchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / select / description
      Previous value: -"Node names from the root downward, e.g. [\"kicad_pcb\",\"layers\"] or [\"kicad_sch\",\"lib_symbols\",\"symbol\"]. The first entry is the file's root node."New value: +"Node names from the root downward, e.g. [\"kicad_pcb\",\"layers\"], [\"kicad_pcb\",\"via\"], [\"kicad_pcb\",\"zone\"], or [\"kicad_sch\",\"lib_symbols\",\"symbol\"]. The first entry is the file's root node."
  2. Changed1 schema field changed
    • changedInput schema / properties / board / description
      Previous value: -"A public board: handle/slug (e.g. alice/keezyboost40) or a boardrepo.com URL. Discover it with search_boards; do not invent one."New value: +"A board: handle/slug or a boardrepo.com URL. Use search_boards for public boards or list_my_boards for personal and authorised organisation boards. Do not invent references."
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the description does not need to restate safety. It adds useful behavioral context: the tool returns matching nodes as data, is cheaper and more reliable than raw text reads for large boards, and has depth-expansion costs worth controlling. This goes beyond the annotations without contradicting them.

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 long but densely useful: core usage is front-loaded, followed by concrete examples and explicit sibling-tool routing. Every sentence contributes to correct selection or invocation, and no space is wasted on restating obvious schema details.

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?

Given the full schema coverage, output schema presence, and rich annotations, the description covers what the tool does, when to use it, which siblings to prefer for other cases, and how to use the critical parameters. Nothing essential for an agent to invoke this tool correctly is missing.

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 description coverage is 100%, so the schema already documents all parameters. The description adds value by giving concrete select path examples, tying path to list_board_files, and warning that depth expansion should be kept small. This is meaningful enrichment beyond the schema.

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 states a specific verb and resource: query/read a KiCad file as structured data rather than raw text. It explicitly contrasts with read_file, read_schematic, and read_pcb, so an agent can distinguish this tool from siblings without opening schemas.

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?

The description provides explicit when-to-use guidance and names alternatives: use read_file for JSON .kicad_pro design rules, read_schematic for connectivity, read_pcb for copper nets/vias/pads, and this tool for zones, stackup, footprint properties, and design rules. It also tells the agent where to get the file path (list_board_files).

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.