Skip to main content
Glama

batch_protein_lookup

Query multiple proteins in one operation using Human Protein Atlas data to retrieve details on expression, localization, and pathology in either JSON or TSV format.

Instructions

Look up multiple proteins simultaneously

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsNoSpecific columns to include in results
formatNoOutput format (default: json)
genesYesArray of gene symbols (max 100)

Implementation Reference

  • The handler function that executes the batch_protein_lookup tool. It validates input, fetches protein data for each gene in parallel using Promise.all and this.fetchProteinData, collects results with success flags, and returns JSON-formatted batch results or error.
    private async handleBatchProteinLookup(args: any) { if (!isValidBatchArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid batch lookup arguments'); } try { const results = await Promise.all( args.genes.map(async (gene: string) => { try { const data = await this.fetchProteinData(gene, args.format || 'json'); return { gene, data, success: true }; } catch (error) { return { gene, error: error instanceof Error ? error.message : 'Unknown error', success: false }; } }) ); return { content: [ { type: 'text', text: JSON.stringify({ batchResults: results }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error in batch lookup: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Input schema for batch_protein_lookup tool, defining genes array (required, 1-100 strings), optional format (json/tsv), and columns.
    inputSchema: { type: 'object', properties: { genes: { type: 'array', items: { type: 'string' }, description: 'Array of gene symbols (max 100)', minItems: 1, maxItems: 100 }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, columns: { type: 'array', items: { type: 'string' }, description: 'Specific columns to include in results' }, }, required: ['genes'], },
  • src/index.ts:622-634 (registration)
    Tool registration in the list of tools provided to ListToolsRequestHandler, including name, description, and inputSchema.
    { name: 'batch_protein_lookup', description: 'Look up multiple proteins simultaneously', inputSchema: { type: 'object', properties: { genes: { type: 'array', items: { type: 'string' }, description: 'Array of gene symbols (max 100)', minItems: 1, maxItems: 100 }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, columns: { type: 'array', items: { type: 'string' }, description: 'Specific columns to include in results' }, }, required: ['genes'], }, },
  • src/index.ts:700-701 (registration)
    Dispatch registration in the CallToolRequestHandler switch statement, routing calls to the handleBatchProteinLookup method.
    case 'batch_protein_lookup': return this.handleBatchProteinLookup(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/ProteinAtlas-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server