Skip to main content
Glama
Augmented-Nature

PDB MCP Server

search_by_uniprot

Find PDB structures linked to a UniProt accession number to analyze protein structures in the Protein Data Bank.

Instructions

Find PDB structures associated with a UniProt accession

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uniprot_idYesUniProt accession number
limitNoNumber of results to return (1-1000, default: 25)

Implementation Reference

  • The handler function that executes the search_by_uniprot tool logic. It validates input, constructs a query for RCSB search API using UniProt ID, fetches results, and returns formatted JSON or error.
    private async handleSearchByUniprot(args: any) {
      if (!args || typeof args.uniprot_id !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid UniProt search arguments');
      }
    
      try {
        const searchQuery = {
          query: {
            type: "terminal",
            service: "text",
            parameters: {
              attribute: "rcsb_polymer_entity_container_identifiers.reference_sequence_identifiers.database_accession",
              operator: "exact_match",
              value: args.uniprot_id
            }
          },
          return_type: "entry",
          request_options: {
            paginate: {
              start: 0,
              rows: args.limit || 25
            },
            results_content_type: ["experimental"]
          }
        };
    
        const response = await this.rcsb_apiClient.post('/query', searchQuery);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error searching by UniProt: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema defining parameters for the search_by_uniprot tool: uniprot_id (required string) and optional limit.
    inputSchema: {
      type: 'object',
      properties: {
        uniprot_id: { type: 'string', description: 'UniProt accession number' },
        limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
      },
      required: ['uniprot_id'],
    },
  • src/index.ts:281-292 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      name: 'search_by_uniprot',
      description: 'Find PDB structures associated with a UniProt accession',
      inputSchema: {
        type: 'object',
        properties: {
          uniprot_id: { type: 'string', description: 'UniProt accession number' },
          limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 },
        },
        required: ['uniprot_id'],
      },
    },
  • src/index.ts:317-318 (registration)
    Dispatch case in CallToolRequest handler that routes to the search_by_uniprot handler function.
    case 'search_by_uniprot':
      return this.handleSearchByUniprot(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool finds structures but doesn't disclose behavioral traits like whether it's read-only, if it has rate limits, authentication needs, or what the output format looks like. For a search tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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, clear sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy to understand at a glance. Every word earns its place, achieving optimal conciseness.

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 tool has no annotations and no output schema, the description is incomplete. It doesn't explain what the return values are (e.g., list of PDB IDs, metadata), behavioral aspects, or error handling. For a search tool with 2 parameters, this minimal description leaves too much unspecified 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, clearly documenting both parameters ('uniprot_id' and 'limit') with details like default values and constraints. The description adds no additional meaning beyond what the schema provides, such as examples or edge cases. With high schema coverage, the baseline is 3, 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 tool's purpose: 'Find PDB structures associated with a UniProt accession.' It specifies the action ('Find') and resource ('PDB structures'), and distinguishes from siblings like 'download_structure' or 'get_structure_info' by focusing on searching by UniProt ID. However, it doesn't explicitly differentiate from 'search_structures', which might be a broader search tool, so it's not a perfect 5.

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 when to choose it over 'search_structures' or other siblings, nor does it specify prerequisites or exclusions. The usage is implied by the purpose but lacks explicit context, making it minimal guidance.

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