Skip to main content
Glama

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);

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