Skip to main content
Glama
Augmented-Nature

PubChem MCP Server

analyze_stereochemistry

Identify and analyze stereochemistry, chirality, and isomer details for chemical compounds using PubChem CIDs. Designed for chemical structure evaluation and research purposes.

Instructions

Analyze stereochemistry, chirality, and isomer information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cidYesPubChem Compound ID (CID)

Implementation Reference

  • Executes the tool by validating CID input and fetching stereochemistry properties (AtomStereoCount, DefinedAtomStereoCount, BondStereoCount, DefinedBondStereoCount, IsomericSMILES) from PubChem API, returning formatted JSON 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'}`
        );
      }
    }
  • Defines the input schema requiring a PubChem CID (number or string).
    inputSchema: {
      type: 'object',
      properties: {
        cid: { type: ['number', 'string'], description: 'PubChem Compound ID (CID)' },
      },
      required: ['cid'],
    },
  • src/index.ts:490-500 (registration)
    Registers the tool in the ListTools response with 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)
    Dispatches tool calls to the specific handler in the CallToolRequest switch statement.
    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. The description only states what the tool analyzes but doesn't reveal any behavioral traits - whether it performs calculations, retrieves pre-computed data, requires specific permissions, has rate limits, returns structured data, or has any side effects. For a tool with zero annotation coverage, this is a significant gap in behavioral transparency.

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 extremely concise - just 6 words listing three analysis domains. While efficient, it may be too brief given the lack of other contextual information. The structure is simple and front-loaded with the core purpose, but could benefit from additional context to make it more helpful for an AI agent.

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 stereochemical analysis and the absence of both annotations and output schema, the description is incomplete. It doesn't explain what kind of analysis is performed, what format the results take, whether this is a computational or lookup operation, or how it differs from related compound analysis tools. For a specialized analytical tool with no structured metadata, the description should provide more context about the operation and expected 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?

The input schema has 100% description coverage, with the single parameter 'cid' clearly documented as 'PubChem Compound ID (CID)'. The description doesn't add any parameter information beyond what's in the schema. With high schema coverage and only one parameter, the baseline score of 3 is appropriate - the schema does the heavy lifting, and the description doesn't need to compensate for gaps.

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 gives a general purpose but lacks specificity about what resource or data source it operates on. It doesn't distinguish itself from siblings like 'get_compound_properties' or 'calculate_descriptors' that might also provide stereochemical information. The description is vague about whether this is a calculation, retrieval, or analysis operation.

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 about when to use this tool versus alternatives. With many sibling tools available for compound analysis (like get_compound_info, calculate_descriptors, get_3d_conformers), the description gives no indication of what makes this tool unique or when it should be preferred over other compound analysis tools. There's no mention of prerequisites, limitations, or typical use cases.

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

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

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