Skip to main content
Glama

Get Compound Image

pubchem_get_compound_image
Read-onlyIdempotent

Retrieve 2D chemical structure diagrams from PubChem by CID. Specify small or large PNG image size to generate molecular visualizations for research and documentation.

Instructions

Fetch a 2D structure diagram (PNG image) for a compound by CID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID.
sizeNoImage size: "small" (100x100) or "large" (300x300). Default: "large".large

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID.
imageBase64YesBase64-encoded PNG image data.
mimeTypeYesImage MIME type.
widthYesImage width in pixels.
heightYesImage height in pixels.
Behavior3/5

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

Annotations cover read-only/idempotent safety. Description adds valuable behavioral context: output format (PNG) and content type (2D structure). Does not mention error handling for invalid CIDs, rate limits, or caching behavior, which would be helpful given openWorldHint.

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?

Single sentence, zero waste. Front-loaded with action (Fetch), output format (PNG), and key constraint (by CID). Every word 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?

Sufficient for a 2-parameter retrieval tool with full schema coverage and output schema present. Description adequately covers the tool's function without redundancy. Minor gap: does not acknowledge the optional 'size' parameter existence in prose, though schema is comprehensive.

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%, establishing baseline 3. Description mentions 'by CID' confirming the required parameter's purpose, but adds no further syntax or semantic details beyond what the schema already provides for 'size' (small/large dimensions).

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?

Specific verb 'Fetch' + precise resource '2D structure diagram (PNG image)' + key parameter 'by CID'. Clearly distinguishes from siblings like pubchem_get_compound_details (data) and pubchem_search_compounds (search).

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?

Provides clear context that this returns an image file format (PNG) versus data, helping agents select it for visualization needs. Lacks explicit comparison to specific siblings (e.g., 'use get_compound_details for structured data instead'), but the output type distinction is unambiguous.

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