Skip to main content
Glama
ProductOfAmerica

mcp-server-kicad

create_sym_lib_table

Destructive

Create a sym-lib-table file in the given directory.

Instructions

Create a sym-lib-table file in the given directory.

Each entry dict needs 'name' (the library nickname) and 'uri' (its path, usually
"${KIPRJMOD}/..."). Overwrites existing sym-lib-table if present. A backslash in a uri
is written as '/', as KiCad stores it.

The whole list is checked first. An entry that cannot be written as given refuses the
call, names the entry, and leaves any existing table as it was: an empty name; a name
holding a character below U+0020, a backslash or a colon (a library nickname cannot);
a name an earlier entry has; an empty uri; a double quote in a name or uri, or a line
end or NUL in a uri (KiCad 9 and KiCad 10 read these differently in a table).

Args:
    directory: Directory to write sym-lib-table in
    entries: List of dicts with 'name' and 'uri' keys

Input Schema

NameRequiredDescriptionDefault
entriesYes
directoryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.21.1
    • changedInput schema / $defs / LibTableEntry / description
      Previous value: -"One library row in a sym-lib-table."New value: +"One library row in a sym-lib-table: a nickname (not empty, none of a character below\nU+0020, a backslash, a colon or a double quote, and not one an earlier row has) and the\nlibrary's path."
  2. Changed4 schema fields changedv0.11.0
    • addedInput schema / $defs
      Added value: +{
      +  "LibTableEntry": {
      +    "description": "One library row in a sym-lib-table.",
      +    "properties": {
      +      "name": {
      +        "title": "Name",
      +        "type": "string"
      +      },
      +      "uri": {
      +        "title": "Uri",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "uri"
      +    ],
      +    "title": "LibTableEntry",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / entries / items / $ref
      Added value: +"#/$defs/LibTableEntry"
    • removedInput schema / properties / entries / items / additionalProperties
      Removed value: -true
    • removedInput schema / properties / entries / items / type
      Removed value: -"object"
  3. First observedv0.9.1

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=false) by disclosing the actual write semantics: the file is overwritten, backslashes in `uri` are normalized to '/', and validation is atomic — the whole list is checked first and any bad entry refuses the call while leaving the existing table untouched. That all-or-nothing guarantee is exactly the behavioral context an agent cannot get from `destructiveHint` 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 line, followed by overwrite/normalization notes and a dense but relevant validation paragraph, then a conventional Args block. The long single sentence enumerating invalid names is heavy but every clause maps to an actual rejection rule, so little is wasted.

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 two-parameter mutation with an output schema already present, everything an agent needs is covered: what is written, that it overwrites, how uris are normalized, which inputs are rejected and that rejection is non-destructive. Nothing material about invocation or failure is left unstated.

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 0% on the top-level properties, so the description must compensate, and it does: `directory` is the write target, `entries` is a list of dicts requiring 'name' and 'uri', and the validation paragraph enumerates the real constraints on a nickname (no empty, no control chars, backslash, colon, duplicate, no double quote) and on a uri (no line endings, NUL, or double quote). It stops short of showing a concrete example entry.

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?

A specific verb and resource: 'Create a sym-lib-table file in the given directory', which is a distinct artifact from the file/entry tools in the sibling list. It does not, however, explicitly distinguish itself from the nearby `create_symbol_library` sibling, so an agent must infer that this writes the table file itself rather than a library.

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

Usage Guidelines3/5

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

Usage is only implied: you call it when you need a sym-lib-table present in a directory, and the 'Overwrites existing sym-lib-table if present' line signals it is not for appending. There is no explicit when-to-use versus `create_symbol_library`, `add_lib_symbol`, or `list_lib_symbols`, and no stated prerequisites (e.g. whether the directory must already exist or be a KiCad project).

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