Skip to main content
Glama

lib_add_symbol_rectangle

Add a rectangle to the current symbol body before placing pins so filled shapes do not paint over pin names in the schematic symbol.

Instructions

Add a rectangle to the current symbol body.

ADD THE BODY BEFORE THE PINS. Altium exposes no z-order on schematic primitives, so drawing order is insertion order and there is no send-to-back to correct it afterwards. A rectangle given a fill_color is SOLID, and one added after the pins paints over the pin names; the only fix is rebuilding the symbol. Build order is body, then pins, then anything drawn on top.

Args: x1: First corner X in mils y1: First corner Y in mils x2: Opposite corner X in mils y2: Opposite corner Y in mils fill_color: Fill color index (-1 = no fill) border_color: Border color index

Returns: Dictionary confirming rectangle addition

Input Schema

NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
fill_colorNo
border_colorNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.3/5.0
Behavior4/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 well: it discloses that z-order equals insertion order, that a filled rectangle added after pins paints over pin names, and that the only remedy is rebuilding the symbol. It does not mention permissions or library-state prerequisites, which keeps it shy of a 5.

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?

The critical warning is front-loaded and the Args/Returns block is easy to scan. The middle paragraph restates the same z-order point three ways ('no z-order,' 'insertion order,' 'no send-to-back'), which is emphatic but slightly redundant.

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

Completeness4/5

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

For a 6-parameter mutation on a shared symbol body, it covers geometry units, fill semantics, ordering hazard, and the return value (an output schema also exists, so return detail is not required). The missing piece is the implicit prerequisite that a current component/symbol must be active first.

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 0%, so the description must compensate, and it does: every parameter is named with units (mils) for coordinates and a semantic for fill_color (-1 = no fill). border_color is described only as a 'color index' with no default or -1 semantics explained, which is the one remaining gap.

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 ('Add a rectangle to the current symbol body'), which cleanly separates it from siblings like lib_add_symbol_arc, lib_add_symbol_polygon, and lib_add_symbol_lines. An agent can identify the operation without opening the 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?

Gives explicit sequencing guidance ('ADD THE BODY BEFORE THE PINS' and 'build order is body, then pins, then anything drawn on top'), which is real when-to-use context. It stops short of naming alternative tools or stating a prerequisite like lib_set_current_component, so it is clear but not fully routed.

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