Skip to main content
Glama

get_protein_domains_detailed

Retrieve detailed protein domain information from UniProt using InterPro, Pfam, and SMART annotations to analyze functional regions.

Instructions

Enhanced domain analysis with InterPro, Pfam, and SMART annotations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function that executes the tool: fetches UniProtKB entry for the given accession, extracts domains, regions, repeats from features, and InterPro/Pfam/SMART cross-references, returns formatted JSON.
    private async handleGetProteinDomainsDetailed(args: any) { if (!isValidProteinInfoArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid protein domains arguments'); } try { const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, { params: { format: 'json' }, }); const protein = response.data; const domainInfo = { accession: protein.primaryAccession, domains: protein.features?.filter((f: any) => f.type === 'Domain') || [], regions: protein.features?.filter((f: any) => f.type === 'Region') || [], repeats: protein.features?.filter((f: any) => f.type === 'Repeat') || [], interproReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'InterPro') || [], pfamReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'Pfam') || [], smartReferences: protein.uniProtKBCrossReferences?.filter((ref: any) => ref.database === 'SMART') || [], }; return { content: [ { type: 'text', text: JSON.stringify(domainInfo, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching protein domains: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Input schema definition for the tool as registered in ListToolsRequestHandler.
    name: 'get_protein_domains_detailed', description: 'Enhanced domain analysis with InterPro, Pfam, and SMART annotations', inputSchema: { type: 'object', properties: { accession: { type: 'string', description: 'UniProt accession number' }, }, required: ['accession'], }, },
  • src/index.ts:750-751 (registration)
    Tool handler registration in the CallToolRequestSchema switch statement.
    case 'get_protein_domains_detailed': return this.handleGetProteinDomainsDetailed(args);
  • Shared validation function for protein accession arguments, used in the handler.
    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