Skip to main content
Glama

add_library_to_table

Add a KiCad library that exists to the project library table, as the table dialog of KiCad 10 does.

Instructions

Add a KiCad library that exists to the project library table, as the table dialog of KiCad 10 does.

The library must be of the KiCad format: a .kicad_sym file or a folder with .kicad_sym files (symbols), a folder with .kicad_mod files (footprints). The tool refuses other formats. A nickname that the project table has is an error. A nickname of the global table gives a warning: the project row hides the global library. A library of an older file version gives a warning with the step for its upgrade; a library of a newer file version is an error. KiCad must not have the project open. The installed KiCad must be KiCad 10.0.

The URI of the new row has a path variable of KiCad when its folder holds the library (the variable with the most folder levels), else ${KIPRJMOD} when the project folder holds it, else the absolute path (NormalizePath). As the table dialog, the tool writes some characters of the nickname as escapes, for example ":" as "{colon}".

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": {
      "project_path": "<project_path>",
      "kind": "<kind>",
      "library_path": "<library_path>"
    },
    "name": "add_library_to_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes"symbol" or "footprint".
nicknameNoThe nickname in the table. Default: the name of the library with no extension, as KiCad gives it.
descriptionNoThe description of the row.
library_pathYesThe library file or folder: an absolute path, or a path relative to the project folder.
project_pathYesThe .kicad_pro file or the project folder.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the whole burden and does so well: it maps each validation outcome to a severity (duplicate project nickname = error, duplicate global nickname = warning with masking explanation, older file version = warning, newer = error). It also specifies side effects — how the row's URI path variable is chosen and that certain nickname characters are written as escapes — which an agent could not guess from the schema alone.

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?

Purpose is front-loaded in the first sentence, then validation rules, then path/escape behavior in a logical order. It is dense and the closing paragraph on path-variable selection is niche, but every sentence carries behavioral information rather than filler.

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?

For a mutation tool with no annotations, the description covers preconditions, format validation, error vs warning outcomes, and row-construction side effects; return values are handled by the output schema. An agent has essentially everything needed to call it correctly or know it will be refused.

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 100%, so the baseline is 3, and the description adds real meaning on top: it explains the nickname collision semantics (project error vs global warning) and constrains library_path to specific KiCad formats, which the schema does not state. The 'kind' parameter is not expanded beyond the schema's 'symbol' or 'footprint'.

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 — adding an existing KiCad library to the project library table, mirroring the KiCad 10 table dialog. The phrase 'a KiCad library that exists' implicitly separates it from creation tools such as create_project_library, but no sibling is named explicitly, so an agent must infer the boundary.

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?

Preconditions are concrete: the library must be .kicad_sym or .kicad_mod, KiCad 10.0 is required, and the project must not be open in KiCad. These effectively say when the tool applies and when it will refuse, though it never names an alternative tool to use instead.

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

Deploy Server

Other Tools