Skip to main content
Glama

get_coverage_info

Retrieve sequence coverage details for AlphaFold protein structure predictions using a UniProt accession ID.

Instructions

Get information about sequence coverage in the AlphaFold prediction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uniprotIdYesUniProt accession

Implementation Reference

  • The handler function that executes the get_coverage_info tool. It validates input, fetches AlphaFold prediction data via API, computes coverage metrics (percentage, completeness, gaps), and returns formatted JSON response.
    private async handleGetCoverageInfo(args: any) { if (!isValidUniProtArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid coverage info arguments'); } try { const response = await this.apiClient.get(`/prediction/${args.uniprotId}`); const structures = response.data; if (!structures || structures.length === 0) { return { content: [ { type: 'text', text: `No structure available for ${args.uniprotId}`, }, ], }; } const structure = structures[0]; const coverageInfo = { uniprotId: args.uniprotId, fullSequenceLength: structure.uniprotSequence.length, predictedRegion: { start: structure.uniprotStart, end: structure.uniprotEnd, length: structure.uniprotEnd - structure.uniprotStart + 1, }, coverage: { percentage: ((structure.uniprotEnd - structure.uniprotStart + 1) / structure.uniprotSequence.length) * 100, isComplete: structure.uniprotStart === 1 && structure.uniprotEnd === structure.uniprotSequence.length, }, gaps: { nTerminal: structure.uniprotStart > 1 ? structure.uniprotStart - 1 : 0, cTerminal: structure.uniprotEnd < structure.uniprotSequence.length ? structure.uniprotSequence.length - structure.uniprotEnd : 0, }, }; return { content: [ { type: 'text', text: JSON.stringify(coverageInfo, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting coverage info: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • src/index.ts:613-614 (registration)
    Tool handler registration in the CallToolRequestSchema switch statement.
    return this.handleGetCoverageInfo(args); case 'validate_structure_quality':
  • src/index.ts:515-525 (registration)
    Tool registration entry in ListToolsRequestSchema, including name, description, and input schema.
    { name: 'get_coverage_info', description: 'Get information about sequence coverage in the AlphaFold prediction', inputSchema: { type: 'object', properties: { uniprotId: { type: 'string', description: 'UniProt accession' }, }, required: ['uniprotId'], }, },
  • Input schema definition for the get_coverage_info tool.
    inputSchema: { type: 'object', properties: { uniprotId: { type: 'string', description: 'UniProt accession' }, }, required: ['uniprotId'], },
  • Validation helper function used to check UniProt ID arguments in the handler.
    const isValidUniProtArgs = ( args: any ): args is { uniprotId: string; format?: 'pdb' | 'cif' | 'bcif' | 'json' } => { return ( typeof args === 'object' && args !== null && typeof args.uniprotId === 'string' && args.uniprotId.length > 0 && (args.format === undefined || ['pdb', 'cif', 'bcif', 'json'].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/AlphaFold-MCP-Server'

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