Skip to main content
Glama

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);

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