Skip to main content
Glama

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

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]

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