Skip to main content
Glama
umuro

prolog-mcp

by umuro

prolog_write_file

Write a complete Prolog file to disk and hot-reload it. Replaces the entire file; use for multi-clause rule files. Rolls back on syntax error.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path inside kbDir, e.g. 'core.pl' or 'scratch/foo.pl'
contentYesComplete Prolog source — the full file content, not just the new clause
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that it replaces the entire file (destructive behavior) and that on syntax error the file is rolled back with the server continuing to run. No annotations exist, so description carries full burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded purpose, then warning, then usage. Every sentence adds value with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose, behavior (replace, rollback), usage examples, and alternatives. No output schema needed as return is implicit. Sibling tools listed for context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with good descriptions for both parameters. The description adds context about file usage (multi-clause rule files) but does not significantly extend beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it writes a .pl file and hot-reloads it. It distinguishes itself from prolog_assert for individual facts, making the purpose specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use (authoring multi-clause rule files like core.pl, scratch/) and when not to (use prolog_assert for individual facts). Also includes a warning about replacing the entire file.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/umuro/prolog-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server