Skip to main content
Glama

forward_chaining

Derive conclusions from definite-clause rules and facts while tracking an agenda and count table at each step, then answer a query using the resulting inference trace.

Instructions

Forward chaining over definite clauses (e.g. "L & M => P") with the agenda and count table at every step.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "rules": "<rules>",
      "facts": "<facts>",
      "query": "<query>"
    },
    "name": "forward_chaining"
  }
}

Input Schema

NameRequiredDescriptionDefault
factsYes
queryYes
rulesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden. The phrase "with the agenda and count table at every step" hints that the run is traced, but nothing is said about what happens when the query is not entailed, whether rules must be definite Horn clauses, how duplicates are handled, or how the trace is shaped. For a pure computation that is tolerable, but the burden is not met.

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

Conciseness3/5

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

One sentence with no filler, and the algorithm name is front-loaded. However, the brevity comes at the cost of specification rather than through efficient editing, so it reads as under-specified rather than tight.

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

Completeness3/5

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

An output schema exists, so the return trace does not need describing, which removes the largest expected gap. What remains missing is input contract information (fact/query format, clause restrictions) that no structured field supplies, which is significant for a 3-required-parameter tool.

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

Parameters2/5

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

Schema description coverage is 0% and the description only partially compensates: the rule syntax example covers the rules parameter, but the format of facts (bare atoms? strings with &?), what query represents (a literal to derive, or a predicate), and whether symbols must match across facts and rules are all left unstated. Two of three parameters remain semantically opaque.

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

Purpose3/5

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

It names a specific inference technique and illustrates the rule syntax ("L & M => P"), which is more than a restated name. But it never distinguishes itself from the sibling fol_forward_chaining, so an agent cannot tell from the text whether this is the propositional variant or the first-order one. Purpose is recognizable but not disambiguated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of when not to use it, and no reference to backward_chaining or fol_forward_chaining as alternatives. The agent must infer from the name alone that this is the propositional forward-reasoning option.

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