measure_distance
Calculate distances between positions or entities on a battlefield using D&D 5e rules. Returns results in feet for tactical movement and range determination.
Instructions
Calculate the distance between two points or entities on the battlefield. Returns distance in feet (5ft per square, diagonal = 5ft using D&D simplified rules).
Example - Between two coordinates: { "encounterId": "encounter-1", "from": { "type": "position", "value": "10,10" }, "to": { "type": "position", "value": "15,18" } }
Example - Between two entities: { "encounterId": "encounter-1", "from": { "type": "entity", "value": "hero-1" }, "to": { "type": "entity", "value": "goblin-3" } }
Example - From entity to position: { "encounterId": "encounter-1", "from": { "type": "entity", "value": "wizard-1" }, "to": { "type": "position", "value": "25,30" } }
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": {
"encounterId": "<encounterId>",
"from": "<from>",
"to": "<to>"
},
"name": "measure_distance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encounterId | Yes | The ID of the encounter | |
| from | Yes | ||
| to | Yes | ||
| sessionId | No |