Skip to main content
Glama

get_target_pathways

Retrieve biological pathways linked to a specific ChEMBL target ID to understand its role in cellular processes.

Instructions

Get biological pathways associated with a target

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_chembl_idYesChEMBL target ID

Implementation Reference

  • The handler function for the 'get_target_pathways' tool. It validates the input target_chembl_id, fetches target data from ChEMBL API, extracts pathway information from cross-references (filtering Reactome, KEGG, WikiPathways), and returns formatted JSON.
    private async handleGetTargetPathways(args: any) { if (!args || typeof args.target_chembl_id !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Invalid target pathways arguments'); } try { // Get target information which includes pathway data const targetResponse = await this.apiClient.get(`/target/${args.target_chembl_id}.json`); const target = targetResponse.data; // Extract pathway information from target data const pathways = { target_chembl_id: args.target_chembl_id, target_name: target.pref_name, target_type: target.target_type, cross_references: target.cross_references || [], pathways: (target.cross_references || []).filter((ref: any) => ref.xref_src === 'Reactome' || ref.xref_src === 'KEGG' || ref.xref_src === 'WikiPathways' ), }; return { content: [ { type: 'text', text: JSON.stringify(pathways, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Failed to get target pathways: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
  • The tool schema definition in the list of tools returned by ListToolsRequestSchema, including name, description, and input schema requiring 'target_chembl_id'.
    name: 'get_target_pathways', description: 'Get biological pathways associated with a target', inputSchema: { type: 'object', properties: { target_chembl_id: { type: 'string', description: 'ChEMBL target ID' }, }, required: ['target_chembl_id'], }, },
  • src/index.ts:764-765 (registration)
    The registration/dispatch case in the CallToolRequestSchema handler's switch statement that routes calls to the handleGetTargetPathways function.
    case 'get_target_pathways': return await this.handleGetTargetPathways(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/ChEMBL-MCP-Server'

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