Skip to main content
Glama

measure_distance

Read-only

Calculate the distance in millimeters between two pixel positions in a local DICOM image and return their patient coordinates.

Instructions

Measure a distance in mm between two pixel positions and give their patient coordinates.

Input Schema

NameRequiredDescriptionDefault
endYes[row, column] in pixels.
pathYesPath to a local DICOM file inside the allowed paths (e.g. from retrieve).
frameNo0-based frame index for multi-frame images.
startYes[row, column] in pixels.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful behavioural detail that the measurement is expressed in millimetres derived from pixel spacing and that patient coordinates are returned, but says nothing about units edge cases, frame handling, or failure modes.

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

Conciseness4/5

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

A single front-loaded sentence with zero filler. It could be slightly sharper about the coordinate output, but nothing is wasted.

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 an output schema present and full parameter coverage, the description only needs to convey purpose and unit semantics, which it does. Minor gap: no mention of frame selection or what a returned patient coordinate represents, but those are largely carried by structured fields.

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 start/end, path and frame are already documented at the property level. The description only restates that positions are pixel coordinates, adding no syntax or format meaning beyond the schema.

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?

The description states a specific verb (measure) and resource (distance between two pixel positions) and names the outputs: millimetres and patient coordinates. It doesn't explicitly contrast with siblings like pixel_statistics or check_geometry, but the operation is unambiguous.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over alternatives (e.g. pixel_statistics or check_geometry) and no stated prerequisites such as needing a valid DICOM path from retrieve. The agent must infer the usage context from the name alone.

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