Skip to main content
Glama

add_gate

Add configurable AND/OR/NAND/NOR/XOR/XNOR, NOT, or BUF gates to a Logisim circuit and get absolute output-port coordinates for wiring.

Instructions

Add AND/OR/NAND/NOR/XOR/XNOR (2-5 inputs), NOT or BUF.

(x, y) is the gate's OUTPUT point. Returns absolute port coordinates to wire to. XOR/XNOR use parity semantics (odd number of 1s). width > 1 = bitwise on buses.

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_gate"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
kindYes
pathYes
labelNo
widthNo
facingNoeast
inputsNo
circuitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry behavioral weight, and it does disclose useful traits: the return value (absolute port coordinates), XOR/XNOR parity semantics, and bus behavior when width > 1. However, it never states that this mutates a circuit, what 'path'/'circuit' prerequisites are, or what happens on invalid kind/inputs, leaving mutation and error behavior unstated.

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?

Three short, front-loaded sentences with no filler; the gate list comes first and the coordinate/return semantics follow. The telegraphic style ('width > 1 = bitwise on buses') is dense but readable.

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?

For a 9-parameter mutating tool with no annotations and no output schema, the description covers the core semantics and return value well. It is still incomplete on path/label/facing/circuit and on mutation preconditions, which an agent needs to call this reliably.

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?

Schema coverage is 0% across 9 parameters, so the description is the only source of meaning. It usefully defines kind (allowed gate names), x/y (output point), inputs (2-5 range), and width (bitwise buses), but says nothing about path, label, facing, or circuit, leaving four parameters undocumented entirely.

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?

Specific verb plus resource: 'Add AND/OR/NAND/NOR/XOR/XNOR (2-5 inputs), NOT or BUF' enumerates exactly which gate types it creates, and the coordinate sentence clarifies it places a gate rather than a wire. It does not name a sibling to contrast with (e.g., add_component or add_wire), so sibling differentiation is only implicit through the gate-type list.

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 note that it 'Returns absolute port coordinates to wire to' implies the follow-up use of add_wire, giving indirect workflow guidance. There is no explicit statement of when to choose this over add_component, nor any prerequisite or exclusion.

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