Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JAVANoThe java executable to use.
LOGISIM_JARYesPath to the Logisim 2.7.1 executable or jar (e.g. logisim-win-2.7.1.exe or logisim-generic-2.7.1.jar). Logisim is not bundled.
LOGISIM_WORKDIRNoBase directory for relative paths.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Build and verify digital circuits as Logisim 2.7.1 .circ files (the classic Carl Burch Logisim, not Evolution). Coordinates snap to a 10px grid. Gates face east; a gate's loc is its OUTPUT point and inputs sit to the left. Wires must be horizontal/vertical. A wire end touching another wire (even mid-span) connects; two wires crossing mid-span do not. Prefer build_logic / build_preset / build_from_truth_table, then confirm with truth_table or verify_truth_table. Flip-flops, registers, counters, muxes and adders: add_component (returns port coordinates). Clocked circuits: simulate_sequential (inputs held constant, or changed per cycle with sequence).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_circuit_fileC

Create an empty Logisim 2.7.1 project with one circuit.

list_circuitsB

List circuits in a .circ file with their input/output pins.

add_circuitC

Add a new empty circuit (sub-circuit) to the project.

delete_circuitB

Delete a circuit. Refuses if it is main or used as a sub-circuit.

set_main_circuitC

Choose which circuit opens first in Logisim.

describe_circuitC

Components (with absolute port coordinates), wires and connection warnings.

add_pinB

Add an input pin (faces east, connect at its loc) or output pin (faces west).

add_gateB

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.

add_componentA

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.

add_constantC

Add a constant source (faces east; connect at its loc).

add_subcircuit_instanceA

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.

add_wireB

Add a polyline wire through points [[x,y], ...]; each segment must be horizontal or vertical. An end landing on another wire joins it; crossings don't.

removeB

Remove the component with label or at (x, y). With wires_at=true remove every wire having an endpoint at (x, y) instead.

build_logicA

Synthesize boolean expressions into gates, pins and wires (auto layout).

outputs maps pin name -> expression. Syntax: NOT ~A !A A' ; AND A&B A*B A.B or 'A B'; XOR A^B ; OR A|B A+B ; constants 0 1 ; parentheses. Creates the file/circuit if missing, places below existing content unless x,y given, then (verify=true) runs the full truth table in Logisim 2.7.1 and compares with the expressions.

build_presetB

Textbook circuits from gates: half_adder, full_adder, ripple_adder (bits 1..8, default 4), mux (select_bits 1..3, default 1; inputs D0.., S..), decoder (bits 1..3, default 2, optional EN), comparator (bits 1..4, default 2; outputs EQ GT LT). Circuit defaults to the preset name. Verified in Logisim after building.

build_from_truth_tableC

Minimize (Quine-McCluskey) and build. outputs maps name -> minterm indices, where the FIRST input is the most significant bit. Optional dont_cares likewise.

simulateB

Run the circuit in Logisim 2.7.1 for one input assignment (inputs) or many (rows). Unlisted inputs are 0. Output values are ints; 'x' = floating, 'E' = error.

truth_tableB

Full truth table (<=12 input bits) computed by Logisim 2.7.1. strict=true turns unconnected gate inputs into E so wiring bugs are visible.

simulate_sequentialA

Simulate a clocked (sequential) circuit in Logisim 2.7.1. The clock input pin (clock, auto-detected if labelled clk/clock) is driven by a free-running Clock; a Clock component already in the circuit also works. Other inputs are held at inputs (unlisted = 0). sequence (up to 16 steps) changes them per cycle: sequence[k] = inputs sampled at rising edge k+1, each step keeps earlier values it does not mention, and the last step stays in force. ram_image (words from address 0) is loaded into every RAM before the first edge. Returns power-on outputs and outputs after each rising edge (cycle 1..cycles).

write_ram_imageB

Write a Logisim memory image file (v2.0 raw, words from address 0) that the GUI loads via right-click on a RAM -> Load Image... (or logisim -tty ... -load file).

verify_truth_tableB

Check the circuit against expected rows [{"in": {...}, "out": {...}}, ...] and/or reference expressions {output: expr} (checked on every input row).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 21 tools

Disambiguation4/5

Most tools target a clearly distinct action+resource: add_pin/add_gate/add_component/add_constant/add_wire/add_subcircuit_instance are separable, and the three build_* tools differ by input form (expressions, presets, truth table). The main overlap is in the simulation family — simulate, truth_table, simulate_sequential, and verify_truth_table share concepts, and build_logic vs build_from_truth_table could be misselected by an agent that doesn't read carefully.

Naming Consistency4/5

The dominant convention is verb_noun (create_circuit_file, list_circuits, add_gate, delete_circuit, write_ram_image), which is applied broadly across circuit, component, and simulation tools. Minor deviations exist: bare 'remove', bare 'simulate', and the noun-only 'truth_table', plus 'create_circuit_file' vs 'add_circuit' showing two different verbs for placing a circuit.

Tool Count4/5

21 tools is on the high side of the acceptable band, but the domain (layout editing, synthesis, and simulation of digital circuits) genuinely requires this breadth. Each tool covers a distinct capability, so little feels redundant, though a few simulation tools could conceivably be merged.

Completeness4/5

Coverage is strong: project creation, circuit lifecycle (add/list/delete/set_main), component placement and wire routing, removal, high-level builders, and multiple simulation/verification modes including sequential and RAM images. Gaps are minor — no tool to rename or edit existing component properties (e.g., change a gate's input count or relabel), and no explicit open/load of an external .circ path beyond what list/describe imply.

Maintenance

ActivityMaintained
ResponsivenessOutdated data