Skip to main content
Glama

get_protein_info

Retrieve detailed protein information from UniProt using accession numbers. Supports multiple output formats including JSON, TSV, FASTA, and XML for scientific analysis and data integration.

Instructions

Get detailed information for a specific protein by UniProt accession

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number (e.g., P04637)
formatNoOutput format (default: json)

Implementation Reference

  • src/index.ts:415-424 (registration)
    Registration of the 'get_protein_info' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema.
    name: 'get_protein_info',
    description: 'Get detailed information for a specific protein by UniProt accession',
    inputSchema: {
      type: 'object',
      properties: {
        accession: { type: 'string', description: 'UniProt accession number (e.g., P04637)' },
        format: { type: 'string', enum: ['json', 'tsv', 'fasta', 'xml'], description: 'Output format (default: json)' },
      },
      required: ['accession'],
    },
  • The handler function for 'get_protein_info' tool that validates input, queries the UniProt API for protein details by accession, and returns formatted data or error.
    private async handleGetProteinInfo(args: any) {
      if (!isValidProteinInfoArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid protein info arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, {
          params: {
            format: args.format || 'json',
          },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: args.format === 'json'
                ? JSON.stringify(response.data, null, 2)
                : String(response.data),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching protein info: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input validation schema/type guard for get_protein_info tool arguments, ensuring accession is provided and format is valid.
    const isValidProteinInfoArgs = (
      args: any
    ): args is { accession: string; format?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.accession === 'string' &&
        args.accession.length > 0 &&
        (args.format === undefined || ['json', 'tsv', 'fasta', 'xml'].includes(args.format))
      );
    };
  • src/index.ts:730-731 (registration)
    Dispatch/registration in the CallToolRequestSchema switch statement mapping 'get_protein_info' to its handler.
    case 'get_protein_info':
      return this.handleGetProteinInfo(args);
  • TypeScript interface defining the structure of ProteinInfo, used in the context of protein data handling.
    interface ProteinInfo {
      primaryAccession: string;
      uniProtkbId: string;
      entryType: string;
      organism: {
        scientificName: string;
        commonName?: string;
        taxonId: number;
      };
      proteinDescription: any;
      genes?: any[];
      comments?: any[];
      features?: any[];
      keywords?: any[];
      references?: any[];
      sequence: {
        value: string;
        length: number;
        molWeight: number;
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions retrieving 'detailed information' but doesn't specify what that includes (e.g., sequence, structure, annotations), whether it's a read-only operation, potential rate limits, or authentication needs. This leaves significant gaps for a tool with no annotation coverage.

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, efficient sentence that front-loads the core purpose without unnecessary words. Every element ('Get detailed information', 'specific protein', 'UniProt accession') contributes directly to understanding the tool's function.

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 protein data retrieval, no annotations, no output schema, and many sibling tools, the description is insufficient. It doesn't explain what 'detailed information' encompasses, how it differs from specialized sibling tools, or what the return format looks like beyond the parameter options. This leaves too many open questions for effective tool selection.

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%, providing complete parameter documentation. The description adds no additional parameter semantics beyond what's in the schema (e.g., examples of what 'detailed information' includes, format implications). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't detract either.

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 action ('Get detailed information') and target resource ('for a specific protein by UniProt accession'), making the purpose immediately understandable. However, it doesn't differentiate from siblings like 'get_protein_sequence' or 'get_protein_structure' that also retrieve protein information but focus on specific aspects.

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. With many sibling tools (e.g., 'get_protein_sequence', 'get_protein_structure', 'search_proteins'), the description lacks context about when this general information retrieval is preferred over more specific queries or searches.

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

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