Skip to main content
Glama

backward_chaining

Determines whether a query follows from facts and definite-clause rules using backward chaining, returning an indented goal tree validated against forward chaining.

Instructions

Backward chaining over definite clauses, shown as an indented goal tree (checked against forward chaining).

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": "backward_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.9/5.0
Behavior3/5

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

With no annotations at all, the description carries the full disclosure burden. It does add genuine value by describing the result as an indented goal tree verified against forward chaining, but it says nothing about how malformed rules or unprovable queries are handled, nor about performance or limits.

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?

A single front-loaded sentence with no filler; the algorithm and the output shape come first. It is arguably too terse rather than bloated, but every word earns its place.

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

Completeness2/5

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

The output schema means return values need not be explained, but the description leaves the required string formats for rules, facts, and query completely undefined. For a three-required-parameter reasoning tool with zero schema coverage and no annotations, that is a substantial gap.

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 all three parameters (rules, facts, query) are untyped strings with no field-level documentation. The description does not explain the clause syntax expected in rules or facts (e.g. how implications and atoms are written), which is essential to invoking the tool correctly.

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

Purpose4/5

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

The description names a specific inference procedure (backward chaining over definite clauses) and its output shape (an indented goal tree), which is far more informative than the bare tool name. It does not explicitly distinguish itself from the similar-sounding sibling fol_backward_chaining, so it falls short of a 5.

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?

The parenthetical '(checked against forward chaining)' hints at a relationship with the forward-chaining tools but never states when an agent should pick this tool over forward_chaining or fol_backward_chaining. There are no exclusions, prerequisites, or failure conditions given.

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