Skip to main content
Glama
Augmented-Nature

Unofficial PubChem MCP Server

analyze_stereochemistry

Analyze stereochemistry, chirality, and isomer information for chemical compounds using PubChem CID to identify molecular configurations and structural variations.

Instructions

Analyze stereochemistry, chirality, and isomer information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID (CID)

Implementation Reference

  • The handler function that implements the core logic of the 'analyze_stereochemistry' tool. It validates the input CID, queries the PubChem API for stereochemistry properties (AtomStereoCount, DefinedAtomStereoCount, BondStereoCount, DefinedBondStereoCount, IsomericSMILES), and returns the formatted response.
    private async handleAnalyzeStereochemistry(args: any) {
      if (!isValidCidArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid stereochemistry arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/compound/cid/${args.cid}/property/AtomStereoCount,DefinedAtomStereoCount,BondStereoCount,DefinedBondStereoCount,IsomericSMILES/JSON`);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                cid: args.cid,
                stereochemistry: response.data,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to analyze stereochemistry: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • Input schema definition for the tool, specifying that a 'cid' (PubChem Compound ID) is required as number or string.
    inputSchema: {
      type: 'object',
      properties: {
        cid: { type: ['number', 'string'], description: 'PubChem Compound ID (CID)' },
      },
      required: ['cid'],
    },
  • src/index.ts:491-500 (registration)
    Tool registration object added to the MCP server's tools list, including name, description, and input schema.
      name: 'analyze_stereochemistry',
      description: 'Analyze stereochemistry, chirality, and isomer information',
      inputSchema: {
        type: 'object',
        properties: {
          cid: { type: ['number', 'string'], description: 'PubChem Compound ID (CID)' },
        },
        required: ['cid'],
      },
    },
  • src/index.ts:762-763 (registration)
    Dispatch case in the main request handler that routes calls to the specific handler function.
    case 'analyze_stereochemistry':
      return await this.handleAnalyzeStereochemistry(args);
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 states the tool 'analyzes' information, implying a read-only operation, but doesn't specify if it's computationally intensive, requires specific permissions, or has rate limits. For a tool with no annotations, this leaves significant gaps in understanding its behavior and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that lists the key analysis areas without unnecessary words. It's front-loaded with the main purpose, though it could be slightly more structured by explicitly mentioning the input parameter. Overall, it's concise and well-sized for its content.

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 stereochemistry analysis, no annotations, and no output schema, the description is incomplete. It doesn't explain what the analysis entails, the format or depth of results, or any limitations. For a tool that likely returns detailed chemical data, this leaves the agent with insufficient context to use it effectively.

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, with the 'cid' parameter clearly documented as a PubChem Compound ID. The description doesn't add any meaning beyond this, such as explaining what types of stereochemistry analysis are performed or how the CID is used. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool analyzes stereochemistry, chirality, and isomer information, which provides a general purpose. However, it lacks specificity about what resource it operates on (compounds identified by CID) and doesn't distinguish itself from sibling tools like 'get_compound_properties' or 'calculate_descriptors' that might also provide stereochemical insights. The purpose is clear but not sufficiently differentiated.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, such as when to choose this over 'get_compound_info' or 'calculate_descriptors' for stereochemistry data. Without any usage hints, the agent must infer based on tool names alone.

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