Skip to main content
Glama

set_symbol_attributes

Write the attributes of placed symbols, as the Symbol Properties dialog of KiCad 10 sets them: "Do not populate" (dnp), "Exclude from bill of materials", "Exclude from board", "Exclude from position files" and "Exclude from simulation".

Instructions

Write the attributes of placed symbols, as the Symbol Properties dialog of KiCad 10 sets them: "Do not populate" (dnp), "Exclude from bill of materials", "Exclude from board", "Exclude from position files" and "Exclude from simulation".

The tool writes each attribute into each unit of the reference. KiCad 10.0.6 gives the other units the same DNP and Exclude from BOM, board and position files, but not Exclude from simulation (it keeps that one for each unit): the tool sets each unit, as the dialog on each unit does. The tool changes only the attributes. The OK of the dialog also copies the fields of the unit (not the Reference) to the other units (SCH_SYMBOL::SyncOtherUnits). The tool does not copy the fields: units with different fields keep them (set_symbol_fields changes the fields).

With a variant (KiCad 10), the tool writes the attributes of that variant: a value equal to the attribute of the symbol is no differential, and KiCad writes no variant with no differentials. A change of an attribute of the symbol does not change the variants: KiCad keeps the old value in each variant (the variant starts with the attributes of the symbol when KiCad loads the file), thus the file then has the old value as a token of each variant. This is correct, not a defect.

A symbol in a sheet that the hierarchy uses more than one time has one set of attributes for all its references (U201 and U301): give the same attributes for each of these references, or write different attributes through a variant.

The tool checks all changes and all files first, and writes no file when a check fails. It writes all files or no file. KiCad must not have the files open. A schematic file of the project with an older version than the installed KiCad writes is an error: the user converts it in KiCad first. The tool refuses a reference that is not annotated (U?), a duplicate reference, a variant that the project does not have, an attribute name that it does not know, a symbol with no token for an attribute to change (KiCad 10 writes the five tokens: save the schematic in KiCad first), a token whose value is not yes or no, the variants of an instance that are not next to each other, a file that KiCad loads under more than one name, and a project whose full sheet hierarchy the tool cannot read. 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": {
      "schematic_path": "<schematic_path>",
      "changes": "<changes>"
    },
    "name": "set_symbol_attributes"
  }
}

Input Schema

NameRequiredDescriptionDefault
changesYesOne item for each reference (and variant): the reference, the attributes to set (a missing attribute does not change), and the variant name (empty: the symbol).
schematic_pathYesA .kicad_sch file of the project. The tool finds the references in the full project.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: all-or-nothing atomic writes after pre-checking every change and file, the requirement that KiCad not have files open, version gating, and an enumerated list of refusal conditions (unannotated U?, duplicate reference, unknown variant/attribute, missing token, non-yes/no token, non-contiguous variants, ambiguous file names). It also discloses non-obvious semantics: per-unit propagation of DNP/BOM/board/position but not simulation, no field copying, and variant tokens retaining old values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but the prose is long and meandering, with redundancies ("The tool changes only the attributes" repeats the earlier statement) and editorial asides like "This is correct, not a defect." The dense error enumeration is valuable, yet several sentences could be tightened without losing information.

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 mutating tool with no annotations, the description covers preconditions, failure modes, atomicity, variant behavior, and multi-instance references; an output schema exists, so return values need not be described. An agent has everything needed to call it correctly.

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, but the description adds real meaning: a missing attribute does not change anything, the same attributes must be given for every reference of a multi-instantiated sheet symbol (U201/U301), and the variant parameter selects variant-level versus symbol-level attributes. This goes beyond the schema's per-field one-liners.

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 opening sentence gives a specific verb and resource ("Write the attributes of placed symbols") and enumerates the exact five attribute tokens from the KiCad Symbol Properties dialog. It explicitly demarcates itself from set_symbol_fields, so an agent can separate the two without opening either schema.

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?

States the usage condition (write attributes, not fields) and names the alternative, set_symbol_fields, for field changes. It also gives prerequisites (KiCad 10.0 installed, files closed, schematic saved in KiCad first) and the variant route for per-reference differences. It lacks an explicit negative case such as when to prefer a variant over direct writes beyond a brief mention.

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