Skip to main content
Glama
josefdc

UniProt MCP Server

by josefdc

get_sequence

Retrieve protein sequence metadata from UniProtKB database by providing an accession number to access specific biological data.

Instructions

Return only the sequence metadata for an accession.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_sequence' tool. It validates the accession, fetches the sequence JSON from UniProt, and parses it into a Sequence object.
    @mcp.tool()  # type: ignore[misc]
    async def get_sequence(accession: str) -> Sequence | None:
        """Return only the sequence metadata for an accession."""
    
        normalized = _validate_accession(accession)
        async with new_client() as client:
            payload = await fetch_sequence_json(client, normalized)
        if not payload:
            return None
        return parse_sequence_from_entry(payload)
  • The @mcp.tool() decorator registers the get_sequence function as an MCP tool.
    @mcp.tool()  # type: ignore[misc]
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 tool returns metadata, implying a read-only operation, but doesn't specify details like rate limits, error handling, or what 'sequence metadata' includes (e.g., format, size). This leaves significant gaps in understanding the tool's behavior.

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 with zero wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's low complexity (one parameter) and the presence of an output schema, the description is minimally adequate. However, with no annotations and poor parameter documentation, it lacks completeness for safe and effective use, such as clarifying the 'accession' parameter or behavioral traits.

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

Parameters2/5

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

The input schema has 0% description coverage, with one undocumented parameter 'accession'. The description adds minimal semantics by implying 'accession' is used to retrieve sequence metadata, but it doesn't explain what an accession is (e.g., a database identifier), its format, or examples, failing to compensate for the schema's lack of documentation.

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 ('return') and resource ('sequence metadata for an accession'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'fetch_entry' or 'fetch_entry_flatfile', which might also retrieve sequence-related data, 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 like 'fetch_entry' or 'search_uniprot'. It lacks context about prerequisites, such as what an 'accession' refers to or any constraints, leaving the agent without 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/josefdc/Uniprot-MCP'

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