get_structure_quality
Retrieve structure quality metrics and validation data for PDB entries to assess molecular model reliability.
Instructions
Get structure quality metrics and validation data
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pdb_id": "<pdb_id>"
},
"name": "get_structure_quality"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdb_id | Yes | PDB ID (4-character code) |
Implementation Reference
- src/index.ts:568-613 (handler)The handler function that implements the core logic for the 'get_structure_quality' tool. It validates input, fetches PDB entry data via API, constructs quality metrics (some mocked), and returns formatted JSON response.
private async handleGetStructureQuality(args: any) { if (!isValidPDBIdArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid structure quality arguments'); } try { const pdbId = args.pdb_id.toLowerCase(); const entryResponse = await this.apiClient.get(`/core/entry/${pdbId}`); const qualityData = { pdb_id: pdbId, overall_quality: 'GOOD', resolution: entryResponse.data.resolution, r_work: entryResponse.data.r_work, r_free: entryResponse.data.r_free, validation_available: true, quality_indicators: { clash_score: Math.random() * 10, ramachandran_favored: 95 + Math.random() * 5, ramachandran_outliers: Math.random() * 2, rotamer_outliers: Math.random() * 3, c_beta_deviations: Math.random() * 5 } }; return { content: [ { type: 'text', text: JSON.stringify(qualityData, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching structure quality: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } } - src/index.ts:296-302 (schema)Input schema definition for the 'get_structure_quality' tool, specifying the required 'pdb_id' parameter.
inputSchema: { type: 'object', properties: { pdb_id: { type: 'string', description: 'PDB ID (4-character code)' }, }, required: ['pdb_id'], }, - src/index.ts:293-303 (registration)Tool registration object listing the name, description, and input schema, included in the tools array passed to server.setTools.
{ name: 'get_structure_quality', description: 'Get structure quality metrics and validation data', inputSchema: { type: 'object', properties: { pdb_id: { type: 'string', description: 'PDB ID (4-character code)' }, }, required: ['pdb_id'], }, },