Skip to main content
Glama

Get Compound Cross-References

pubchem_get_compound_xrefs
Read-onlyIdempotent

Retrieve cross-references for a PubChem compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs, with pagination support.

Instructions

Get external database cross-references for a compound: PubMed citations, patent IDs, gene/protein associations, registry numbers, and taxonomy IDs. Results are paged per type — capped at maxPerType with the total count reported; reach the IDs past a page with offset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds.
offsetNoZero-based index of the first ID to return within each xref type. The same offset is applied to every requested type. Pass the nextOffset from a previous call to read the following page. Default: 0.
xrefTypesYesCross-reference types to retrieve. String IDs: RegistryID (DSSTox/EPA registry numbers), RN (CAS numbers), PatentID. Numeric IDs: PubMedID, GeneID (NCBI Gene), ProteinGI (legacy NCBI Protein GI), TaxonomyID.
maxPerTypeNoMax IDs to return per xref type per page (1-500). A compound may have thousands of PubMed references; use offset to reach the ones past this page. Total count always reported. Default: 50.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID.
xrefsYesCross-references grouped by type.
noticeNoRecovery guidance when every requested xref type returned zero IDs, when the offset runs past every type, or when further pages remain. Absent when this page is complete and non-empty.
offsetYesZero-based index of the first ID returned within each type.
nextOffsetNoOffset to pass on the next call to continue past this page. Omitted when no requested type has further IDs.
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds paging behavior details (capped results, total count reported, offset across types) that go beyond annotations, providing useful operational context.

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 two sentences: first defines purpose, second explains paging. No redundant words, efficient and front-loaded. Every sentence earns its place.

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?

Given the tool's complexity (4 parameters, existing output schema), the description covers key behaviors (paging, pagination across types, total count). It does not discuss edge cases (e.g., missing xref types), but the openWorldHint annotation covers data incompleteness. Overall sufficient.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining pagination mechanics (capped maxPerType, offset applied to each type) and summarizing cross-reference types, which complements 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 clearly states the tool retrieves 'external database cross-references for a compound' and lists specific types (PubMed, patents, genes, etc.), distinguishing it from sibling tools like pubchem_get_compound_details or pubchem_get_bioactivity.

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 description explains paging behavior (maxPerType, offset, total count) but does not explicitly state when to use this tool versus alternatives like pubchem_search_compounds or other getters. Usage is implied but not contrasted with siblings.

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/cyanheads/pubchem-mcp-server'

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