Skip to main content
Glama

get_annotation_confidence

Retrieve confidence scores for UniProt annotations using a specific accession number to assess the reliability of protein data.

Instructions

Quality scores for different annotations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function for the 'get_annotation_confidence' tool. Fetches protein data from UniProt API and extracts key confidence indicators such as entryType, proteinExistence, annotationScore, evidence codes, review status, and number of references.
    private async handleGetAnnotationConfidence(args: any) { if (!isValidProteinInfoArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid annotation confidence arguments'); } try { const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, { params: { format: 'json' }, }); const protein = response.data; const confidenceInfo = { accession: protein.primaryAccession, entryType: protein.entryType, proteinExistence: protein.proteinExistence, annotationScore: protein.annotationScore || 'Not available', evidenceCodes: protein.features?.map((f: any) => f.evidences).flat().filter(Boolean) || [], reviewStatus: protein.entryType === 'UniProtKB reviewed (Swiss-Prot)' ? 'Reviewed' : 'Unreviewed', referenceCount: protein.references?.length || 0, }; return { content: [ { type: 'text', text: JSON.stringify(confidenceInfo, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching annotation confidence: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; }
  • src/index.ts:777-778 (registration)
    Switch case in CallToolRequestSchema handler that routes 'get_annotation_confidence' tool calls to the appropriate handler method.
    case 'get_annotation_confidence': return this.handleGetAnnotationConfidence(args);
  • src/index.ts:675-684 (registration)
    Tool registration in ListToolsRequestSchema response, including name, description, and input schema definition.
    name: 'get_annotation_confidence', description: 'Quality scores for different annotations', inputSchema: { type: 'object', properties: { accession: { type: 'string', description: 'UniProt accession number' }, }, required: ['accession'], }, },
  • Input schema for the get_annotation_confidence tool, requiring a UniProt accession string.
    type: 'object', properties: { accession: { type: 'string', description: 'UniProt accession number' }, }, required: ['accession'], }, },
  • Shared validation function for protein info tool arguments, including accession validation, used by get_annotation_confidence 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