Skip to main content
Glama
Augmented-Nature

SureChEMBL MCP Server

search_by_patent_number

Find patents in the SureChEMBL chemical patent database using specific patent or publication numbers to retrieve detailed information.

Instructions

Search for patents by specific patent numbers or publication numbers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patent_numberYesPatent or publication number

Implementation Reference

  • The main handler function that validates the input patent_number and retrieves the patent document contents by making an API call to the SureChEMBL endpoint `/document/{patent_number}/contents`. Returns formatted JSON response or throws MCP errors.
    private async handleSearchByPatentNumber(args: any) {
      if (!args || typeof args.patent_number !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid patent number');
      }
    
      try {
        // Try to get document content directly
        const response = await this.apiClient.get(`/document/${args.patent_number}/contents`);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                patent_number: args.patent_number,
                document: response.data
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to find patent: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • src/index.ts:375-385 (registration)
    Registers the 'search_by_patent_number' tool with the MCP server, providing the tool name, description, and input schema for validation.
    {
      name: 'search_by_patent_number',
      description: 'Search for patents by specific patent numbers or publication numbers',
      inputSchema: {
        type: 'object',
        properties: {
          patent_number: { type: 'string', description: 'Patent or publication number' },
        },
        required: ['patent_number'],
      },
    },
  • Dispatch case in the central tool request handler switch statement that routes calls to the specific handleSearchByPatentNumber method.
    case 'search_by_patent_number':
      return await this.handleSearchByPatentNumber(args);
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 searches for patents but doesn't describe what the search returns (e.g., patent details, metadata, or a list), whether it's a read-only operation, or any limitations like rate limits or authentication needs. For a search tool with zero annotation coverage, this is a significant gap in transparency.

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 function without unnecessary words. It's front-loaded with the core purpose, making it easy to parse quickly. Every part of the sentence earns its place by clarifying the action and criteria.

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 incomplete. It doesn't explain what the tool returns (e.g., patent data, error messages), behavioral traits like read-only status, or usage constraints. For a search tool with no structured output information, the description should provide more context to help an agent understand the full scope of the tool's operation.

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 description mentions searching by 'patent numbers or publication numbers,' which aligns with the single parameter 'patent_number' in the schema. Since schema description coverage is 100% (the parameter is well-documented as 'Patent or publication number'), the description adds minimal value beyond the schema. This meets the baseline of 3, as the schema does the heavy lifting for parameter documentation.

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 patents by specific patent numbers or publication numbers.' It specifies the verb ('search'), resource ('patents'), and criteria ('patent numbers or publication numbers'), making it easy to understand. However, it doesn't explicitly differentiate from siblings like 'search_patents' or 'get_patent_family,' which could cause confusion.

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 when to choose it over siblings like 'search_patents' (which might have broader search capabilities) or 'get_patent_family' (which might retrieve related patents). Without such context, an agent might struggle to select the correct tool for a given task.

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