Skip to main content
Glama

count_atoms

Count atoms matching a PyMOL selection to validate the selection expression before building a scene. Ensures the expression is correct rather than discovering a blank image later.

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

TableJSON Schema
NameRequiredDescriptionDefault
selectionNoPyMOL selection string to count.all

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It states that it counts and warns about empty counts, but does not explicitly say whether the operation is side-effect-free (e.g., it doesn't modify the scene). The read-only nature is implied but not stated, leaving a mild gap.

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 succinct: three sentences total, with the first stating core functionality and the second/third providing a valuable use case. Every sentence earns its place, with no redundancy or filler.

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

Completeness5/5

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

Given the tool's simplicity, the presence of an output schema, and full parameter schema coverage, the description fully covers the practical usage scenario. The extra note about empty counts as a debugging hint makes it contextually complete for an AI agent deciding when to invoke it.

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?

The input schema describes the 'selection' parameter as a 'PyMOL selection string to count' with 100% coverage. The description reinforces this by referencing selection expressions but does not add meaningful detail beyond the schema, so the baseline of 3 is appropriate.

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 uses a specific verb ('Counts') and resource ('atoms matching a selection'), clearly distinguishing it from sibling tools like select or remove. The additional explanation about checking selection expressions makes the purpose even clearer.

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 recommends using this tool to validate a selection expression before building a scene, providing clear context for when it is useful. It does not explicitly contrast with alternatives or state when not to use it, but the guidance is specific and actionable.

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