Skip to main content
Glama

add_subcircuit_instance

Places a subcircuit instance at specified coordinates, returning its ports keyed by pin labels so you can wire it into the parent circuit. Finish defining the subcircuit's pins first.

Instructions

Place an instance of another circuit of this project (east-facing, default appearance). Returns its ports keyed by the subcircuit's pin labels: input pins (facing east) on the west edge, output pins on the east edge, each top-to-bottom in the subcircuit's pin y order. Finish the subcircuit's pins before placing.

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": {
      "path": "<path>",
      "subcircuit": "<subcircuit>",
      "x": "<x>",
      "y": "<y>"
    },
    "name": "add_subcircuit_instance"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
pathYes
labelNo
circuitNo
subcircuitYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 much of it: it discloses the default orientation, the default appearance, the shape of the return value (ports keyed by pin labels), and edge/ordering semantics of the returned ports. It omits error behavior (e.g. what happens if the subcircuit has unpinned or duplicate pins) and whether placement is undoable, which keeps it below 5.

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?

Three compact sentences, front-loaded with the action and its defaults, then the return contract, then the precondition. The port-ordering detail is dense but operationally necessary and nothing is redundant.

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?

The description compensates well for the absence of an output schema by describing the returned port map, and it flags the key precondition. It is still incomplete for a 6-parameter mutation tool with zero annotation and zero schema-description coverage, since five parameters are left semantically undefined.

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

Parameters2/5

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

Schema description coverage is 0% across 6 parameters, so the description must compensate and largely does not. It only indirectly clarifies 'subcircuit' (an instance of another circuit and its pins); x, y, path, circuit, and label receive no explanation of meaning, coordinate space, or defaults beyond the schema's own default values.

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: 'Place an instance of another circuit of this project'. The parenthetical '(east-facing, default appearance)' plus the port-return sentence make clear this instantiates a subcircuit, not a primitive like a gate or component, so it is distinguishable from add_gate/add_component.

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?

Provides one real precondition — 'Finish the subcircuit's pins before placing' — which tells the agent about ordering. However, it gives no guidance on when to choose this over add_circuit or add_component, nor any failure conditions, so usage is only partially covered.

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