Skip to main content
Glama
rcsb

io.github.rcsb/rcsb-mcp

Official
by rcsb

rcsb_search_by_chemical

Read-onlyIdempotent

Search PDB chemical components by SMILES/InChI or molecular formula to retrieve matching structures.

Instructions

Search PDB chemical components by structure (SMILES/InChI) or formula.

Args: value: A SMILES/InChI string (query_type="descriptor") or a molecular formula like "C8H9NO2" (query_type="formula"). query_type: "descriptor" (default) or "formula". descriptor_type: "SMILES" or "InChI" (descriptor queries only). match_type: Graph/fingerprint criterion for descriptor queries, one of: graph-exact, graph-strict, graph-relaxed (default), graph-relaxed-stereo (whole-molecule matches, strict->relaxed = stricter->looser); the sub-struct-graph-* variants of each (substructure search); or fingerprint-similarity (similar molecules). match_subset: Formula queries only — match formulas that merely contain the requested atoms. return_type: What to return (default "mol_definition" = the chemical component); see the "Return types and fetching details" note in the server instructions. limit: Max hits (1-100). offset: Number of hits to skip, for paging; pass the response's next_offset back with the same query to fetch the next page. all_hits: Return the COMPLETE result set in one call (for an explicit "ALL ..." request); ignores limit, can't be combined with offset, and is refused above 10000 hits. Ignored when facets is set. attributes: Optional structured filters AND/OR-combined with this match — a list of AttributeFilter {attribute, operator, value, negation?, case_sensitive?} (e.g. restrict to an organism or resolution). See rcsb_search_by_attribute / rcsb_list_pdb_search_attributes for paths and operators. logical_operator: Combine this match and the attribute conditions with "and" (default) or "or". facets: Optional aggregation specs to return a breakdown / distribution instead of hits (see the faceting note in the server instructions for the spec). group_by, group_by_ranking: Collapse redundant polymer_entity hits into clusters, one representative each (needs return_type="polymer_entity") — see the grouping note in the server instructions. sort_by: Attribute path to order the hits by, replacing the default score ordering (each hit's score is still returned); omit to keep it. Only SORTABLE attributes work: those listing exact_match (strings) or equals (numbers/dates) in rcsb_list_pdb_search_attributes; full-text-only attributes (e.g. struct.title) and return_type="mol_definition" are rejected. sort_direction: "asc" (default) or "desc"; applies only when sort_by is set.

Returns: {total_count, returned, offset, has_more, next_offset, hits:[{id, score}], editor}; with facets, instead returns {total_count, facets, editor}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
valueYes
facetsNo
offsetNo
sort_byNo
all_hitsNo
group_byNo
attributesNo
match_typeNograph-relaxed
query_typeNodescriptor
return_typeNomol_definition
match_subsetNo
sort_directionNoasc
descriptor_typeNoSMILES
group_by_rankingNo
logical_operatorNoand

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, but the description adds substantial behavioral context: pagination via next_offset, all_hits limits (refused above 10000), sorting restrictions (full-text-only attributes rejected, mol_definition rejected), and the facts that facets returns a distribution instead of hits. This goes far beyond the structured annotations.

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?

Despite its length, the description is tightly organized: purpose sentence, Args list with one line per parameter, and a Returns block. Every sentence adds necessary info for a 16-parameter tool. It avoids fluff and uses parentheticals to pack meaning efficiently.

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 high complexity (16 parameters, nested attribute filters, multiple return types), the description covers all parameters, explains the two possible return shapes (hits vs facets), and references server instructions for faceting/grouping details. The output schema is described in Returns, so no major gaps remain.

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 description coverage is 0%, but the description compensates fully. For example, match_type explains the strict-to-relaxed spectrum and substructure variants, match_subset is defined for formula queries, sort_by details which attributes are sortable and what is rejected, and attributes describes how to combine with AND/OR. Every parameter receives meaningful, non-redundant explanation.

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 opens with 'Search PDB chemical components by structure (SMILES/InChI) or formula,' clearly stating the specific verb, resource, and scope. It distinguishes itself from sibling search tools like rcsb_search_fulltext, rcsb_search_by_attribute, and rcsb_search_by_structure by focusing on chemical components and their match types.

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?

The tool's domain is clear from the first line, implying it is for chemical structure/formula queries, but it never explicitly contrasts with sibling tools or states when not to use it. While it references rcsb_search_by_attribute for attribute paths, it does not give when-to-use versus when-to-choose-another-tool guidance.

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/rcsb/rcsb-mcp'

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