{"ok":true,"site":{"host":"reddynitish.github.io","url":"https://reddynitish.github.io/logiclab/","type":"live","desc":"LogicLab — a digital logic workspace where you and your AI agent build, test, debug, and understand circuits together, live, through WebMCP.","tools":[{"name":"get_circuit_state","kind":"answer","impl":"imperative","description":"Read the full current circuit: every component (gates, inputs, outputs) with its id, type, position, label and value, every wire, and the live simulated signal on every component and wire. Call this first, before making any change, to see what's already on the canvas.","annotations":{"readOnlyHint":true,"untrustedContentHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"list_examples","kind":"answer","impl":"imperative","description":"List the built-in example circuits (id, name, description) available to load_example.","annotations":{"readOnlyHint":true,"untrustedContentHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"load_example","kind":"act","impl":"imperative","description":"Replace the current circuit on the canvas with one of the built-in examples. Use list_examples to see valid ids.","inputSchema":{"type":"object","properties":{"exampleId":{"type":"string","description":"Example id, e.g. 'half-adder'."}},"required":["exampleId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"add_component","kind":"act","impl":"imperative","description":"Place a new component on the canvas: an INPUT (a toggleable source bit), an OUTPUT (a display terminal), or a gate (AND, OR, NOT, XOR, NAND, NOR). Returns the new component's id, which you'll use with connect_components.","inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["INPUT","OUTPUT","AND","OR","NOT","XOR","NAND","NOR"],"description":"Component type to place."},"x":{"type":"number","description":"Canvas x position in pixels."},"y":{"type":"number","description":"Canvas y position in pixels."},"label":{"type":"string","description":"Optional human-readable label, e.g. 'A' or 'Sum'."}},"required":["type","x","y"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"update_component","kind":"act","impl":"imperative","description":"Update an existing component: reposition it (x/y), rename it (label), or — for INPUT components only — set its value (inputValue: 0 or 1).","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"},"inputValue":{"type":"integer","enum":[0,1]}},"required":["id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"remove_component","kind":"act","impl":"imperative","description":"Delete a component from the canvas. Any wires attached to it are removed too.","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"connect_components","kind":"act","impl":"imperative","description":"Connect the output of one component to an input port of another. Gates with two inputs (AND/OR/XOR/NAND/NOR) use toPort 0 or 1; NOT and OUTPUT have a single input port, toPort 0. An input port can only carry one wire — disconnect_components first if it's already driven.","inputSchema":{"type":"object","properties":{"from":{"type":"string","description":"Id of the component driving the wire (its output)."},"to":{"type":"string","description":"Id of the component receiving the wire."},"toPort":{"type":"integer","minimum":0,"maximum":1,"description":"Input port index on `to`."}},"required":["from","to","toPort"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"disconnect_components","kind":"act","impl":"imperative","description":"Delete a single wire by id (from get_circuit_state's wires list).","inputSchema":{"type":"object","properties":{"wireId":{"type":"string"}},"required":["wireId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"set_input","kind":"act","impl":"imperative","description":"Set an INPUT component to 0 (LOW) or 1 (HIGH).","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"integer","enum":[0,1]}},"required":["id","value"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"simulate","kind":"act","impl":"imperative","description":"Recompute every signal in the circuit from the current INPUT values and return the resulting value on each component and wire, plus any wiring issues found (feedback loops, floating inputs, doubled drivers). Call after making changes to see the effect.","annotations":{"readOnlyHint":true,"untrustedContentHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"generate_truth_table","kind":"act","impl":"imperative","description":"Exercise every combination of the circuit's INPUT components (2^n rows) and report the resulting OUTPUT values for each — the deterministic way to see everything a circuit does at once, instead of toggling inputs one at a time.","annotations":{"readOnlyHint":true,"untrustedContentHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"validate_circuit","kind":"act","impl":"imperative","description":"Check whether the circuit correctly implements a named function (AND, OR, NOT, XOR, NAND, NOR, HALF_ADDER, FULL_ADDER, MUX_2TO1, DECODER_2TO4) across every input combination. The comparison is exact, code-computed truth-table matching — not a guess — and returns the specific input rows where the circuit's behavior diverges from the expected function, so you can pinpoint what's wrong.","annotations":{"readOnlyHint":true,"untrustedContentHint":false},"inputSchema":{"type":"object","properties":{"targetFunction":{"type":"string","enum":["AND","OR","NOT","XOR","NAND","NOR","HALF_ADDER","FULL_ADDER","MUX_2TO1","DECODER_2TO4"]}},"required":["targetFunction"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"highlight_component","kind":"act","impl":"imperative","description":"Draw the student's eye to specific components and/or wires with a reason string (e.g. 'this AND gate should be an OR gate'). Used while diagnosing a broken circuit. Call clear_highlights when done.","inputSchema":{"type":"object","properties":{"componentIds":{"type":"array","items":{"type":"string"}},"wireIds":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}},"required":["reason"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"clear_highlights","kind":"act","impl":"imperative","description":"Remove every debugging highlight currently shown on the canvas.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"},{"name":"reset_circuit","kind":"act","impl":"imperative","description":"Remove every component and wire, returning to a blank canvas.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/logiclab/"}],"category":"Health & Education","favicon":"/favicons/reddynitish.github.io.svg","apiSurface":"spec","toolCount":15}}