Add measurement
snipaya_add_measureDraws a measuring line between two points on an image and labels it with the length in pixels. Use it to show distances or dimensions in screenshots and annotations.
Instructions
Draw a measuring line from "from" to "to" labeled with its length in image pixels. Returns the label.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "snipaya_add_measure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | A point. Canvas coordinates, or image pixels when relativeTo is set. | |
| from | Yes | A point. Canvas coordinates, or image pixels when relativeTo is set. | |
| style | No | Optional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440. | |
| tabId | No | Target tab id. Defaults to the active tab. | |
| relativeTo | No | Image id from snipaya_get_canvas. When set, all coordinates in this call are pixels of that image as captured (the same pixels you see in snipaya_render of that image). |