Skip to main content
Glama

add_global_label

Add a global label to a component pin in a KiCad schematic, connecting nets by name across all project sheets.

Instructions

Add a global label on a pin of a component.

A global label connects the nets with its name in all sheets of the project.

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": {
      "file_path": "<file_path>",
      "reference": "<reference>",
      "pin": "<pin>",
      "label_name": "<label_name>"
    },
    "name": "add_global_label"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
pinYesThe pin number.
shapeNoThe electrical type of the label: "input" (default), "output", "bidirectional", "tri_state" or "passive". ERC uses it.input
file_pathYesThe .kicad_sch file.
referenceYesThe reference of the component, for example "U1".
label_nameYesThe name of the net.
snap_to_gridNoOnly for x and y. True: move the label to the nearest point of the connection grid of the project (default 1.27 mm), except on a connection point of the sheet (a pin, a wire, a label).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/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. It adds useful domain semantics — that the label propagates net connectivity across every sheet — but says nothing about whether the schematic file is modified in place, what happens if the reference/pin does not exist, whether an existing label is overwritten, or what errors can occur. For a mutation tool with zero annotation coverage, this is a meaningful gap.

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

Conciseness5/5

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

Two short sentences, front-loaded with the action and followed by the one piece of conceptual context an agent needs. No filler or repeated field information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the input schema covers most parameters. What is missing for a file-mutating tool is failure/side-effect context and routing against the label-type siblings, leaving the definition adequate but incomplete.

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?

Eight parameters with 75% schema description coverage means the schema already documents pin, file_path, reference, shape and snap_to_grid. The description mentions only that the label goes "on a pin of a component" and adds no meaning for x/y, label_name, shape, or snapping behavior beyond what the schema states. Baseline 3 applies.

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 names a specific verb and resource ("Add a global label on a pin of a component") and goes on to define what a global label is. It does not distinguish this tool from the closely related siblings add_label and add_hierarchical_label, so an agent cannot tell from the text alone which label type to pick.

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?

The second sentence ("connects the nets with its name in all sheets of the project") implicitly signals that this is for project-wide nets, which hints at when it is appropriate versus a local label. However, there is no explicit when-to-use, when-not-to-use, or named alternative, so the guidance is inferred rather than stated.

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