get_patent_family
Retrieve patent family members and relationships for a given patent ID using SureChEMBL MCP Server to identify related patents within the chemical patent database.
Instructions
Get patent family members and relationships for a patent
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patent_id | Yes | Patent ID to find family members for |
Implementation Reference
- src/index.ts:651-672 (handler)The main handler function that implements the get_patent_family tool logic. Validates input, calls the API to fetch patent family members, returns JSON response or throws error.private async handleGetPatentFamily(args: any) { if (!isValidIdArgs({ id: args.patent_id })) { throw new McpError(ErrorCode.InvalidParams, 'Invalid patent ID'); } try { const response = await this.apiClient.get(`/document/${args.patent_id}/family/members`); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Failed to get patent family: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
- src/index.ts:364-373 (schema)Input schema definition for the get_patent_family tool, specifying the required 'patent_id' parameter.{ name: 'get_patent_family', description: 'Get patent family members and relationships for a patent', inputSchema: { type: 'object', properties: { patent_id: { type: 'string', description: 'Patent ID to find family members for' }, }, required: ['patent_id'], },
- src/index.ts:548-549 (registration)Registration in the tool dispatch switch statement, routing 'get_patent_family' calls to the handler.case 'get_patent_family': return await this.handleGetPatentFamily(args);
- src/index.ts:535-536 (registration)Tool registration via this.server.setTools, including the get_patent_family tool in the list.], }));