Skip to main content
Glama

logisim_build_logic

Synthesize a combinational circuit from Boolean formulas or a truth table in a chosen gate basis, draw it to a .circ file, and verify it by simulating all input combinations.

Instructions

Synthesize a combinational circuit from Boolean formulas or a truth table, in a chosen gate basis, then draw it (like logisim_build) and verify it by simulating every input combination.

outputs: {"F": "A & ~B | C", "G": "A ^ B ^ C"}; formula syntax: & * · ∧ AND, | + ∨ OR, ~ ! ¬ NOT or postfix ', ^ ⊕ XOR, ↑ NAND, ↓ NOR, -> → implication, <-> == ≡ equivalence, 0/1, parentheses. An output can instead be {"minterms": [1, 3, 7], "dont_care": [5]} (then 'inputs' is required; inputs[0] is the most significant bit). truth_table: alternative to outputs, text like "A B C | F G\n0 0 0 | 0 1\n..." (x or - = don't care, missing rows = don't care). form: as_written (formulas only; default for formulas), min_sop (minimal DNF; default for tables/minterms), min_pos (minimal CNF), sop_canonical (perfect DNF), pos_canonical (perfect CNF). basis: any (default), and_or_not, nand (NAND only), nor (NOR only). max_inputs: gate fan-in limit (default 4; 2 = two-input gates).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formNo
pathYesPath to the .circ file (absolute, or relative to the working folder)
basisNo
scaleNoImage scale (default 1.5, reduced automatically for large circuits)
titleNo
inputsNoInput order (default: variables sorted A, B, C / x1, x2 ...)
renderNoReturn a picture (default true)
outputsNo
overwriteNoReplace the file if it already exists (default false)
max_inputsNo
truth_tableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.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 reasonably well: it discloses the side effects (writes a .circ file, draws the circuit, simulates every input combination to verify), the overwrite default of false, and that render returns a picture. It stops short of stating failure behavior for invalid formulas or what the tool returns besides the image.

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 description is dense but front-loaded with the core action first, then syntax and parameter semantics in scannable fragments. Every block earns its place given the tool's complexity, though the syntax enumeration is lengthy.

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 an 11-parameter, no-output-schema tool, the description covers inputs, formulas, truth tables, gate basis, and optimization form well enough to call it correctly. The main gap is the return contract beyond the rendered picture and the meaning of title/scale, but overall it is near-complete.

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 only 45%, and the description compensates substantially: it documents the outputs map format, full formula syntax, minterms/dont_care object form, truth_table text format, the form enum values, the basis options, and max_inputs fan-in semantics. Undocumented-in-schema parameters like outputs, truth_table, form, and basis are covered, though title and the interaction of scale are left thin.

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 names a specific verb chain (synthesize, draw, verify) and the resource (combinational circuit from Boolean formulas or a truth table), and it explicitly references the sibling logisim_build ('draw it (like logisim_build)'). It clearly distinguishes itself as the high-level synthesis tool, though it never states why to pick it over logisim_build or logisim_truth_table.

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 is only implied: the description makes clear this is the tool for going from Boolean formulas/truth table to a drawn, verified circuit, and the 'like logisim_build' phrasing hints at the relationship. There is no explicit when-to-use/when-not guidance or routing to alternatives such as logisim_build, logisim_verify, or logisim_truth_table.

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