Skip to main content
Glama

Add measurement

snipaya_add_measure

Draws 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

NameRequiredDescriptionDefault
toYesA point. Canvas coordinates, or image pixels when relativeTo is set.
fromYesA point. Canvas coordinates, or image pixels when relativeTo is set.
styleNoOptional style. Omitted fields use the user’s current tool style. Brand colors: coral #EC534E, papaya #FE9440.
tabIdNoTarget tab id. Defaults to the active tab.
relativeToNoImage 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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare this is a non-destructive mutation (readOnlyHint=false, destructiveHint=false), so the safety profile is already covered. The description usefully discloses the return value (the label) in the absence of an output schema, but says nothing about whether the item is selected afterward, whether it is undoable via snipaya_undo, or what happens if from/to fall outside the canvas.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with the action and return value front-loaded and no redundant padding. Nothing could be removed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With five parameters, nested point objects, and no output schema, the definition covers the essentials: required endpoints, pixel semantics, and the return value. It omits how relativeTo and tabId interact (e.g., coordinates are canvas-relative when relativeTo is unset) and any note on item selection or undo, a minor gap given how thoroughly the schema documents the parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so from, to, style, tabId, and relativeTo are all documented in the schema already. The description only echoes that coordinates are in image pixels, which is a partial restatement of the relativeTo documentation rather than added meaning. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (draw) and a distinct resource (a measuring line labeled with pixel length), which separates it from snipaya_add_arrow and snipaya_add_shape by outcome rather than shape. It does not explicitly name the sibling alternatives, so it stops short of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is the tool for measuring distances on the canvas. There is no statement of when to prefer it over snipaya_add_arrow, nor any preconditions such as needing an image loaded via snipaya_get_canvas before using relativeTo.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.