Skip to main content
Glama

sch_set_component_part_id

Sets the active sub-part (gate) for a multi-part schematic component; uses location to disambiguate shared designators and refuses ambiguous matches.

Instructions

Switch the active sub-part on a multi-part schematic component.

Multi-gate parts like quad op-amps expose one sub-part per gate (U1A, U1B, U1C, U1D). CurrentPartID selects which one this symbol instance represents. IDs are 1-based.

A DESIGNATOR IS NOT UNIQUE HERE. Every sub-part of a multi-part device carries the same one, so "U13" can name three symbols on the sheet. When it names more than one and no location is given this REFUSES, and returns the candidates with their locations, current part ids and unique ids. It used to write whichever the iterator reached first and report success naming only the designator, so the caller could not tell which symbol changed.

Location is the discriminator because the alternatives do not work: two symbols can sit on the same part, and sub-parts of one physical device are supposed to SHARE a unique id.

Args: designator: Component reference (e.g., "U1"). part_id: Sub-part index, 1-based (1=A, 2=B, ...). A value above PartCount is accepted by Altium and does not take, so the result is read back and a mismatch is reported. location_x: Symbol X in mils, to choose one of several. location_y: Symbol Y in mils, to choose one of several.

Returns: Dict with success, designator, part_id, the location written and how many symbols carried the designator. On ambiguity, an AMBIGUOUS_DESIGNATOR error carrying candidates.

Input Schema

NameRequiredDescriptionDefault
part_idYes
designatorYes
location_xNo
location_yNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.9/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 disclosure burden and does so thoroughly: it is a mutation tool, it refuses on ambiguous designators instead of silently choosing, it returns candidates with locations/part ids/unique ids, it reads back part_id after writing to detect non-accepted values, and it reports how many symbols shared the designator.

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 definition is front-loaded with the core action, then ambiguity rules, then parameter details, so an agent can extract the key behavior quickly. It is somewhat lengthy due to the historical implementation note about old behavior, which is informative but could be tightened.

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 4-parameter mutation tool with no annotations and 0% schema description coverage, the description provides complete operational context, including return shape and ambiguity error behavior. The output schema exists, but the description still helpfully summarizes the return values and candidates payload.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does. It explains designator as a component reference with example 'U1', part_id as a 1-based sub-part index with Altium behavior above PartCount, and location_x/location_y as mils coordinates used to disambiguate among multiple symbols.

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 description states a precise verb and resource: 'Switch the active sub-part on a multi-part schematic component.' It immediately distinguishes multi-gate parts and explains that CurrentPartID selects the represented sub-part, so the agent knows exactly what this tool changes.

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

Usage Guidelines5/5

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

It gives explicit usage context for multi-gate parts like quad op-amps, warns that designators are not unique across sub-parts, and describes the ambiguity path and refusal behavior. It also explains why location_x and location_y are the discriminators instead of designator or unique id.

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