Skip to main content
Glama

search_by_patent_number

Find patents in the SureChEMBL chemical patent database by entering a specific patent or publication number 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 handler function that implements the core logic for the 'search_by_patent_number' tool. It validates the input patent number, queries the SureChEMBL API endpoint `/document/{patent_number}/contents`, and returns the patent document data or throws an error if not found.
    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)
    The tool registration entry in the ListToolsRequestSchema handler, defining the tool name, description, and input schema for 'search_by_patent_number'.
    { 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'], }, },
  • src/index.ts:550-551 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes calls to the 'search_by_patent_number' tool to its handler function.
    case 'search_by_patent_number': return await this.handleSearchByPatentNumber(args);
  • The input schema definition for the 'search_by_patent_number' tool, specifying a required 'patent_number' string parameter.
    inputSchema: { type: 'object', properties: { patent_number: { type: 'string', description: 'Patent or publication number' }, }, required: ['patent_number'], },

Other Tools

Related 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