Skip to main content
Glama

fetch_structure

DestructiveIdempotent

Fetch protein structures from PDB or predicted AlphaFold models, keeping the primary biological assembly and removing unrelated chains for PyMOL analysis.

Instructions

Fetches a protein structure from the PDB, or a predicted model from AlphaFold DB.

By default, it attempts to fetch the first biological assembly (multimer), and removes any unrelated chains/states that are not part of the primary multimer.

A UniProt accession or an AF- prefixed identifier routes to AlphaFold DB instead and is coloured by pLDDT confidence — see :func:fetch_alphafold.

Input Schema

NameRequiredDescriptionDefault
replaceNoClear the session first, so this is the only structure loaded. Pass False to add to what is already loaded — which is how you get two structures into one session for superposition_view.
obj_nameNoOptional custom name for the object in PyMOL
pdb_codeYes4-letter PDB code (e.g. "1abc"), or an AlphaFold identifier (e.g. "P69905", "af-P69905").
multimer_cutoffNoDistance (A) between chains to keep them in the same multimer. Default 8.0A is suitable for most functional assemblies.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.5.1
    • addedInput schema / properties / multimer_cutoff / description
      Added value: +"Distance (A) between chains to keep them in the same multimer. Default 8.0A is suitable for most functional assemblies."
    • addedInput schema / properties / obj_name / description
      Added value: +"Optional custom name for the object in PyMOL"
    • addedInput schema / properties / pdb_code / description
      Added value: +"4-letter PDB code (e.g. \"1abc\"), or an AlphaFold identifier (e.g. \"P69905\", \"af-P69905\")."
    • addedInput schema / properties / replace
      Added value: +{
      +  "default": true,
      +  "description": "Clear the session first, so this is the only structure loaded. Pass False to add to what is already loaded — which is how you get two structures into one session for superposition_view.",
      +  "title": "Replace",
      +  "type": "boolean"
      +}
  2. First observedv1.2.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare openWorldHint and destructiveHint; the description adds real context beyond them by disclosing that the default fetch returns the first biological assembly and strips unrelated chains/states, which explains the destructive flag. It does not state session-level side effects (that the loaded structure replaces prior content), though the schema's replace parameter covers that.

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?

Three short paragraphs, front-loaded with purpose followed by default behaviour and the routing rule. The Sphinx-style ':func:`fetch_alphafold`' markup is slightly out of place in an agent-facing description but does not obscure meaning.

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?

With an output schema present and full parameter documentation, the description only needs to supply the retrieval and assembly-selection behaviour, which it does. Minor gap: it never mentions that the fetched object lands in the PyMOL session alongside existing objects, which matters given the default replace behaviour.

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 description coverage is 100%, so the schema already documents pdb_code formats, replace semantics and multimer_cutoff distance. The description only reinforces the identifier routing and the assembly/multimer default, adding little beyond the structured fields; baseline 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?

States a specific verb and resource ('Fetches a protein structure from the PDB, or a predicted model from AlphaFold DB'), and the routing sentence distinguishes it from the sibling fetch_alphafold by explaining that AF identifiers are redirected there. An agent can tell fetch_structure apart from load_structure without opening either schema.

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

Usage Guidelines3/5

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

Usage is implied by the source databases named (PDB/AlphaFold DB) and by the pointer to fetch_alphafold for AlphaFold-specific behaviour, but there is no explicit when-to-use or when-not-to-use guidance relative to load_structure or fetch_alphafold. The agent must infer that this is the network-retrieval entry point.

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