Skip to main content
Glama

delete_library_symbol

Delete a symbol from a project library, as "Delete" of the library tree of the symbol editor of KiCad 10 does.

Instructions

Delete a symbol from a project library, as "Delete" of the library tree of the symbol editor of KiCad 10 does.

KiCad deletes a symbol together with all symbols derived from it (also the derived symbols of a derived symbol). With delete_derived=False, a symbol with derived symbols is an error that gives their names. delete_derived=True deletes them all, as "Delete All Listed Symbols" of KiCad.

KiCad does not change the schematics that use a deleted symbol, and neither does the tool: the answer gives the placed symbols with a deleted lib_id as a warning. The schematic keeps its copy of each symbol, but an update from the library then fails.

The library must be a symbol library file of the project table, in the version of the installed KiCad (else: upgrade_project_libraries first). KiCad saves the library (kicad-cli), and a second save must give the same bytes. KiCad must not have the project open. The installed KiCad must be KiCad 10.0.

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>",
      "lib_id": "<lib_id>"
    },
    "name": "delete_library_symbol"
  }
}

Input Schema

NameRequiredDescriptionDefault
lib_idYesThe symbol, "<library>:<symbol>", of a library of the project table.
project_pathYesThe .kicad_pro file or the project folder.
delete_derivedNoTrue deletes the symbols derived from the symbol too.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so well: it discloses the cascade to derived symbols and derived-of-derived symbols, the error-with-names behavior when delete_derived=False, that schematics are left untouched but later library updates will fail, and the requirement that KiCad not have the project open. These are exactly the destructive side effects an agent must know before calling.

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 and its KiCad analogue, then preconditions, then side effects — a sensible order with no filler sentences. It is dense and multi-paragraph, and the closing note about kicad-cli re-saving to identical bytes is more implementation trivia than agent-relevant guidance.

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 destructive three-parameter tool with no annotations, the definition covers preconditions, cascade semantics, error behavior, and downstream consequences, and an output schema exists so return values need no further explanation. An agent has everything needed to invoke it correctly or abort.

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; the description earns more by explaining the distinct outcomes of delete_derived=False (error listing the derived symbol names) versus True (silent bulk delete, matching "Delete All Listed Symbols"), information the one-line schema entry does not convey. project_path and lib_id gain only the project-table constraint already echoed in 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?

States a specific verb and resource ("Delete a symbol from a project library") and anchors it to the exact KiCad UI action it mirrors, which cleanly separates it from delete_library_footprint and the rename_/copy_ symbol siblings without requiring the agent to open their schemas.

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?

Gives strong preconditions — the library must be a project-table symbol library file in the installed KiCad version, the project must be closed, and it explicitly routes to upgrade_project_libraries when the version does not match. It stops short of naming a non-destructive alternative (e.g. inspecting the symbol first with get_library_symbol) or stating when to prefer delete_derived=True, so it falls just short of a 5.

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