Skip to main content
Glama

spell_facts

Retrieve SRD 5.2.1 spell details: casting time, range, components, duration, and concentration. Optionally compute expiration from a cast time.

Instructions

Machine-readable facts for a registered SRD 5.2.1 spell: casting_time, range, components, duration, concentration (bool). Optional caller blank cast_at (a number on the CALLER'S clock) adds expires_at = cast_at + duration as pure arithmetic; non-fixed durations return expires_at null. srdcheck holds no state and no clock. Unknown spell name -> exit 2.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesregistered spell name
cast_atNocaller clock value at cast time (any unit-consistent number, e.g. epoch seconds)
request_idNo
table_policyNo
asserted_factsNo
policy_contextNo
table_decisionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
whyYes
dataNo
factsYes
adapterYes
verdictYes
rule_idsYes
citationsYes
exit_codeYes
assumptionsYes
explanationYes
rule_resultYes
checked_scopeYes
coverage_levelYes
state_mutationYes
table_decisionYes
unchecked_scopeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.0
    • addedInput schema / properties / request_id
      Added value: +{
      +  "maxLength": 244,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed15 schema fields changedv0.8.0
    • addedInput schema / properties / asserted_facts
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "confidence": {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "path": {
      +        "pattern": "^/",
      +        "type": "string"
      +      },
      +      "source": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "maxLength": 256,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "kind": {
      +            "enum": [
      +              "caller",
      +              "dm",
      +              "player",
      +              "agent",
      +              "transcript",
      +              "sensor",
      +              "imported-state",
      +              "system"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "source",
      +      "confidence"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / policy_context
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "campaign_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "encounter_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "request_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "session_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / table_decision
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "kind": {
      +      "enum": [
      +        "ruling",
      +        "override"
      +      ],
      +      "type": "string"
      +    },
      +    "lineage": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "affected_query": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "affected_rule_ids": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "authority": {
      +          "enum": [
      +            "table-ruling"
      +          ],
      +          "type": "string"
      +        },
      +        "source_rule_unchanged": {
      +          "enum": [
      +            true
      +          ],
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "authority",
      +        "affected_query",
      +        "affected_rule_ids",
      +        "source_rule_unchanged"
      +      ],
      +      "type": "object"
      +    },
      +    "origin": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "enum": [
      +            "dm"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind"
      +      ],
      +      "type": "object"
      +    },
      +    "outcome": {
      +      "maxLength": 1024,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "policy_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "reason": {
      +      "maxLength": 2048,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "reversible": {
      +      "type": "boolean"
      +    },
      +    "scope": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "enum": [
      +            "once",
      +            "encounter",
      +            "session",
      +            "campaign"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind"
      +      ],
      +      "type": "object"
      +    },
      +    "visibility": {
      +      "enum": [
      +        "dm-only",
      +        "table"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind",
      +    "outcome",
      +    "origin",
      +    "scope"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / table_policy
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "policies": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "author": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "maxLength": 256,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "kind": {
      +                "enum": [
      +                  "dm"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind"
      +            ],
      +            "type": "object"
      +          },
      +          "decision": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "kind": {
      +                "enum": [
      +                  "ruling",
      +                  "override"
      +                ],
      +                "type": "string"
      +              },
      +              "outcome": {
      +                "maxLength": 1024,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "outcome"
      +            ],
      +            "type": "object"
      +          },
      +          "enabled": {
      +            "type": "boolean"
      +          },
      +          "id": {
      +            "maxLength": 256,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "query": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "match": {
      +                "additionalProperties": {},
      +                "type": "object"
      +              },
      +              "type": {
      +                "maxLength": 256,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "match"
      +            ],
      +            "type": "object"
      +          },
      +          "reason": {
      +            "maxLength": 2048,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "reversible": {
      +            "type": "boolean"
      +          },
      +          "scope": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "maxLength": 256,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "kind": {
      +                "enum": [
      +                  "once",
      +                  "encounter",
      +                  "session",
      +                  "campaign"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "id"
      +            ],
      +            "type": "object"
      +          },
      +          "visibility": {
      +            "enum": [
      +              "dm-only",
      +              "table"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "author",
      +          "reason",
      +          "query",
      +          "decision",
      +          "scope",
      +          "visibility",
      +          "reversible"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 1000,
      +      "type": "array"
      +    },
      +    "schema": {
      +      "enum": [
      +        "srdcheck.table-policy/1.0"
      +      ],
      +      "type": "string"
      +    },
      +    "table": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "schema",
      +    "policies"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / assumptions
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / checked_scope
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / coverage_level
      Added value: +{
      +  "enum": [
      +    "unknown",
      +    "registry-only",
      +    "budget-only",
      +    "rule-surface-complete",
      +    "full-context-checkable"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / explanation
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "rule": {
      +      "type": "string"
      +    },
      +    "situation_facts": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "state_mutation": {
      +      "type": "string"
      +    },
      +    "table_decision": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "rule",
      +    "situation_facts",
      +    "table_decision",
      +    "state_mutation"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / facts
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "asserted": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "confidence": {
      +            "maximum": 1,
      +            "minimum": 0,
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "path": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "maxLength": 256,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "kind": {
      +                "enum": [
      +                  "caller",
      +                  "dm",
      +                  "player",
      +                  "agent",
      +                  "transcript",
      +                  "sensor",
      +                  "imported-state",
      +                  "system"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind"
      +            ],
      +            "type": "object"
      +          },
      +          "value": {}
      +        },
      +        "required": [
      +          "path",
      +          "value",
      +          "source",
      +          "confidence"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "consumed": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "derived": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "basis": {
      +            "enum": [
      +              "rule_result"
      +            ],
      +            "type": "string"
      +          },
      +          "path": {
      +            "type": "string"
      +          },
      +          "value": {}
      +        },
      +        "required": [
      +          "path",
      +          "value",
      +          "basis"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "missing": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "path": {
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "path"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "asserted",
      +    "consumed",
      +    "derived",
      +    "missing"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / rule_result
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "adapter": {
      +      "type": "string"
      +    },
      +    "authority": {
      +      "enum": [
      +        "rules-advisory"
      +      ],
      +      "type": "string"
      +    },
      +    "citations": {
      +      "type": "array"
      +    },
      +    "exit_code": {
      +      "type": "integer"
      +    },
      +    "rule_ids": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "verdict": {
      +      "type": "string"
      +    },
      +    "why": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "authority",
      +    "verdict",
      +    "exit_code",
      +    "why",
      +    "adapter",
      +    "rule_ids",
      +    "citations"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / state_mutation
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "operations": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "op": {
      +            "enum": [
      +              "replace"
      +            ],
      +            "type": "string"
      +          },
      +          "path": {
      +            "enum": [
      +              "/"
      +            ],
      +            "type": "string"
      +          },
      +          "value": {}
      +        },
      +        "required": [
      +          "op",
      +          "path",
      +          "value"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "enum": [
      +        "none",
      +        "proposed"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "operations"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / table_decision
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "kind": {
      +      "enum": [
      +        "ruling",
      +        "override"
      +      ],
      +      "type": "string"
      +    },
      +    "lineage": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "affected_query": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "affected_rule_ids": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "authority": {
      +          "enum": [
      +            "table-ruling"
      +          ],
      +          "type": "string"
      +        },
      +        "source_rule_unchanged": {
      +          "enum": [
      +            true
      +          ],
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "authority",
      +        "affected_query",
      +        "affected_rule_ids",
      +        "source_rule_unchanged"
      +      ],
      +      "type": "object"
      +    },
      +    "origin": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "enum": [
      +            "dm"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind"
      +      ],
      +      "type": "object"
      +    },
      +    "outcome": {
      +      "maxLength": 1024,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "policy_id": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "reason": {
      +      "maxLength": 2048,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "reversible": {
      +      "type": "boolean"
      +    },
      +    "scope": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "enum": [
      +            "once",
      +            "encounter",
      +            "session",
      +            "campaign"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind"
      +      ],
      +      "type": "object"
      +    },
      +    "visibility": {
      +      "enum": [
      +        "dm-only",
      +        "table"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind",
      +    "outcome",
      +    "origin",
      +    "scope"
      +  ],
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / unchecked_scope
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "verdict",
      -  "exit_code",
      -  "why",
      -  "citations",
      -  "rule_ids",
      -  "adapter"
      -]New value: +[
      +  "verdict",
      +  "exit_code",
      +  "why",
      +  "citations",
      +  "rule_ids",
      +  "adapter",
      +  "coverage_level",
      +  "checked_scope",
      +  "unchecked_scope",
      +  "assumptions",
      +  "facts",
      +  "rule_result",
      +  "table_decision",
      +  "state_mutation",
      +  "explanation"
      +]
    • changedOutput schema / x-srdcheck-schema-version
      Previous value: -"1.0"New value: +"4.0"
  3. Addedv0.5.1

TDQS

A3.8/5.0
Behavior5/5

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

With no annotations, the description discloses key behavioral traits: statelessness, no internal clock, arithmetic for expires_at, null for non-fixed durations, and exit code for unknown spells. This goes beyond a simple 'returns facts' and is crucial for correct invocation.

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 compact and front-loaded, with the core purpose in the first sentence. It is dense but not bloated; all sentences contribute to understanding key behaviors.

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?

While it covers the core function and important edge cases, the many optional parameters are unaddressed. Given the schema's complexity, the description should at least hint at when to provide policy/context fields.

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 coverage is only 29%, and the description only explains `name` and `cast_at`. The other five parameters (request_id, table_policy, etc.) are left undefined in both schema and description, leaving the agent without guidance on their purpose or use.

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 clearly identifies the tool as providing machine-readable spell facts for a registered SRD 5.2.1 spell, listing the specific fields returned. It lacks an explicit active verb (e.g., 'get') but is unambiguous and distinct from the listed sibling tools, which address other game mechanics.

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?

It provides clear context: use for SRD 5.2.1 spell facts, optional cast_at behavior, and error exit. It does not explicitly discuss alternatives, but no direct sibling competes, so the context suffices.

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