Skip to main content
Glama

distance

Measure the distance between two molecular selections in Angstroms and display it as a named object in the viewport for easy reference.

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

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return unit (Angstrom), the side effect of creating a named distance object in the viewport, and the averaging behavior for multi-atom selections. This goes beyond the tool name and schema.

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 three sentences, with the purpose upfront, followed by the side effect and an edge case. Each sentence adds distinct value with no redundancy 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?

For a simple measurement tool with three parameters and an output schema, the description covers the core functionality, return unit, side effect, and multi-atom behavior. It lacks only minor details like selection syntax or behavior when no pairs are found, but these are not critical.

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 coverage is 100%, so the baseline is 3. The description adds context about the name being used for the drawn object and multi-atom selection behavior, but it does not substantially enrich parameter meaning beyond what the schema already provides.

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 the tool measures distance between two selections and returns it in Angstrom, which is a specific verb+resource. It also mentions the side effect of drawing the measurement, distinguishing it from measurement tools like angle or dihedral, but does not explicitly name alternatives.

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 implies usage for measuring distances but provides no explicit guidance on when to use this tool versus siblings like angle, dihedral, or sasa. There are no exclusions or alternative tool mentions, leaving the agent to infer context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chemrich/MCPymol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server