Skip to main content
Glama

opportunity_attack_provoked

Determine whether a creature's movement provokes an opportunity attack per SRD 5.2.1, considering voluntary movement, disengage, teleport, forced movement, and visibility.

Instructions

Does a creature's movement provoke an Opportunity Attack? Provokes only when a creature the reactor can see leaves the reactor's reach using its own movement. It does NOT provoke on Disengage, Teleportation, forced movement, or an unseen mover (SRD 5.2.1 p.15). Supply movement_kind; a voluntary path also needs caller-observed leaves_reach and mover_seen_by_reactor unless a supplied false prerequisite already proves no provocation. Missing facts return cannot-adjudicate. Whether the reactor has a Reaction is reaction.available. Returns data {provoked: bool}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idNo
leaves_reachNocaller geometry fact: does the movement take the creature out of the reactor's reach
table_policyNo
movement_kindNohow the creature is moving; only 'voluntary' (its own movement) can provoke
asserted_factsNo
policy_contextNo
table_decisionNo
mover_seen_by_reactorNocaller fact: can the reactor see the moving creature

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. Changed4 schema fields changedv0.5.1
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / leaves_reach / description
      Previous value: -"does the movement take the creature out of the reactor's reach (caller-supplied geometry; default true)"New value: +"caller geometry fact: does the movement take the creature out of the reactor's reach"
    • changedInput schema / properties / mover_seen_by_reactor / description
      Previous value: -"can the reactor see the moving creature (default true)"New value: +"caller fact: can the reactor see the moving creature"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "adapter": {
      +      "type": "string"
      +    },
      +    "citations": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "page": {
      +            "type": "integer"
      +          },
      +          "quote": {
      +            "type": "string"
      +          },
      +          "section": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "section"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "data": {
      +      "type": "object"
      +    },
      +    "exit_code": {
      +      "enum": [
      +        0,
      +        1,
      +        2
      +      ],
      +      "type": "integer"
      +    },
      +    "rule_ids": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "verdict": {
      +      "enum": [
      +        "legal",
      +        "illegal",
      +        "cannot-adjudicate"
      +      ],
      +      "type": "string"
      +    },
      +    "why": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "verdict",
      +    "exit_code",
      +    "why",
      +    "citations",
      +    "rule_ids",
      +    "adapter"
      +  ],
      +  "type": "object",
      +  "x-srdcheck-schema-version": "1.0"
      +}
  4. Addedv0.1.6

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does this thoroughly: it explains exclusions (Disengage, Teleportation, forced movement, unseen mover), states that missing facts return 'cannot-adjudicate', and clarifies that a false prerequisite can short-circuit the need for other facts. This is exceptionally transparent.

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?

The description is dense yet concise: four sentences, each providing essential information. It front-loads the core question and immediately follows with conditions, exclusions, input requirements, and fallback behavior. No filler or redundancy.

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 (8 params, nested table policy objects, output schema), the description covers the core decision logic, exclusions, and missing-facts behavior well. The output schema handles return values. However, it does not explicitly mention how table_policy/table_decision or asserted_facts influence the outcome, which could be relevant given their presence in the schema.

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 only 38% (3 of 8 params have descriptions). The description adds crucial semantics for the core decision params: movement_kind is required, and a voluntary path additionally needs leaves_reach and mover_seen_by_reactor. It also explains the 'cannot-adjudicate' behavior. It does not cover policy/context params, but those are likely common plumbing across sibling tools.

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's purpose: to determine if a creature's movement provokes an Opportunity Attack. It specifies exact conditions (leaves reach via own movement, visible to reactor) and explicitly lists what does NOT provoke, making it distinct from sibling tools.

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 clear context on when to use the tool: it defines required inputs (movement_kind, and for voluntary movement leaves_reach and mover_seen_by_reactor), and it references reaction.available as a separate tool for checking reaction availability. However, it does not explicitly name sibling alternatives or state when not to use this tool.

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