get_antibody_info
Retrieve antibody validation and staining data for specific proteins from the Human Protein Atlas to support research and analysis.
Instructions
Get antibody validation and staining information for a protein
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gene | Yes | Gene symbol | |
| format | No | Output format (default: json) |
Implementation Reference
- src/index.ts:1138-1164 (handler)The main handler function for the 'get_antibody_info' tool. Validates input using isValidGeneArgs, fetches antibody information using the helper method, formats as JSON text response, or returns error.private async handleGetAntibodyInfo(args: any) { if (!isValidGeneArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid gene arguments'); } try { const result = await this.fetchAntibodyInfo(args.gene); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching antibody info: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
- src/index.ts:589-600 (registration)Tool registration in the ListToolsRequestSchema handler, defining name, description, and input schema for 'get_antibody_info'.{ name: 'get_antibody_info', description: 'Get antibody validation and staining information for a protein', inputSchema: { type: 'object', properties: { gene: { type: 'string', description: 'Gene symbol' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, }, required: ['gene'], }, },
- src/index.ts:773-776 (helper)Helper method that performs the API call to retrieve antibody information by searching with specific antibody-related columns.private async fetchAntibodyInfo(gene: string): Promise<any> { const columns = ['g', 'eg', 'ab', 'abrr', 'relih', 'relmb', 'relce']; return this.searchProteins(gene, 'json', columns, 1); }
- src/index.ts:695-696 (registration)Dispatcher case in CallToolRequestSchema handler that routes calls to the specific tool handler.case 'get_antibody_info': return this.handleGetAntibodyInfo(args);