Skip to main content
Glama

distance

Idempotent

Measures the gap between two selections in Angstrom and draws a named measurement object in the viewport, supporting multi-atom averages.

Instructions

Measures the distance between two selections and returns it in Angstrom.

Also draws the measurement in the viewport as a named distance object. With multi-atom selections PyMOL reports the average over the pairs it found within its default cutoff.

Input Schema

NameRequiredDescriptionDefault
nameYesName for the distance object (used to delete/recolor later).
selection1YesFirst selection.
selection2YesSecond selection.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.5.1
    • addedInput schema / properties / name / description
      Added value: +"Name for the distance object (used to delete/recolor later)."
    • addedInput schema / properties / selection1 / description
      Added value: +"First selection."
    • addedInput schema / properties / selection2 / description
      Added value: +"Second selection."
  2. First observedv1.2.1

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations, the description discloses that the tool returns a distance in Angstrom and creates a named object in the viewport. It also explains that multi-atom selections yield an average over pairs within PyMOL's default cutoff, which is valuable behavioral context not present in the annotations.

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?

The description is front-loaded with the core purpose, then adds the side effect and multi-atom nuance. Every sentence contributes useful information without repetition or filler.

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?

The description is complete enough for a three-parameter measurement tool: it covers the result unit, the viewport object creation, and multi-atom behavior. It could go further by stating what happens when the same distance object name already exists, but the output schema and annotations cover much of the remaining context.

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

Parameters4/5

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

The schema already documents all three parameters at full coverage, so the baseline is 3. The description adds meaningful semantics for the selection parameters by explaining how multi-atom selections are treated, including averaging and the default pair cutoff.

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

Purpose5/5

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

The description states a specific verb and resource: it measures the distance between two selections and returns the result in Angstrom. It also clarifies the visible side effect of drawing a named distance object, which distinguishes it from related measurement tools such as angle or dihedral.

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?

The description does not explain when to use this tool versus alternatives like angle, dihedral, or contact_report. The multi-atom averaging note is useful behavior, but it is not usage guidance or an alternative-selection rule.

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