Skip to main content
Glama
Augmented-Nature

ChEMBL MCP Server

get_mechanism_of_action

Retrieve mechanism of action and target interaction data for ChEMBL compounds to understand how drugs work at the molecular level.

Instructions

Get mechanism of action and target interaction data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chembl_idYesChEMBL compound ID

Implementation Reference

  • The handler function that implements the 'get_mechanism_of_action' tool. It validates the input ChEMBL ID, queries the ChEMBL /mechanism.json endpoint, and returns the mechanism of action data as JSON.
    private async handleGetMechanismOfAction(args: any) {
      if (!isValidChemblIdArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid mechanism of action arguments');
      }
    
      try {
        const response = await this.apiClient.get('/mechanism.json', {
          params: {
            molecule_chembl_id: args.chembl_id,
            limit: 50,
          },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get mechanism of action: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • src/index.ts:784-785 (registration)
    Registration and dispatch of the 'get_mechanism_of_action' tool in the CallToolRequestSchema switch statement.
    case 'get_mechanism_of_action':
      return await this.handleGetMechanismOfAction(args);
  • Tool schema definition including name, description, and input schema for 'get_mechanism_of_action' in the ListToolsRequestSchema response.
      name: 'get_mechanism_of_action',
      description: 'Get mechanism of action and target interaction data',
      inputSchema: {
        type: 'object',
        properties: {
          chembl_id: { type: 'string', description: 'ChEMBL compound ID' },
        },
        required: ['chembl_id'],
      },
    },
  • Helper function for validating ChEMBL ID arguments, used in the get_mechanism_of_action 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
      );
    };
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 retrieves data ('get'), implying a read-only operation, but doesn't clarify aspects like rate limits, authentication needs, error handling, or response format. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter with full schema coverage but no annotations or output schema, the description is minimally adequate. It clarifies the tool's purpose but lacks details on behavioral traits, usage context, and return values, which are important for a data retrieval tool in a complex domain like drug discovery.

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 'chembl_id' clearly documented. The description doesn't add any meaning beyond the schema (e.g., it doesn't explain what a ChEMBL ID is or provide usage examples), so it meets the baseline score of 3 where the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with specific verbs ('get mechanism of action and target interaction data') and identifies the resource (compound data via ChEMBL ID). However, it doesn't explicitly differentiate from sibling tools like 'get_compound_info' or 'get_target_info' that might provide overlapping or related data, which prevents a perfect score.

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 provides no guidance on when to use this tool versus alternatives. With many sibling tools available (e.g., 'get_compound_info', 'get_target_info', 'search_activities'), there's no indication of context, prerequisites, or exclusions for selecting this specific tool over others.

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

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