Skip to main content
Glama
hlydecker
by hlydecker

get_sequence

Retrieve DNA sequences from genome assemblies using chromosome coordinates. Specify genome, chromosome, and optional start/end positions to extract specific genomic regions.

Instructions

Retrieve DNA sequence from a specified genome assembly. Can retrieve entire chromosome or specific coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
genomeYesGenome assembly name (e.g., 'hg38')
chromYesChromosome name (e.g., 'chr1', 'chrM')
startNoStart coordinate (0-based, optional, requires end)
endNoEnd coordinate (1-based, optional, requires start)
hub_urlNoURL of assembly hub (optional)
reverse_complementNoReturn reverse complement of sequence

Implementation Reference

  • Handler logic for the get_sequence tool: extracts arguments, builds parameters for the UCSC API /getData/sequence endpoint, constructs the URL, and fetches the sequence data via make_api_request.
    elif name == "get_sequence": params = { "genome": arguments["genome"], "chrom": arguments["chrom"], "start": arguments.get("start"), "end": arguments.get("end"), "hubUrl": arguments.get("hub_url"), "revComp": 1 if arguments.get("reverse_complement") else None } url = build_api_url("/getData/sequence", params) result = await make_api_request(url)
  • Input schema defining the parameters for the get_sequence tool, including required genome and chrom, optional coordinates, hub URL, and reverse complement flag.
    inputSchema={ "type": "object", "properties": { "genome": { "type": "string", "description": "Genome assembly name (e.g., 'hg38')" }, "chrom": { "type": "string", "description": "Chromosome name (e.g., 'chr1', 'chrM')" }, "start": { "type": "integer", "description": "Start coordinate (0-based, optional, requires end)" }, "end": { "type": "integer", "description": "End coordinate (1-based, optional, requires start)" }, "hub_url": { "type": "string", "description": "URL of assembly hub (optional)" }, "reverse_complement": { "type": "boolean", "description": "Return reverse complement of sequence" } }, "required": ["genome", "chrom"]
  • Registration of the get_sequence tool in the list_tools() function return value, specifying name, description, and input schema.
    Tool( name="get_sequence", description="Retrieve DNA sequence from a specified genome assembly. Can retrieve entire chromosome or specific coordinates.", inputSchema={ "type": "object", "properties": { "genome": { "type": "string", "description": "Genome assembly name (e.g., 'hg38')" }, "chrom": { "type": "string", "description": "Chromosome name (e.g., 'chr1', 'chrM')" }, "start": { "type": "integer", "description": "Start coordinate (0-based, optional, requires end)" }, "end": { "type": "integer", "description": "End coordinate (1-based, optional, requires start)" }, "hub_url": { "type": "string", "description": "URL of assembly hub (optional)" }, "reverse_complement": { "type": "boolean", "description": "Return reverse complement of sequence" } }, "required": ["genome", "chrom"] } ),

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/hlydecker/ucsc-genome-mcp'

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