Skip to main content
Glama
jonathan6620

PyMOL-MCP

by jonathan6620

parse_and_execute

Execute a single PyMOL command in literal PyMOL syntax. Translate your request into a precise PyMOL command, then call this tool to run it and return the output.

Instructions

Executes a single PyMOL command given in literal PyMOL syntax.

NOT a natural-language interface. user_input is matched against a fixed table of command patterns; anything else is rejected rather than guessed at. Translate the user's request into PyMOL syntax yourself, then call this once per command. Use list_commands to look up exact syntax.

instance is the port of the PyMOL to drive. Leave it unset when only one is running. With several running an unset instance is an error rather than a guess, since driving the window the user is not watching looks exactly like the command doing nothing. Call list_instances to see the choices.

Translating requests: "Load PDB 1UBQ and show it as cartoon" -> parse_and_execute("fetch 1ubq") -> parse_and_execute("as cartoon, 1ubq") "Colour chain A red" -> "color red, chain A" "Show sticks for residues 1-50" -> "show sticks, resi 1-50" "Open /data/model.pdb" -> "load /data/model.pdb" "Select the binding site" -> "select site, byres (polymer within 5 of ligand)"

Common mistakes:

  • Multiple commands in one call. "fetch 1ubq and show cartoon" fails; the whole string is read as one filename/code.

  • load for a PDB ID. load takes a file path; use fetch for a 4-character accession code like 1ubq.

  • Selections as prose. Write show cartoon, chain A, not show cartoon for chain A -- the selection is a second argument after a comma.

  • Conversational filler. "please show cartoon" does not match; send "show cartoon".

Selections use full PyMOL algebra (chain A and resi 1-50, not solvent, byres (... within 5 of ...)). Commas separate arguments, so a selection containing a comma must be rewritten with + (resi 1+2+3).

Returns PyMOL's output, or a message describing the parse/execution failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNo
user_inputYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, so description carries full burden. It explains user_input is matched against fixed pattern table, behavior for instance parameter (default null, error if multiple instances), common mistakes, selection syntax, and return value (PyMOL output or failure message).

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?

The description is relatively long but all sections (purpose, guidelines, examples, parameter details) are relevant. Slightly verbose but well-structured with front-loaded purpose.

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 complexity of PyMOL command execution, the description covers purpose, usage guidelines, parameter details, common pitfalls, examples, and return value. The output schema exists, so return values are adequately handled.

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

Parameters5/5

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

Schema coverage is 0% (no descriptions), but the description provides full semantics: user_input is a PyMOL command string, instance is the port with default null and clear behavior explanation. Adds significant value beyond the schema.

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 it executes a single PyMOL command in literal PyMOL syntax, not natural language, clearly distinguishing from sibling tools list_commands and list_instances.

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

Usage Guidelines5/5

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

Explicitly tells when to use (single PyMOL command) and when not (multiple commands, natural language, incorrect syntax). Provides examples of common mistakes and directs to list_commands for syntax and list_instances for instance selection.

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/jonathan6620/pymol-mcp'

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