Skip to main content
Glama

export_protein_data

Export protein data from UniProt in specialized formats like GFF, GenBank, EMBL, or XML for analysis and integration.

Instructions

Export data in specialized formats (GFF, GenBank, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number
formatYesExport format

Implementation Reference

  • The main handler function for the 'export_protein_data' tool. It validates input using isValidProteinInfoArgs, fetches protein data from UniProt API in the specified format (gff, genbank, embl, xml), and returns the data as text content.
    private async handleExportProteinData(args: any) {
      if (!isValidProteinInfoArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid export protein data arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, {
          params: { format: args.format },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: String(response.data),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error exporting protein data: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:780-781 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes calls to the export_protein_data tool to its handler function.
    case 'export_protein_data':
      return this.handleExportProteinData(args);
  • Tool registration and input schema definition in the ListToolsRequestSchema response. Defines the tool name, description, and input schema requiring accession and format.
      name: 'export_protein_data',
      description: 'Export data in specialized formats (GFF, GenBank, etc.)',
      inputSchema: {
        type: 'object',
        properties: {
          accession: { type: 'string', description: 'UniProt accession number' },
          format: { type: 'string', enum: ['gff', 'genbank', 'embl', 'xml'], description: 'Export format' },
        },
        required: ['accession', 'format'],
      },
    },
  • Input validation helper function used by the export_protein_data handler to validate arguments (accession required, format optional with limited enums). Note: enum includes xml but not all export formats; handler relies on API.
    const isValidProteinInfoArgs = (
      args: any
    ): args is { accession: string; format?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.accession === 'string' &&
        args.accession.length > 0 &&
        (args.format === undefined || ['json', 'tsv', 'fasta', 'xml'].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 full burden. It states 'export' implies a read operation, but lacks details on permissions, rate limits, output behavior (e.g., file download vs. inline data), or side effects. 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 and includes relevant examples, making it appropriately sized for the tool's complexity.

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 no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like output format details, error handling, or usage context, which are critical for an export tool with two required parameters.

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 fully documents both parameters (accession and format with enum). The description adds minimal value by listing example formats (GFF, GenBank) beyond the schema's enum, but doesn't explain parameter interactions or constraints.

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 'export' and resource 'data', specifying specialized formats like GFF and GenBank. It distinguishes from siblings by focusing on export functionality rather than search, analysis, or retrieval operations, though it doesn't explicitly contrast with specific tools.

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. The description mentions formats but doesn't indicate scenarios (e.g., for data sharing, analysis compatibility) or prerequisites, leaving usage context unclear.

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

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