Skip to main content
Glama
Augmented-Nature

ProteinAtlas MCP Server

get_protein_classes

Retrieve protein classification and functional annotation data for specific genes from the Human Protein Atlas database to support biological research and analysis.

Instructions

Get protein classification and functional annotation data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geneYesGene symbol
formatNoOutput format (default: json)

Implementation Reference

  • The core handler function for the 'get_protein_classes' tool. Validates input using isValidGeneArgs, queries the Protein Atlas API via searchProteins with specific columns for protein class (pc), UniProt biological process (upbp), molecular function (up_mf), and evidence (pe), then returns formatted JSON or error response.
    private async handleGetProteinClasses(args: any) {
      if (!isValidGeneArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid gene arguments');
      }
    
      try {
        const columns = ['g', 'eg', 'pc', 'upbp', 'up_mf', 'pe'];
        const result = await this.searchProteins(args.gene, args.format || 'json', columns, 1);
        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 classes: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:649-660 (registration)
    Tool registration in the MCP server's tool list, including name, description, and input schema definition.
    {
      name: 'get_protein_classes',
      description: 'Get protein classification and functional annotation data',
      inputSchema: {
        type: 'object',
        properties: {
          gene: { type: 'string', description: 'Gene symbol' },
          format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' },
        },
        required: ['gene'],
      },
    },
  • Input validation function for gene-based tools, including 'get_protein_classes'. Checks for valid gene string and optional format.
    const isValidGeneArgs = (
      args: any
    ): args is { gene: string; format?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.gene === 'string' &&
        args.gene.length > 0 &&
        (args.format === undefined || ['json', 'tsv', 'xml', 'trig'].includes(args.format))
      );
    };
  • src/index.ts:705-706 (registration)
    Switch case in the tool request handler that routes calls to 'get_protein_classes' to its handler function.
    case 'get_protein_classes':
      return this.handleGetProteinClasses(args);
  • Core helper function used by the handler to query the Human Protein Atlas API search endpoint, with custom columns for protein classes.
    private async searchProteins(query: string, format: string = 'json', columns?: string[], maxResults?: number): Promise<any> {
      // Default columns if none provided - basic protein information
      const defaultColumns = ['g', 'gs', 'eg', 'gd', 'up', 'chr', 'pc', 'pe'];
      const searchColumns = columns && columns.length > 0 ? columns : defaultColumns;
    
      const params: any = {
        search: query,
        format: format,
        columns: searchColumns.join(','),
        compress: 'no',
      };
    
      const response = await this.apiClient.get('/api/search_download.php', { params });
    
      if (format === 'json') {
        return this.parseResponse(response.data, format);
      }
    
      return response.data;
    }
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 what data is retrieved but doesn't mention critical aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or what the output looks like (beyond format options). For a data retrieval tool with zero annotation coverage, this is insufficient.

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 no wasted words. It's front-loaded with the core purpose and appropriately sized for a simple retrieval tool.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'classification and functional annotation data' includes, how results are structured, or any limitations (e.g., supported genes). For a tool in a complex domain with many siblings, more context is needed to guide effective use.

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 ('gene' and 'format') adequately. The description doesn't add any meaningful context beyond what's in the schema, such as explaining what 'protein classification' entails or how the 'gene' parameter maps to results. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb 'Get' and the resource 'protein classification and functional annotation data', making the purpose understandable. However, it doesn't differentiate this tool from similar siblings like 'get_protein_info' or 'get_protein_by_ensembl', which likely retrieve overlapping information about proteins.

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 focused on protein data (e.g., 'get_protein_info', 'get_tissue_expression'), users are left to guess which tool is appropriate for classification versus other protein attributes.

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