Skip to main content
Glama
Augmented-Nature

PDB MCP Server

get_structure_info

Retrieve detailed structural data for a specific protein or nucleic acid from the Protein Data Bank using its PDB ID.

Instructions

Get detailed information for a specific PDB structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdb_idYesPDB ID (4-character code, e.g., 1ABC)
formatNoOutput format (default: json)

Implementation Reference

  • Executes the 'get_structure_info' tool: validates input, fetches PDB structure data from RCSB API in specified format (JSON or file), handles errors.
    private async handleGetStructureInfo(args: any) {
      if (!isValidPDBIdArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid PDB ID arguments');
      }
    
      try {
        const pdbId = args.pdb_id.toLowerCase();
        const format = args.format || 'json';
    
        if (format === 'json') {
          const response = await this.apiClient.get(`/core/entry/${pdbId}`);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(response.data, null, 2),
              },
            ],
          };
        } else {
          // Handle file format downloads
          const baseUrl = 'https://files.rcsb.org/download';
          const extension = format === 'mmcif' ? 'cif' : format;
          const url = `${baseUrl}/${pdbId}.${extension}`;
    
          const response = await axios.get(url);
          return {
            content: [
              {
                type: 'text',
                text: response.data,
              },
            ],
          };
        }
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching structure info: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:256-267 (registration)
    Registers the 'get_structure_info' tool in ListTools response with name, description, and input schema.
    {
      name: 'get_structure_info',
      description: 'Get detailed information for a specific PDB structure',
      inputSchema: {
        type: 'object',
        properties: {
          pdb_id: { type: 'string', description: 'PDB ID (4-character code, e.g., 1ABC)' },
          format: { type: 'string', enum: ['json', 'pdb', 'mmcif', 'xml'], description: 'Output format (default: json)' },
        },
        required: ['pdb_id'],
      },
    },
  • src/index.ts:313-314 (registration)
    Dispatches tool calls for 'get_structure_info' to the handler in CallToolRequestSchema handler.
    case 'get_structure_info':
      return this.handleGetStructureInfo(args);
  • Helper function to validate input arguments for the 'get_structure_info' tool (PDB ID format and optional format).
    const isValidPDBIdArgs = (
      args: any
    ): args is { pdb_id: string; format?: 'json' | 'pdb' | 'mmcif' | 'xml' } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.pdb_id === 'string' &&
        args.pdb_id.length === 4 &&
        /^[0-9][a-zA-Z0-9]{3}$/i.test(args.pdb_id) &&
        (args.format === undefined || ['json', 'pdb', 'mmcif', 'xml'].includes(args.format))
      );
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 the action but lacks details on permissions, rate limits, error handling, or what 'detailed information' entails (e.g., metadata, coordinates, annotations). This is a significant gap for a tool with potential data retrieval complexities.

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 a single, direct sentence with zero waste—it states the purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 lack of annotations and output schema, the description is incomplete. It doesn't clarify what 'detailed information' includes (e.g., JSON structure, file content), potential behavioral traits like authentication needs, or how it differs from siblings. For a data retrieval tool with undefined outputs, this leaves critical gaps for an agent.

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?

Schema description coverage is 100%, so the input schema already documents both parameters thoroughly (PDB ID format and output format options). The description adds no additional parameter semantics beyond implying the tool fetches data for a given PDB ID, which is redundant with the schema. Baseline 3 is appropriate as 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 verb ('Get') and resource ('detailed information for a specific PDB structure'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'get_structure_quality' or 'download_structure', which might also retrieve structure-related data but with different scopes or formats.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this is for metadata retrieval versus downloading raw files (compared to 'download_structure') or quality metrics (compared to 'get_structure_quality'), leaving the agent to infer usage from tool names alone.

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