Skip to main content
Glama
Augmented-Nature

SureChEMBL MCP Server

search_by_inchi

Find chemicals in the SureChEMBL patent database using InChI strings or InChI keys to identify compounds and their patent information.

Instructions

Search for chemicals by InChI or InChI key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inchiYesInChI string or InChI key
limitNoNumber of results to return (1-1000, default: 25)

Implementation Reference

  • The handler function that executes the tool logic for 'search_by_inchi'. It validates the input 'inchi' parameter and returns a standardized response indicating that direct InChI search is not supported by the SureChEMBL API, providing a helpful message and suggestion.
    private async handleSearchByInchi(args: any) {
      if (!args || typeof args.inchi !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid InChI string');
      }
    
      try {
        // SureChEMBL doesn't have direct InChI search, so we'll return a helpful message
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                message: 'InChI search not directly supported by SureChEMBL API',
                inchi: args.inchi,
                suggestion: 'Try converting InChI to chemical name or use chemical ID lookup'
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to search by InChI: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • The input schema definition for the 'search_by_inchi' tool, including properties for 'inchi' (required string) and optional 'limit' (number between 1-1000). This is part of the tools list returned by ListToolsRequest.
    {
      name: 'search_by_inchi',
      description: 'Search for chemicals by InChI or InChI key',
      inputSchema: {
        type: 'object',
        properties: {
          inchi: { type: 'string', description: 'InChI string or InChI key' },
          limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
        },
        required: ['inchi'],
      },
    },
  • src/index.ts:559-560 (registration)
    The switch case in the CallToolRequest handler that registers and dispatches 'search_by_inchi' calls to the handleSearchByInchi method.
    case 'search_by_inchi':
      return await this.handleSearchByInchi(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 but only states the basic function. It doesn't cover aspects like whether this is a read-only operation, potential rate limits, authentication needs, error handling, or what the search results might include (e.g., chemical IDs, names, properties). This leaves significant gaps in understanding the tool's 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, direct sentence with zero wasted words, efficiently conveying the core purpose. It is appropriately sized and front-loaded, making it easy to parse without unnecessary elaboration.

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 search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., chemical records, IDs, or error messages), how results are structured, or any limitations (e.g., partial matches, case sensitivity). This leaves the agent without sufficient context for 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 schema description coverage is 100%, with clear documentation for both parameters ('inchi' as the search string and 'limit' with range and default). The description adds no additional parameter semantics beyond what the schema provides, such as examples of InChI formats or search behavior nuances, so it meets the baseline for high schema coverage.

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 ('Search for chemicals') and the resource ('by InChI or InChI key'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_by_smiles' or 'search_chemicals_by_name', which would require mentioning the specific chemical identifier type used.

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_smiles' for SMILES strings or 'search_chemicals_by_name' for name-based searches, nor does it specify prerequisites or contexts where InChI searching is preferred.

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