set_positions
Assign new x,y positions to specific places or transitions in a Petri net canvas by ID. Use to layout new elements or reorganize a cluttered diagram without affecting other elements.
Instructions
Set canvas coordinates for places and transitions by ID.
Use after adding new elements or to clean up a cluttered layout. Typical workflow:
list_elements — note current x,y of existing elements
set_positions — assign new x,y for any subset of elements
Elements not listed keep their current positions.
Args: positions: List of {"id": "", "x": , "y": } Example: [{"id": "p1", "x": 100, "y": 200}, {"id": "t1", "x": 200, "y": 200}]
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": {
"positions": "<positions>"
},
"name": "set_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| positions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |