Skip to main content
Glama
Augmented-Nature

SureChEMBL MCP Server

get_chemical_by_id

Retrieve detailed chemical information from the SureChEMBL patent database using a specific chemical identifier.

Instructions

Get detailed chemical information by SureChEMBL chemical ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chemical_idYesSureChEMBL chemical ID (numeric)

Implementation Reference

  • The main handler function that executes the tool logic: validates the chemical_id input, fetches data from SureChEMBL API (/chemical/id/{id}), and returns the JSON response.
    private async handleGetChemicalById(args: any) {
      if (!args || typeof args.chemical_id !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid chemical ID');
      }
    
      try {
        const response = await this.apiClient.get(`/chemical/id/${args.chemical_id}`);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get chemical: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • Tool schema definition in the ListTools response, specifying the input parameters and requirements.
    {
      name: 'get_chemical_by_id',
      description: 'Get detailed chemical information by SureChEMBL chemical ID',
      inputSchema: {
        type: 'object',
        properties: {
          chemical_id: { type: 'string', description: 'SureChEMBL chemical ID (numeric)' },
        },
        required: ['chemical_id'],
      },
    },
  • src/index.ts:555-556 (registration)
    Tool dispatch registration in the CallToolRequestSchema handler switch statement, routing calls to the handler function.
    case 'get_chemical_by_id':
      return await this.handleGetChemicalById(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves 'detailed chemical information' but doesn't specify what that entails (e.g., structure, properties, metadata), whether it's a read-only operation, potential errors (e.g., invalid ID), or any rate limits. This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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, direct sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the key action and resource, making it easy to parse quickly, which is ideal for conciseness in tool descriptions.

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 lack of annotations and output schema, the description is insufficient for a tool that presumably returns complex chemical data. It doesn't explain what 'detailed chemical information' includes, potential response formats, or error handling, leaving the agent with incomplete context for effective use in a chemistry-focused environment.

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 schema description coverage is 100%, with the parameter 'chemical_id' fully documented in the schema as 'SureChEMBL chemical ID (numeric)'. The description adds no additional parameter semantics beyond this, such as format examples or constraints, so it meets the baseline for adequate but not enhanced parameter understanding.

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 action ('Get detailed chemical information') and resource ('by SureChEMBL chemical ID'), making the purpose unambiguous. However, it doesn't explicitly differentiate this from sibling tools like 'get_chemical_properties' or 'get_chemical_frequency', which might also retrieve chemical data but through different mechanisms or with different scopes.

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. It doesn't mention prerequisites (e.g., needing a valid SureChEMBL ID), exclusions, or comparisons to siblings like 'search_chemicals_by_name' or 'get_chemical_properties', leaving the agent to infer usage context solely from the tool name and description.

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

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