Skip to main content
Glama

add_component

Add a built-in Logisim component at a specified location and return its absolute port positions; use it to construct and wire circuits programmatically.

Instructions

Add a built-in library component (east-facing) and return its absolute ports.

kind: dff | tff | jkff | srff (flip-flops: D/T or J,K / S,R, clock, Q, Qn, async reset / preset / enable), register (data, clock, clear, enable, out), counter (clock, count, load, data, clear, out, carry), mux (in0.., select, out; select_bits 1..4), adder (A, B, carry_in, out, carry_out), subtractor (A, B, borrow_in, out, borrow_out). width applies to register/counter/mux/adder/ subtractor data. trigger (memory parts): rising | falling | high | low. ram: addr_bits x width RAM, separate ports (addr, data = read out, din, we = store on rising clock, clock, optional cs/oe/clear); load contents with ram_image in simulate_sequential or write_ram_image for the GUI. decoder: select -> out0.. out(2**select_bits - 1). splitter: combined (width bits) <-> split0.. with group sizes splits LSB first, e.g. [5, 3]. bit_extender: in (in_width) -> out (width), zero-extended. Optional ports (Qn, reset, preset, enable, carry...) may stay unconnected; note an unconnected counter count input counts every cycle.

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>",
      "kind": "<kind>",
      "x": "<x>",
      "y": "<y>"
    },
    "name": "add_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
kindYes
pathYes
labelNo
widthNo
splitsNo
circuitNo
triggerNorising
in_widthNo
addr_bitsNo
select_bitsNo

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 so well: it discloses the returned absolute ports, that optional ports (Qn, reset, preset, enable, carry) may stay unconnected, and the non-obvious edge case that "an unconnected counter count input counts every cycle." It omits error behavior for invalid kind values or nonexistent paths, and doesn't say whether the shape must already exist, keeping it out of 5 territory.

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?

Purpose and return value are front-loaded, then the long kind enumeration follows — dense but each clause carries load-bearing schema information that the bare schema lacks. Some phrasing is compressed to the point of terseness ("mux (in0.., select, out; select_bits 1..4)"), but there is little outright waste.

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 12-parameter tool with no output schema and no annotations, the description covers the hard parts: every kind variant, the meaning of width/splits/trigger, and the shape of the return value (absolute ports). Gaps remain around placement coordinates, labeling, and the path-versus-circuit argument relationship, but the essential call-correctly information is present.

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 carry all parameter meaning, and it substantially does: kind is exhaustively enumerated across all component families, and width, splits (with a concrete example "[5, 3]" and LSB-first ordering), trigger, in_width, addr_bits and select_bits each get domain meaning. It leaves path, circuit, x, y and label unexplained, and the path/circuit distinction is genuinely ambiguous for a 12-parameter tool.

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 opens with a specific verb+resource ("Add a built-in library component") and states the return value ("return its absolute ports") plus an orientation constraint ("east-facing"). It implies differentiation from add_gate/add_subcircuit_instance by scoping to "built-in library" parts, though it never names those siblings explicitly.

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?

Usage context is implied rather than stated: the reader infers this is the tool for library parts versus gates or subcircuit instances. The only explicit routing is for RAM contents ("load contents with ram_image in simulate_sequential or write_ram_image for the GUI"), which is genuinely helpful but narrow. No when-not guidance or prerequisites are given.

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