Skip to main content
Glama
Augmented-Nature

ProteinAtlas MCP Server

batch_protein_lookup

Look up multiple proteins simultaneously to retrieve Human Protein Atlas data on expression, localization, and pathology for up to 100 genes at once.

Instructions

Look up multiple proteins simultaneously

Input Schema

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

Implementation Reference

  • The handler function for the batch_protein_lookup tool. Validates input, fetches protein data for each gene concurrently using Promise.all and fetchProteinData, collects results with success/error status, and returns formatted JSON response.
    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 definition for the batch_protein_lookup tool, specifying genes array (1-100 items), optional format 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 ListToolsRequestSchema handler, defining name, description, and input schema for batch_protein_lookup.
    {
      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'],
      },
    },
  • Type guard function used in the handler to validate batch_protein_lookup input arguments, checking genes array validity and optional format/columns.
    const isValidBatchArgs = (
      args: any
    ): args is { genes: string[]; format?: string; columns?: string[] } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        Array.isArray(args.genes) &&
        args.genes.length > 0 &&
        args.genes.length <= 100 &&
        args.genes.every((gene: any) => typeof gene === 'string' && gene.length > 0) &&
        (args.format === undefined || ['json', 'tsv'].includes(args.format)) &&
        (args.columns === undefined || Array.isArray(args.columns))
      );
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the batch capability but fails to describe key traits like rate limits, authentication needs, error handling, or what the output looks like (e.g., structure, pagination). This leaves significant gaps for a tool with multiple parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters, no annotations, no output schema, and multiple sibling tools), the description is incomplete. It doesn't address behavioral aspects, usage context, or output expectations, leaving the agent with insufficient information to effectively invoke the tool beyond basic parameter input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly (e.g., 'genes' as an array with limits, 'format' with enum, 'columns' as optional). The description adds no meaning beyond this, such as explaining gene symbol conventions or column options, resulting in a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('look up') and resource ('multiple proteins simultaneously'), which is specific and unambiguous. However, it doesn't distinguish this batch operation from sibling tools like 'get_protein_info' or 'get_protein_by_ensembl' that might handle individual protein lookups, missing explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_protein_info' and 'get_protein_by_ensembl', the description lacks context on whether this is for bulk efficiency, specific data types, or other use cases, offering no explicit or implied usage rules.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/ProteinAtlas-MCP-Server'

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