Skip to main content
Glama
Augmented-Nature

PDB MCP Server

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdb_idYesPDB ID (4-character code)

Implementation Reference

  • 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,
        };
      }
    }
  • 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'],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't add any context about traits like whether it's read-only, has rate limits, requires authentication, or what the output format might be. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, consisting of a single, clear sentence that directly states the tool's purpose without any wasted words. Every part of the description earns its place by conveying essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving quality metrics and validation data, the description is incomplete. With no annotations and no output schema, it doesn't explain what 'quality metrics and validation data' entail, such as specific metrics returned or the response format. This leaves the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'pdb_id' clearly documented as a 'PDB ID (4-character code)'. The description doesn't add any extra meaning beyond this, such as examples or constraints, so it meets the baseline score of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('structure quality metrics and validation data'), making it immediately understandable. However, it doesn't explicitly differentiate this tool from its siblings like 'get_structure_info' or 'search_structures', which might also provide structural information, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions, such as how it differs from 'get_structure_info' or when to prefer 'search_by_uniprot'. This lack of usage direction leaves the agent without clear decision-making criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/PDB-MCP-Server'

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