delete_rule_base
Delete a saved rule base by name.
Run real SWI-Prolog queries — CLP(FD) constraints, negation-as-failure, optional trace — and keep the rule bases around for the next question.
LABSCO SUMMARY
The model writes the facts and rules; the solver decides what follows from them, which is the part language models are worst at and Prolog is built for. The rule-base store is what makes it more than a scratchpad — encode a domain once, then ask questions against it for as long as it holds. trace is there when the answer is surprising and you need to see the derivation rather than take it.
A Prolog execution server with a named, reusable rule-base store behind it
SWI-Prolog 9.0 or newer, installed and on PATH — the server runs your code on it. No account and no key: you supply the Prolog code and the query, and saved rule bases live with the server, addressed by name.
One command — pip install prolog-reasoner
USE CASES
The facts, the rules and the query go in together and the solver answers, with trace available when the result is surprising enough to need the derivation.
Stable rules are saved once under a name and pulled into later runs, so a scheduling or game domain stops being retyped into every prompt.
The stored set can be reviewed by name and description, and anything that has gone stale is removed so later queries do not quietly rely on it.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
delete_rule_baseDelete a saved rule base by name.
execute_prologExecute Prolog code and return reasoning results.
Write Prolog facts and rules, then run a query against them. Supports CLP(FD) constraints, negation-as-failure, and all standard SWI-Prolog features.
get_rule_baseRetrieve the Prolog source of a saved rule base.
list_rule_basesList all saved rule bases with description and tags.
Returns `{"rule_bases": [{"name": str, "description": str, "tags": list[str]}, ...]} sorted by name. Metadata is extracted from the leading % description: / % tags:` comments of each rule base file (see §4.10).
save_rule_baseSave a named rule base containing Prolog rules that can be reused across `execute_prolog` calls.
Use this for stable, reusable knowledge (e.g. `piece_moves for chess piece movement rules). For one-time facts, include them directly in prolog_code` instead.
BEFORE YOU INSTALL
5 tools when we connected.
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 5 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
pip install prolog-reasoner{
"mcpServers": {
"prolog-reasoner": {
"command": "uvx",
"args": [
"prolog-reasoner"
]
}
}
}