Skip to main content
Glama
Augmented-Nature

Unofficial PubChem MCP Server

get_3d_conformers

Retrieve 3D molecular conformer data and structural information from PubChem using compound IDs to support chemical analysis and visualization.

Instructions

Get 3D conformer data and structural information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID (CID)
conformer_typeNoType of conformer data (default: 3d)

Implementation Reference

  • The core handler function for the 'get_3d_conformers' tool. Validates input using isValidConformerArgs, fetches 3D conformer properties (Volume3D, ConformerCount3D) from PubChem API via axios, and returns formatted JSON response or throws MCP errors.
    private async handleGet3dConformers(args: any) {
      if (!isValidConformerArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid 3D conformer arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/compound/cid/${args.cid}/property/Volume3D,ConformerCount3D/JSON`);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                cid: args.cid,
                conformer_type: args.conformer_type || '3d',
                properties: response.data,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get 3D conformers: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • The input schema definition for the 'get_3d_conformers' tool, specifying parameters cid (required, number or string) and optional conformer_type (enum '3d' or '2d'). Used in tool listing.
    inputSchema: {
      type: 'object',
      properties: {
        cid: { type: ['number', 'string'], description: 'PubChem Compound ID (CID)' },
        conformer_type: { type: 'string', enum: ['3d', '2d'], description: 'Type of conformer data (default: 3d)' },
      },
      required: ['cid'],
    },
  • src/index.ts:478-490 (registration)
    Registration of the 'get_3d_conformers' tool in the ListToolsRequestSchema response, including name, description, and input schema.
    {
      name: 'get_3d_conformers',
      description: 'Get 3D conformer data and structural information',
      inputSchema: {
        type: 'object',
        properties: {
          cid: { type: ['number', 'string'], description: 'PubChem Compound ID (CID)' },
          conformer_type: { type: 'string', enum: ['3d', '2d'], description: 'Type of conformer data (default: 3d)' },
        },
        required: ['cid'],
      },
    },
    {
  • src/index.ts:760-761 (registration)
    Dispatch/registration case in the CallToolRequestSchema switch statement that routes calls to the handleGet3dConformers handler.
    case 'get_3d_conformers':
      return await this.handleGet3dConformers(args);
  • Type guard helper function for validating arguments to the get_3d_conformers tool, checking cid and conformer_type types.
    const isValidConformerArgs = (
      args: any
    ): args is { cid: number | string; conformer_type?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        (typeof args.cid === 'number' || typeof args.cid === 'string') &&
        (args.conformer_type === undefined || ['3d', '2d'].includes(args.conformer_type))
      );
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'Get 3D conformer data and structural information' but doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires authentication, potential rate limits, or what the output format looks like (e.g., file types, data structure). This leaves significant gaps for an agent to understand how to use it effectively.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving 3D conformer data, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., coordinates, energy levels, file formats), any prerequisites, or error conditions. This makes it inadequate for an agent to fully understand the tool's behavior and outputs.

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 both parameters (cid and conformer_type) with descriptions and an enum. The description adds no additional meaning beyond what the schema provides, such as explaining what '3D conformer data' entails or how the conformer_type affects results. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description clearly states the action ('Get') and the resource ('3D conformer data and structural information'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_compound_info' or 'calculate_descriptors' that might also provide structural data, so it's not fully specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this is for retrieving pre-computed conformers versus generating new ones, or how it differs from sibling tools like 'get_compound_properties' or 'calculate_descriptors' that might offer related data.

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/Augmented-Nature/Augmented-Nature-PubChem-MCP-Server'

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