Skip to main content
Glama

get_compound_info

Retrieve comprehensive details about a compound by providing its ChEMBL ID, such as CHEMBL59, using this tool on the ChEMBL MCP Server.

Instructions

Get detailed information for a specific compound by ChEMBL ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chembl_idYesChEMBL compound ID (e.g., CHEMBL59)

Implementation Reference

  • The handler function that validates the input chembl_id and fetches detailed compound information from the ChEMBL API endpoint, returning the JSON response.
    private async handleGetCompoundInfo(args: any) { if (!isValidChemblIdArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid ChEMBL ID arguments'); } try { const response = await this.apiClient.get(`/molecule/${args.chembl_id}.json`); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Failed to get compound info: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
  • src/index.ts:410-419 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for get_compound_info.
    name: 'get_compound_info', description: 'Get detailed information for a specific compound by ChEMBL ID', inputSchema: { type: 'object', properties: { chembl_id: { type: 'string', description: 'ChEMBL compound ID (e.g., CHEMBL59)' }, }, required: ['chembl_id'], }, },
  • Input schema definition specifying the required 'chembl_id' parameter as a string.
    type: 'object', properties: { chembl_id: { type: 'string', description: 'ChEMBL compound ID (e.g., CHEMBL59)' }, }, required: ['chembl_id'], },
  • src/index.ts:747-749 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement that routes calls to the handler.
    case 'get_compound_info': return await this.handleGetCompoundInfo(args); case 'search_by_inchi':
  • Helper function for input validation, checking if arguments contain a valid non-empty chembl_id string. Used by get_compound_info handler.
    const isValidChemblIdArgs = ( args: any ): args is { chembl_id: string } => { return ( typeof args === 'object' && args !== null && typeof args.chembl_id === 'string' && args.chembl_id.length > 0 ); };

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

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