Calculate Distance 2d
calculate_distance_2dCompute Euclidean distance between two 2D points. Use for geometry, mapping. Formula: √((x2−x1)²+(y2−y1)²). Inputs: x1,y1,x2,y2. Returns distance. See list_bundles for related 'math' calculators.
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": {
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "calculate_distance_2d"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | X1 | |
| x2 | Yes | X2 | |
| y1 | Yes | Y1 | |
| y2 | Yes | Y2 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Computed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools). | |
| source | No | Authoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21"). | |
| formula | No | Human-readable formula or method used (e.g. "I=P·r·t", "Magnus formula"). | |
| reference_url | No | Link to a calcul2 page documenting the calculation in detail. |