Skip to main content
Glama

get_library_footprint

Inspect a KiCad library footprint to display pads, courtyard, attributes, and 3D model paths resolved from installed and project library tables.

Instructions

Show the content of a footprint of a KiCad library: pads, courtyard, attributes, 3D models.

The library comes from the library tables of the installed KiCad and of the project, as in the footprint chooser of KiCad. pcbnew of the installed KiCad reads the footprint, thus the values are those of KiCad. The tool finds the file of each 3D model as KiCad finds it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lib_id": "<lib_id>"
    },
    "name": "get_library_footprint"
  }
}

Input Schema

NameRequiredDescriptionDefault
lib_idYesThe library ID, for example "Resistor_SMD:R_0603_1608Metric".
project_pathNoOptional project (.kicad_pro, .kicad_sch, .kicad_pcb or its directory), to include its libraries and to set ${KIPRJMOD} for the 3D models.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does usefully disclose provenance: the library is resolved from the installed KiCad and project library tables exactly as the footprint chooser does, and values come from the installed pcbnew so they match KiCad. It does not state read-only behavior explicitly, nor what happens when a lib_id cannot be resolved or a library table entry is missing.

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?

The first sentence front-loads the verb, resource, and returned fields, and the following provenance sentences each carry real informational weight. Slightly verbose phrasing ("as in the footprint chooser of KiCad", "thus the values are those of KiCad") repeats the same point about KiCad fidelity.

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?

With an output schema present and full schema coverage, the description does not need to explain return values, and it adequately covers library resolution and 3D-model path handling. The main remaining gap is failure behavior for an unresolvable lib_id in a tool that has no annotations.

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?

Schema description coverage is 100%, so both lib_id (with an example) and project_path are fully documented in the schema; baseline 3 applies. The description adds only light reinforcement by explaining that the project contributes its libraries and that 3D model files are located the way KiCad locates them, which connects to project_path and ${KIPRJMOD} but adds no new parameter mechanics.

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?

States a specific verb ("Show") and resource ("footprint of a KiCad library") and enumerates exactly what is returned: pads, courtyard, attributes, 3D models. The resource noun "footprint" implicitly separates it from the symbol-oriented sibling get_library_symbol, but it never names an alternative, so differentiation is inferential rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool versus search_library_footprints, get_library_symbol, or render_library_item, and no exclusions or prerequisites beyond a lib_id being required. The agent must infer usage purely from the verb and the resource name.

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