Skip to main content
Glama
Augmented-Nature

ProteinAtlas MCP Server

get_protein_by_ensembl

Retrieve protein expression, localization, and pathology data from the Human Protein Atlas using Ensembl gene identifiers.

Instructions

Get protein information using Ensembl gene ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ensemblIdYesEnsembl gene ID (e.g., ENSG00000139618)
formatNoOutput format (default: json)

Implementation Reference

  • Primary handler for the 'get_protein_by_ensembl' tool. Validates input arguments, calls the fetch helper, formats the result as MCP content, and handles errors appropriately.
    private async handleGetProteinByEnsembl(args: any) {
      if (!isValidEnsemblArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid Ensembl arguments');
      }
    
      try {
        const result = await this.fetchProteinDataByEnsembl(args.ensemblId, args.format || 'json');
        return {
          content: [
            {
              type: 'text',
              text: typeof result === 'object' ? JSON.stringify(result, null, 2) : String(result),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching protein by Ensembl ID: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
  • Core helper function that makes the HTTP GET request to the Human Protein Atlas API endpoint for the given Ensembl ID and format, then parses the response.
    private async fetchProteinDataByEnsembl(ensemblId: string, format: string = 'json'): Promise<any> {
      const response = await this.apiClient.get(`/${ensemblId}.${format}`);
      return this.parseResponse(response.data, format);
    }
  • Input schema for the tool defining the expected parameters: required 'ensemblId' string and optional 'format' enum.
    inputSchema: {
      type: 'object',
      properties: {
        ensemblId: { type: 'string', description: 'Ensembl gene ID (e.g., ENSG00000139618)' },
        format: { type: 'string', enum: ['json', 'tsv', 'xml', 'trig'], description: 'Output format (default: json)' },
      },
      required: ['ensemblId'],
    },
  • src/index.ts:673-674 (registration)
    Registration in the tool dispatch switch statement within the CallToolRequest handler, routing calls to the specific handler method.
    case 'get_protein_by_ensembl':
      return this.handleGetProteinByEnsembl(args);
  • Type guard validation function matching the input schema, used by the handler to validate arguments before processing.
    const isValidEnsemblArgs = (
      args: any
    ): args is { ensemblId: string; format?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.ensemblId === 'string' &&
        args.ensemblId.length > 0 &&
        (args.format === undefined || ['json', 'tsv', 'xml', 'trig'].includes(args.format))
      );
    };
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 states the tool's function but lacks details on permissions, rate limits, error handling, or what 'protein information' entails (e.g., structure, function, sequences). This is a significant gap for a tool with no annotation coverage.

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's front-loaded with the core purpose, making it easy to scan and understand quickly without unnecessary elaboration.

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 of protein data retrieval, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'protein information' includes or the tool's behavior, leaving critical gaps for an agent to use it effectively in a biological context.

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 both parameters thoroughly (e.g., 'ensemblId' with an example, 'format' with enum and default). The description adds no additional meaning beyond what the schema provides, meeting the baseline for high coverage.

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 ('Get protein information') and the resource identifier ('using Ensembl gene ID'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_protein_info' or 'get_protein_classes', which might also retrieve protein-related data, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools available (e.g., 'get_protein_info', 'search_proteins'), there's no indication of context, prerequisites, or exclusions, leaving the agent to guess based on the name alone.

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