Skip to main content
Glama
Augmented-Nature

SureChEMBL MCP Server

search_chemicals_by_name

Find chemical compounds in the SureChEMBL patent database using names, synonyms, or common terms to identify relevant patent information.

Instructions

Search for chemicals by name, synonym, or common name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesChemical name or synonym to search for
limitNoNumber of results to return (1-1000, default: 25)

Implementation Reference

  • The handler function that validates the input, calls the SureChEMBL API /chemical/name/{name} endpoint, and returns the search results as JSON.
    private async handleSearchChemicalsByName(args: any) {
      if (!args || typeof args.name !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid chemical name');
      }
    
      try {
        const response = await this.apiClient.get(`/chemical/name/${encodeURIComponent(args.name)}`);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to search chemicals: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • src/index.ts:388-398 (registration)
    Tool registration in the MCP server's listTools response, defining the tool name, description, and input schema.
      name: 'search_chemicals_by_name',
      description: 'Search for chemicals by name, synonym, or common name',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Chemical name or synonym to search for' },
          limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
        },
        required: ['name'],
      },
    },
  • JSON schema for tool inputs: requires 'name' string, optional 'limit' number (1-1000). Note: handler does not use 'limit'.
      type: 'object',
      properties: {
        name: { type: 'string', description: 'Chemical name or synonym to search for' },
        limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
      },
      required: ['name'],
    },
  • Switch case in CallToolRequestSchema handler that dispatches to the tool's handler function.
    case 'search_chemicals_by_name':
      return await this.handleSearchChemicalsByName(args);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the search functionality but lacks critical details: whether this is a read-only operation, if it requires authentication, rate limits, pagination behavior, or what the output format looks like. For a search tool with zero annotation coverage, this is a significant gap.

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: 'Search for chemicals by name, synonym, or common name.' It's front-loaded with the core purpose and wastes no words. Every part of the sentence contributes meaning.

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 tool's complexity (search operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error conditions, or behavioral constraints. For a search tool in a chemical database context, more context about result format (e.g., chemical IDs, names, properties) would be helpful.

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?

Schema description coverage is 100%, so the schema fully documents both parameters ('name' and 'limit'). The description adds no parameter-specific information beyond what's in the schema. It mentions 'name, synonym, or common name' which aligns with the schema's 'Chemical name or synonym to search for', but provides no additional syntax or format details. Baseline 3 is appropriate when 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: 'Search for chemicals by name, synonym, or common name.' It specifies the verb (search) and resource (chemicals), and indicates the search scope (name, synonym, common name). However, it doesn't explicitly differentiate from sibling tools like 'search_by_inchi' or 'search_by_smiles' which search by different chemical identifiers.

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 sibling tools like 'search_by_inchi' (for InChI strings) or 'search_by_smiles' (for SMILES notation), nor does it specify use cases or exclusions. The agent must infer usage from the tool name alone.

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