Skip to main content
Glama
Augmented-Nature

SureChEMBL MCP Server

search_by_smiles

Find chemical compounds in the SureChEMBL patent database using SMILES structure notation to identify related patents and substances.

Instructions

Search for chemicals by SMILES structure notation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
smilesYesSMILES string of the chemical structure
limitNoNumber of results to return (1-1000, default: 25)

Implementation Reference

  • The handler function that implements the core logic for the 'search_by_smiles' tool. It validates the SMILES input and returns a structured response indicating that direct SMILES search is not supported by the SureChEMBL API, providing alternatives.
    private async handleSearchBySmiles(args: any) {
      if (!args || typeof args.smiles !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid SMILES string');
      }
    
      try {
        // SureChEMBL doesn't have direct SMILES search, so we'll return a helpful message
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                message: 'SMILES search not directly supported by SureChEMBL API',
                smiles: args.smiles,
                suggestion: 'Try converting SMILES to chemical name or use structure-based search tools'
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to search by SMILES: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • src/index.ts:410-421 (registration)
    Registration of the 'search_by_smiles' tool in the ListToolsRequestSchema response, including name, description, and input schema definition.
    {
      name: 'search_by_smiles',
      description: 'Search for chemicals by SMILES structure notation',
      inputSchema: {
        type: 'object',
        properties: {
          smiles: { type: 'string', description: 'SMILES string of the chemical structure' },
          limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
        },
        required: ['smiles'],
      },
    },
  • src/index.ts:557-558 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes calls to the search_by_smiles handler function.
    case 'search_by_smiles':
      return await this.handleSearchBySmiles(args);
  • Input schema defining the parameters for the search_by_smiles tool: required SMILES string and optional limit.
    inputSchema: {
      type: 'object',
      properties: {
        smiles: { type: 'string', description: 'SMILES string of the chemical structure' },
        limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
      },
      required: ['smiles'],
    },
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 is for searching, implying a read operation, but doesn't cover critical aspects like whether it's a fuzzy or exact match search, what the output format is (e.g., list of chemicals with IDs), performance characteristics (e.g., speed, accuracy), or error handling. For a search tool with no annotation coverage, this is a significant gap in behavioral context.

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 SMILES structure notation.' It's front-loaded with the core purpose, has zero wasted words, and is appropriately sized for a straightforward search tool. Every part of the sentence contributes directly to understanding the tool's function.

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 complexity of a chemical search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the search returns (e.g., chemical IDs, names, properties), how results are ordered, or potential limitations (e.g., database coverage). For a tool with 2 parameters and no structured output information, the description should provide more context to guide effective use.

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 clear documentation for both parameters: 'smiles' as the SMILES string and 'limit' with range and default. The description adds no additional parameter semantics beyond what's in the schema, such as examples of valid SMILES strings or how the limit applies to results. With high schema coverage, the baseline score of 3 is appropriate, as 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: 'Search for chemicals by SMILES structure notation.' It specifies the verb ('Search'), resource ('chemicals'), and method ('by SMILES structure notation'). However, it doesn't explicitly distinguish this tool from its sibling 'search_by_inchi' or 'search_similar_structures,' which are related chemical search tools. The purpose is clear but lacks sibling differentiation.

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 notation), 'search_chemicals_by_name' (for name-based search), or 'search_similar_structures' (for structural similarity). There's no context on prerequisites, exclusions, or recommended scenarios, leaving the agent to 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