Skip to main content
Glama

sim_datalog

Predict new derived facts from hypothetical graph changes without committing. Simulate dependencies by adding nodes or edges to see what new facts would appear.

Instructions

Predict which NEW derived facts a hypothetical change would create — WITHOUT committing anything (what-if simulation).

Give it hypothetical nodes and/or edges; it evaluates the program over base ∪ overlay and returns only the facts that are NEW vs the current graph (sim ∖ base).

Default program is the bundled depends.dl, so the common use is previewing module dependencies:

  • "If module A imported B, which NEW dependencies appear?" → sim_datalog(predicate="depends", edges=[{src:"", dst:"", edgeType:"IMPORTS_FROM"}])

Hypothetical node ids may be NEW (invent a decimal id) — an edge may reference them, so you can simulate a wholly new module/import, not only bridge existing nodes. The committed graph is never touched. Companion to explain_gap: gap names the missing premise, sim verifies that adding it produces the fact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
predicateYesThe derived predicate whose NEW facts to predict (e.g. "depends").
nodesNoHypothetical nodes to overlay.
edgesNoHypothetical edges to overlay.
sourceNoOptional Datalog program (derive engine); empty/omitted ⇒ the bundled depends.dl.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the committed graph is never touched, default program is bundled depends.dl, hypothetical node ids can be new, and only NEW facts are returned. This provides sufficient behavioral context.

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

Conciseness4/5

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

The description is well-structured with a clear first sentence summarizing purpose, followed by specifics. It uses bullet points for clarity but is not excessively long. Front-loads the core purpose effectively.

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

Completeness4/5

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

Given the tool's complexity (Datalog simulation, hypothetical overlay), the description covers how to use it, parameters, default program, and companion tool. Though no output schema, it states what is returned (NEW facts). Sufficient for an agent.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description adds context like the default program and example usage, but the schema already documents each parameter's type and purpose. No additional semantic nuance beyond what the schema provides.

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 the tool predicts NEW derived facts from hypothetical changes without committing, using a what-if simulation. It specifies the verb (predict/simulate) and resource (derived facts via Datalog), and distinguishes from sibling explain_gap by noting it verifies adding missing premises.

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

Usage Guidelines4/5

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

The description provides explicit when-to-use guidance: 'Give it hypothetical nodes and/or edges' and gives a common use case for module dependencies. It mentions companion tool explain_gap but does not explicitly state when not to use or list alternatives.

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/Disentinel/grafema'

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