Skip to main content
Glama

attack_modifiers

Compute an attack's Advantage or Disadvantage from both combatants' conditions and distance, including ranged close-combat penalties, using SRD 5.2.1 rules.

Instructions

Compose an attack roll's Advantage/Disadvantage from both combatants' conditions and distance (Prone's 5-foot flip, Blinded, Restrained, Paralyzed, Stunned, Invisible with the seen exception, the Grappled attacker rule, and — for ranged attacks — the Ranged Attacks in Close Combat Disadvantage). Condition-sensitive observations such as charmer/grappler relationships, visibility, and the nearby-enemy census are required rather than defaulted. Exhaustion is returned as a flat modifier, never Advantage. Genuinely ambiguous rules text (e.g. a seen Invisible target) returns cannot-adjudicate with the ambiguous sentence cited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangedNotrue if this is a ranged attack (weapon or spell); enables the Ranged Attacks in Close Combat rule
targetNo
attackerNo
request_idNo
distance_ftYes
table_policyNo
asserted_factsNo
nearby_enemiesNorequired for a ranged attack; enemies within 5 ft of the attacker (an explicit empty list means none). A ranged attack gets Disadvantage if any can see the attacker and isn't Incapacitated.
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
Behavior5/5

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

With no annotations, the description fully carries behavioral disclosure. It explicitly states that condition-sensitive observations must be supplied rather than defaulted, that exhaustion is always a flat modifier (never Advantage), and that ambiguous rules return cannot-adjudicate with the ambiguous sentence cited.

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 a single dense sentence but front-loaded with the verb and object. Every clause adds rule detail, though it could be split into two sentences for easier readability.

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?

For a complex 10-parameter tool with an output schema, this description covers the main attack-modifier domain, required observations, and ambiguity handling. It remains short on sibling differentiation and auxiliary parameter semantics, but it is largely sufficient for the core invocation.

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 description coverage is low (~20%), so the description compensates by explaining the core condition and distance parameters, including the charmer/grappler relationships, visibility requirements, and nearby-enemy census. It does not detail auxiliary policy parameters, but those are largely infrastructure.

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 uses a specific verb ('Compose') and a precise resource ('an attack roll's Advantage/Disadvantage'), naming the exact rules considered (Prone's 5-foot flip, Blinded, Restrained, etc.). This clearly distinguishes it from generic roll or check 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 clearly establishes that the tool is for attack-roll advantage/disadvantage calculation and even notes when ranged-attack rules apply. It does not explicitly name alternative tools or say 'use roll_compose for dice rolls,' but the usage context is unambiguous.

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/chaoz23/srdcheck'

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