API & MCP
Everything a person can do on Ohmforge Truth Table & Logic Minimiser, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ohmforgetruthtable.usefulweb.site/api/v1/calculate– run Ohmforge Truth Table & Logic MinimiserGET https://ohmforgetruthtable.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ohmforge Truth Table & Logic Minimiser
Enter a Boolean expression (A·B + A'·C, !(A & B) | C, A xor B …) or a list of minterms with don't cares. You get the truth table, the canonical forms, the minimal sum of products and product of sums (Quine–McCluskey with an exact minimum cover), the Karnaugh map for up to six variables, gate counts and an Ohmforge circuit of 2-input gates that is simulated for every row.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (expression, minterms) | "expression" | Input |
expression | text | "A'B'C + A'BC + AB'C + ABC'" | Expression. Variables: a letter with an optional number (A, b, x1); AB means A·B. NOT: ' after or ! ~ before; AND: · & * or nothing; OR: + |; XOR: ^. Words AND, OR, NOT, XOR, NAND, NOR, XNOR work too. |
variables | text | — | Variables in order (optional). Comma-separated, first = most significant bit, e.g. A, B, C, D. Expression: empty = alphabetical. Minterm list: empty = A, B, C, D. |
minterms | text | — | Minterms (1 rows). For "Minterm list": numbers and ranges, e.g. 0, 2, 5-7. |
dontCares | text | — | Don't cares (optional). Rows whose output does not matter; the minimiser may use them. |
circuit | select (sop, pos) | "sop" | Circuit form |
Example request
A'B'C + A'BC + AB'C + ABC'
curl -X POST https://ohmforgetruthtable.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"expression","expression":"A'B'C + A'BC + AB'C + ABC'"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ohmforgetruthtable.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ohmforge_truth_table - Local stdio connector:
node src/mcp-stdio.ts --tool=ohmforge-truth-table
{
"mcpServers": {
"ohmforge-truth-table": { "type": "http", "url": "https://ohmforgetruthtable.usefulweb.site/mcp" }
}
}