Skip to main content
Glama

Search PDB structures

search_pdb_entity
Read-only

Search PDBj for protein structures, chemical components, or BIRD molecules and get named fields per hit, such as method, resolution, ligands, SMILES, and formula.

Instructions

Search PDBj for structures, chemical components, or BIRD molecules.

Returns rich, named fields per hit (not just the title) — for pdb, each result carries the experimental method, resolution, bound ligands, and citation; for cc, the formula, SMILES, and InChI.

RETURNS a JSON string {"total": int | null, "results": [ {…fields…} ]}. total is null when PDBj gives no count (typical for structured-filter searches) — that is NOT zero and does NOT mean "no results"; consult results directly. On upstream/HTTP failure returns a JSON object with an error key instead — check for error before reading results.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "db": "<db>"
    },
    "name": "search_pdb_entity"
  }
}

Input Schema

NameRequiredDescriptionDefault
dbYesThe database to search in. Allowed values are: - "pdb" (Protein Data Bank, macromolecular structures) - "cc" (Chemical Component Dictionary, ligands / small molecules) - "prd" (BIRD, Biologically Interesting Reference Molecule Dictionary, mostly peptides).
nameNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
termNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
limitNoMax results to return, in [0, 500]. Default 20.
queryNoFree-text keywords. May be empty when at least one structured filter is supplied. Accepts aliases: `search`, `term`, `keyword`, `keywords`, `search_term`, `name`. If both `query` and an alias are given with different values, this raises ValueError (pass only one).
ligandNodb="pdb" filter: keep entries whose ligand list contains this string. SUBSTRING match, not an exact CCD code: "ATP" also matches "dATP". Pass the exact ligand name for precision.
methodNodb="pdb" filter: experimental method. "em" is cryo-EM. Filters that do not apply to the chosen `db` are ignored.
offsetNoNumber of leading results to skip (server-side pagination). Default 0.
searchNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
smilesNodb="cc" filter: SMILES substructure query.
sourceNodb="pdb" filter: source organism, e.g. "Homo sapiens".
formulaNodb="cc" filter: molecular formula in the canonical SPACED, element-counted form, e.g. "C8 H10 N4 O2". The unspaced form ("C8H10N4O2") is NOT matched by PDBj.
keywordNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
res_maxNodb="pdb" filter: maximum resolution in Angstrom.
res_minNodb="pdb" filter: minimum resolution in Angstrom.
keywordsNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
search_termNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv2.34.1
    • addedInput schema / properties / formula / description
      Added value: +"db=\"cc\" filter: molecular formula in the canonical SPACED, element-counted form, e.g. \"C8 H10 N4 O2\". The unspaced form (\"C8H10N4O2\") is NOT matched by PDBj."
    • addedInput schema / properties / keyword / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / keywords / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / ligand / description
      Added value: +"db=\"pdb\" filter: keep entries whose ligand list contains this string. SUBSTRING match, not an exact CCD code: \"ATP\" also matches \"dATP\". Pass the exact ligand name for precision."
    • addedInput schema / properties / method / description
      Added value: +"db=\"pdb\" filter: experimental method. \"em\" is cryo-EM. Filters that do not apply to the chosen `db` are ignored."
    • addedInput schema / properties / name / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / res_max / description
      Added value: +"db=\"pdb\" filter: maximum resolution in Angstrom."
    • addedInput schema / properties / res_min / description
      Added value: +"db=\"pdb\" filter: minimum resolution in Angstrom."
    • addedInput schema / properties / search / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / search_term / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / smiles / description
      Added value: +"db=\"cc\" filter: SMILES substructure query."
    • addedInput schema / properties / source / description
      Added value: +"db=\"pdb\" filter: source organism, e.g. \"Homo sapiens\"."
    • addedInput schema / properties / term / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
  2. Changed4 schema fields changedv2.0.0
    • addedInput schema / properties / db / description
      Added value: +"The database to search in. Allowed values are:\n- \"pdb\" (Protein Data Bank, macromolecular structures)\n- \"cc\" (Chemical Component Dictionary, ligands / small molecules)\n- \"prd\" (BIRD, Biologically Interesting Reference Molecule\n  Dictionary, mostly peptides)."
    • addedInput schema / properties / limit / description
      Added value: +"Max results to return, in [0, 500]. Default 20."
    • addedInput schema / properties / offset / description
      Added value: +"Number of leading results to skip (server-side\npagination). Default 0."
    • addedInput schema / properties / query / description
      Added value: +"Free-text keywords. May be empty when at least one\nstructured filter is supplied. Accepts aliases: `search`, `term`,\n`keyword`, `keywords`, `search_term`, `name`. If both `query` and\nan alias are given with different values, this raises ValueError (pass only one)."
  3. Changed8 schema fields changedv0.1.1
    • addedInput schema / properties / formula
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedInput schema / properties / ligand
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedInput schema / properties / method
      Added value: +{
      +  "default": "",
      +  "enum": [
      +    "",
      +    "xray",
      +    "nmr",
      +    "em",
      +    "neutron",
      +    "fiber",
      +    "electron-crystallography",
      +    "solid-state-nmr"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / res_max
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / res_min
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / smiles
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
  4. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the description focuses on behavior the annotations cannot convey: the exact return envelope, the crucial caveat that `total: null` is not zero and not "no results", and that upstream/HTTP failure yields an `error` key. That null-vs-zero warning is genuinely high-value. It loses a point because much of the remainder restates the return payload that an output schema already covers.

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?

Purpose is front-loaded in the first sentence, and the return/error section is kept tight with no filler. The middle paragraph enumerating returned fields per `db` is the weakest part, since an output schema exists and it borders on duplication.

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?

For a 17-parameter tool the description covers the essential behavioral surface an agent cannot get elsewhere: result envelope shape, the null-total trap, and error signaling, while annotations cover safety and schema covers parameters. Minor gaps remain around pagination semantics for offset/limit and any auth or rate-limit expectations.

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 every parameter, including alias collisions, the substring nature of `ligand`, the spaced-form requirement for `formula`, and that inapplicable filters are ignored. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

"Search PDBj for structures, chemical components, or BIRD molecules" names a specific verb and resource and maps each of the three `db` values to a concrete domain. It is clearly distinguishable from siblings like search_uniprot_entity or search_chembl_molecule by the PDBj scope, though it never explicitly contrasts itself with them.

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 only implied by the purpose sentence; the description gives no explicit when-to-use/when-not-to-use guidance and no routing advice among the many sibling search_* tools. The only conditional behavior mentioned is checking for an `error` key after a call, which is post-hoc rather than selection guidance.

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