query_spatial_relationships
Determine precise spatial relationships between nodes on a 2D canvas: containment, overlap, nearest, distances, alignments, and gaps.
Instructions
Calculates precise 2D canvas spatial relationships (contains, overlaps, nearest, distances, horizontal/vertical alignments, same-row, same-column, gaps) between nodes.
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": {
"targetNodeId": "<targetNodeId>"
},
"name": "query_spatial_relationships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | No | Optional target file ID. | |
| tolerancePx | No | Alignment tolerance threshold in pixels (default: 2). | |
| targetNodeId | Yes | Reference node ID. | |
| compareNodeIds | No | Specific candidate node IDs to evaluate. If omitted, evaluates surrounding siblings. |