Skip to main content
Glama

validate_accession

Validate UniProt accession numbers to ensure data accuracy and prevent errors in protein database queries.

Instructions

Check if accession numbers are valid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number to validate

Implementation Reference

  • The handler function for the 'validate_accession' tool. It validates a UniProt accession by attempting to fetch the protein data from the UniProt API. Returns validation result including whether it exists, entry type, etc.
    private async handleValidateAccession(args: any) {
      if (!isValidAccessionValidateArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid accession validation arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, {
          params: { format: 'json' },
        });
    
        const validationResult = {
          accession: args.accession,
          isValid: true,
          entryType: response.data.entryType,
          primaryAccession: response.data.primaryAccession,
          exists: true,
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(validationResult, null, 2),
            },
          ],
        };
      } catch (error) {
        const validationResult = {
          accession: args.accession,
          isValid: false,
          exists: false,
          error: error instanceof Error ? error.message : 'Unknown error',
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(validationResult, null, 2),
            },
          ],
        };
      }
    }
  • src/index.ts:698-708 (registration)
    Registration of the 'validate_accession' tool in the ListTools response, including name, description, and input schema.
    {
      name: 'validate_accession',
      description: 'Check if accession numbers are valid',
      inputSchema: {
        type: 'object',
        properties: {
          accession: { type: 'string', description: 'UniProt accession number to validate' },
        },
        required: ['accession'],
      },
    },
  • src/index.ts:782-783 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes to the validate_accession handler.
    case 'validate_accession':
      return this.handleValidateAccession(args);
  • Helper function to validate the input arguments for the validate_accession tool.
    const isValidAccessionValidateArgs = (
      args: any
    ): args is { accession: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.accession === 'string' &&
        args.accession.length > 0
      );
    };
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 of behavioral disclosure. It states the tool checks validity but does not explain what 'valid' means (e.g., format, existence in a database), potential error conditions, rate limits, or authentication needs. For a validation 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 a single, efficient sentence with zero waste. It is front-loaded and appropriately sized for a simple tool, making it easy for an agent to parse quickly without unnecessary detail.

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's simplicity (1 parameter, no output schema, no annotations), the description is incomplete. It lacks details on what constitutes validity, potential return values (e.g., boolean, error messages), or behavioral context. While concise, it does not provide enough information for an agent to fully understand the tool's operation and outcomes.

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 parameter 'accession' documented as 'UniProt accession number to validate'. The description adds no additional meaning beyond this, such as format examples or validation criteria. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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

Purpose3/5

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

The description 'Check if accession numbers are valid' clearly states the tool's purpose with a specific verb ('Check') and resource ('accession numbers'), but it does not distinguish this from sibling tools. While siblings like 'batch_protein_lookup' or 'get_protein_info' might involve accession numbers, this tool's specific validation focus is implied but not explicitly contrasted.

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 does not mention prerequisites, context (e.g., before other operations), or exclusions, and it fails to reference sibling tools like 'batch_protein_lookup' that might overlap in functionality. This leaves the agent without clear usage direction.

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

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