Skip to main content
Glama

get_protein_features

Retrieve functional features and domains for a protein using its UniProt accession number to analyze protein structure and biological roles.

Instructions

Get functional features and domains for a protein

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function for 'get_protein_features' tool. Fetches protein data from UniProt API and extracts specific features like domains, active sites, binding sites, comments, and keywords.
    private async handleGetProteinFeatures(args: any) { if (!isValidProteinInfoArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid protein features arguments'); } try { const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, { params: { format: 'json' }, }); // Extract features and domains from the response const protein = response.data; const features = { accession: protein.primaryAccession, name: protein.uniProtkbId, features: protein.features || [], comments: protein.comments || [], keywords: protein.keywords || [], domains: protein.features?.filter((f: any) => f.type === 'Domain') || [], activeSites: protein.features?.filter((f: any) => f.type === 'Active site') || [], bindingSites: protein.features?.filter((f: any) => f.type === 'Binding site') || [], }; return { content: [ { type: 'text', text: JSON.stringify(features, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching protein features: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • src/index.ts:737-737 (registration)
    Tool dispatch/registration in the CallToolRequestSchema switch statement.
    return this.handleGetProteinFeatures(args);
  • Tool schema and metadata registration in the ListToolsRequestSchema response.
    name: 'get_protein_features', description: 'Get functional features and domains for a protein', inputSchema: { type: 'object', properties: { accession: { type: 'string', description: 'UniProt accession number' }, }, required: ['accession'], },
  • Validation helper function used by get_protein_features to validate input arguments.
    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