prolog-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| prolog_queryA | Execute a Prolog goal and return all solutions as JSON |
| prolog_assertA | Assert a fact or rule into the KB. Persists to disk and survives daemon restarts. Use agent:main (default) for permanent knowledge; use session: for ephemeral facts tied to the current session. |
| prolog_retractA | Retract matching facts or rules from a layer. Removes from disk and reloads — retraction survives daemon restarts. |
| prolog_write_fileA | Write a .pl file to disk and hot-reload it. WARNING: replaces the entire file — not an append. Use for authoring multi-clause rule files (core.pl, scratch/). For individual facts use prolog_assert instead. On syntax error the file is rolled back and the server keeps running. |
| prolog_load_fileB | Hot-reload an existing .pl file |
| prolog_list_factsA | List facts in the KB, optionally filtered by functor |
| prolog_reset_layerA | Clear a session or scratch layer (core and agent layers are permanent) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clear, distinct purpose: query for executing queries, assert for adding facts/rules, retract for removing, write_file for authoring rule files, load_file for reloading, list_facts for listing, and reset_layer for clearing layers. No overlapping functionality.
All tools use a consistent 'prolog_' prefix followed by a verb or verb_noun pattern in snake_case (e.g., prolog_query, prolog_write_file). The naming convention is uniform and predictable.
With 7 tools, the set covers the core operations for a Prolog knowledge base server: querying, asserting, retracting, file management, listing, and resetting. The count is well-scoped for the domain.
The tool set covers essential operations (query, assert, retract, file I/O, listing, resetting). A minor gap is the lack of a direct update tool, but retract+assert can serve that purpose. Also, no tool to list all predicates without filtering, but list_facts with no filter may cover it.