Skip to main content
Glama

read_structure

Read-only

Read a structure file — PDB, PDBx/mmCIF, or a core CIF small-molecule crystal structure — and report what is in it: the chains and what kind each is, their sequences, the ligands and ordered solvent, the disulfides, the residues the depositor declared modified, the temperature-factor range, the unit cell and space group, the resolution and the experiment. Use it to answer what a structure IS before deciding what to do with it, or to pull a chain's sequence out of a structure so it can be aligned, back-translated or ordered. Reading only: it never writes a structure file and never applies symmetry, so every count it reports is a count of what the file actually holds — for a core CIF that is the asymmetric unit, not the whole cell.

Input Schema

NameRequiredDescriptionDefault
textYesthe coordinate file's contents — a PDB flat file, a PDBx/mmCIF, or a core CIF; the format is read from the bytes, not from a name, because .cif is shared by two unrelated dictionaries.
modelNowhich model of an ensemble to describe, 1-based. An NMR entry holds many complete conformers and they are alternatives rather than parts, so the counts always describe ONE of them. The upper bound is the FILE's, so it is not declared here — an out-of-range model is refused by name, with the range that exists.
_filesNoThe project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name.
_subjectNoThe record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several.

Output Schema

NameRequiredDescriptionDefault
idYesthe 4-character entry id the file declares about itself, empty when it declares none
cellYesunit cell and space group, absent for a determination with no crystal
atomsYesatoms in the model described
titleYesthe entry's own title line
chainsYesone row per chain: id, polymer kind, residue and atom counts, the author numbering range, and the observed one-letter sequence
extentYesthe longest side of the bounding box in angstroms — whether this will fit a pore, a groove or a box
formatYeswhich reader actually ran: `pdb`, `mmcif`, or `smallcif` for a core CIF (small-molecule crystallography, which shares the .cif extension with mmCIF and is a different dictionary)
methodYesthe experimental technique(s) — genuinely more than one for a neutron/X-ray structure
modelsYesconformers in the file; more than one means an ensemble
watersYesordered solvent molecules, counted separately from ligands
bFactorYesmin, max and mean isotropic B over every atom, or null when the file states none
dialectYesthe same answer in words, for a reply to quote
formulaYesthe empirical formula the file STATES about itself (`_chemical_formula_sum`), empty when it states none. For a crystal structure it describes the contents of the CELL, so it can name more atoms than the sites listed
helicesYeshelices the DEPOSITOR annotated (not a calculation over the coordinates)
ligandsYesnon-water heteroatom components with how many copies of each — the ions, cofactors and bound compounds
strandsYesstrands the depositor annotated
modifiedYesmodified residues with the standard residue each stands in for, from the file's own MODRES / _pdbx_struct_mod_residue — the only authoritative source for what a component like MSE IS
residuesYesresidues in the model described, solvent included
warningsYeslines the reader could not parse, named rather than dropped
sequencesYesthe CONSTRUCT sequence per chain as the file declares it (SEQRES / _entity_poly), which includes residues that were never resolved
disulfidesYesdisulfide bonds the file annotates
hasPolymerYeswhether any chain is a polymer. False for a core CIF and for a coordinate set holding only a ligand — where `chains`, `residues` and `sequences` describe a wrapper rather than a molecule, and `atoms` is a count of symmetry-independent SITES
resolutionYesdiffraction limit in angstroms. 0 means the entry states NONE (an NMR determination has no resolution) — read `hasResolution` rather than treating 0 as sub-angstrom
hasResolutionYeswhether the entry states a resolution at all

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / extent / x-unit
      Added value: +"Å"
    • addedOutput schema / properties / resolution / x-unit
      Added value: +"Å"
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, but the description adds important context beyond them: it never writes a structure file, never applies symmetry, and reports counts of what the file actually holds. The core-CIF caveat that counts are of the asymmetric unit, not the whole cell, is a valuable behavioral detail not present in annotations or 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 dense but well structured: the first sentence front-loads what the tool reads and reports, and the second handles usage, the read-only constraint, and the asymmetric-unit caveat. Every clause carries useful information, and there is no 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 an output schema, full schema description coverage, and rich read-only annotations, the description provides everything an agent needs to select and invoke the tool correctly. It covers purpose, use cases, non-mutation behavior, symmetry behavior, and the key core-CIF counting caveat.

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 input schema already documents text, model, _files, and _subject in detail, including the byte-based format detection and model-selection semantics. The tool description itself adds little parameter-specific meaning beyond the structured 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 states a specific verb and resource: read a structure file (PDB, PDBx/mmCIF, or core CIF) and report precisely what it contains. It enumerates the reported contents in concrete terms (chains, sequences, ligands, solvent, disulfides, modified residues, B-factor range, unit cell, space group, resolution, experiment), making the tool distinguishable from siblings that write or analyze structures.

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 gives clear use cases: answer what a structure IS before deciding what to do with it, or extract a chain sequence for alignment, back-translation, or ordering. It also states a when-not constraint against writing or applying symmetry, but it does not explicitly name sibling tools such as read_structure_consensus or write_structure_library as alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources