Skip to main content
Glama

count_atoms

Read-onlyIdempotent

Count atoms matching a PyMOL selection to verify the expression before building a scene; an empty count signals an incorrect selection.

Instructions

Counts the atoms matching a selection.

Handy for checking a selection expression does what you think before building a scene on top of it — an empty count means the expression is wrong, which is otherwise invisible until the picture comes out blank.

Input Schema

NameRequiredDescriptionDefault
selectionNoPyMOL selection string to count.all

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.1

TDQS

A3.8/5.0
Behavior3/5

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

The description successfully explains the behavioral outcome of the tool—specifically, that an empty count signals an error that is otherwise invisible. Since annotations already confirm its read-only and safe nature, the description adds high-value contextual behavior.

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 definition is highly efficient. The first sentence delivers the function, and the second sentence provides the crucial situational context, both without superfluous language.

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?

Given that the tool is simple (single parameter, read-only), it is very complete. The combination of operational definition and detailed use-case advice means an agent has almost no ambiguity about the tool's intent.

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 schema provides all necessary semantic information about the 'selection' parameter. The description does not add novel information beyond reinforcing that the input must be a selection string.

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 clearly defines the tool's action as counting atoms based on a selection. It is more than a mere definition by providing a distinct use case for the tool, which helps differentiate it from general execution commands.

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

Usage Guidelines4/5

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

It explicitly states when the tool is useful: 'Handy for checking a selection expression... before building a scene.' This prevents the agent from blindly relying on a potentially broken selection without an intermediate check.

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