MCP reference
Rulith exposes a small MCP surface. The board remains the authority for validation and teaching errors.
| Tool | Description exposed to the agent |
|---|---|
update_working_memory | Submit a batch of working-memory operations to a board; the kernel applies them, recomputes the rule closure once, and returns the updated working memory (derived facts, goal satisfaction, hypothesis verdicts, and hints about which facts to observe next) |
get_logic_context | Read the current working memory of a board: goals (with satisfied flags), facts, hypotheses, findings, axioms, actions, results, conflicts, vocabulary |
explain_fact | Explain WHY a derived fact is true: returns the rule that derived it and walks its supporting facts recursively back to the asserted/effect leaves, each marked [derived]/[asserted]/[effect] |
request_action | Request one action already declared by the installed capability |
complete_task | Close the current task after its board-enforced completion and pending-obligation gates pass |
declare_task | Declare a task as a tree on the board: a root plus leaf nodes, each leaf carrying an acceptance test |
Endpoint
Use the Streamable HTTP endpoint:
https://api.rulith.ai/mcp
Supported clients can discover OAuth automatically. The Console provides the agent-specific connection entry and lets you revoke credentials.
Working-memory operations
update_working_memory submits an ordered batch and computes closure once. Common operations include declaring goals, asserting materials, adding bounded task-local rules when allowed, defining logical actions, applying eligible actions, revising facts, and archiving consumed state.
Use get_logic_context to read the low-noise state the agent should reason from. Use explain_fact to inspect the derivation and supporting evidence for a conclusion.
Error contract
Rejected requests return a stable errorCode and a teaching message. Treat the error as a protocol response: correct the requested shape or supply the missing evidence. Do not retry the same invalid command unchanged.
Response language
Rulith's public product and Board Protocol responses are English-only. Omit locale or set it to "en"; GetCapabilities advertises the supported value. During the current compatibility window, a self-hosted core may accept the legacy input "zh", but it still returns English and must not be used to negotiate a Chinese response. Clients must branch on the stable errorCode, never on human-readable teaching prose.
Exact arithmetic
Numeric built-ins are exact-or-fail within the supported range. Invalid numeric literals, non-finite values, and unsafe integer operations are rejected instead of being silently rounded.
Completion
complete_task succeeds only after the board-enforced gates pass. A stopped model loop is not the same as a completed case; pending cases remain visible in the Console.