Skip to main content
Glama

get_3d_conformers

Retrieve 3D molecular conformer data and structural information from PubChem's chemical database using compound IDs for molecular modeling and analysis.

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 main handler function that implements the logic for the 'get_3d_conformers' tool by validating input and fetching 3D conformer properties (Volume3D, ConformerCount3D) from the PubChem API.
    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, registered in the tools list.
    {
      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'],
      },
    },
  • Helper function for validating the input arguments specific to the 'get_3d_conformers' tool.
    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))
      );
    };
  • src/index.ts:760-761 (registration)
    Registration of the 'get_3d_conformers' handler in the main tool dispatcher switch statement.
    case 'get_3d_conformers':
      return await this.handleGet3dConformers(args);

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
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 of behavioral disclosure. It mentions 'Get' which implies a read operation, but doesn't specify aspects like rate limits, authentication needs, data formats, or potential side effects. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 extremely concise and front-loaded with a single, clear sentence that states the tool's purpose without any wasted words. It efficiently communicates the core function, making it easy for an agent 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 molecular data retrieval and the lack of annotations and output schema, the description is insufficient. It doesn't explain what '3D conformer data and structural information' entails, the format of returned data, or any limitations, leaving the agent with incomplete context for proper tool invocation.

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?

The input schema has 100% description coverage, clearly documenting both parameters (cid and conformer_type) with details like data types and enums. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score without compensating for any gaps.

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 tool's purpose with a specific verb ('Get') and resource ('3D conformer data and structural information'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_compound_info' or 'calculate_descriptors', which might also provide structural data, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools available for compound analysis, there is no mention of specific use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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