Skip to main content
Glama

export_protein_data

Export protein-related data in GFF, GenBank, or other formats using a UniProt accession number for specialized 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 handler function that executes the tool: validates args, fetches protein data from UniProt API (`/uniprotkb/{accession}`) using the specified format (gff, genbank, embl, xml), and returns the raw response as text or error.
    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:687-697 (registration)
    Tool registration entry in ListToolsRequestSchema handler: defines name, description, and inputSchema 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'], }, },
  • src/index.ts:780-781 (registration)
    Dispatcher case in CallToolRequestSchema handler that maps tool calls to the specific handler method.
    case 'export_protein_data': return this.handleExportProteinData(args);
  • Shared validation helper used in the handler to validate input arguments (accession required, format optional in validator though schema requires it). Supports json/tsv/fasta/xml but tool schema limits to gff/genbank/embl/xml.
    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)) );

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