Skip to main content
Glama

get_regulatory_features

Retrieve regulatory elements like enhancers, promoters, and transcription factor binding sites for a specified genomic region in a given species and cell type context.

Instructions

Get regulatory elements (enhancers, promoters, TFBS) in genomic region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionYesGenomic region (chr:start-end)
speciesNoSpecies name (default: homo_sapiens)
feature_typeNoRegulatory feature type (optional)
cell_typeNoCell type context (optional)

Implementation Reference

  • The handler function that executes the get_regulatory_features tool. It validates input, queries the Ensembl REST API overlap endpoint for regulatory features in the specified genomic region, with fallback to other features if not found.
    private async handleGetRegulatoryFeatures(args: any) { if (!isValidRegulatoryArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid regulatory feature arguments'); } try { const species = this.getDefaultSpecies(args.species); const region = this.formatGenomicRegion(args.region); // Try overlap endpoint for regulatory features try { const response = await this.apiClient.get(`/overlap/region/${species}/${region}`, { params: { feature: 'regulatory' } }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (overlapError) { // Alternative: try the overlap endpoint with different feature types const features = ['gene', 'transcript']; const results = []; for (const feature of features) { try { const response = await this.apiClient.get(`/overlap/region/${species}/${region}`, { params: { feature } }); results.push({ feature, data: response.data }); } catch (e) { // Continue to next feature } } return { content: [ { type: 'text', text: JSON.stringify({ message: 'Regulatory features not available, showing overlapping genomic features', features: results }, null, 2), }, ], }; } } catch (error) { return this.handleError(error, 'fetching regulatory features'); } }
  • The tool schema definition in the listTools response, specifying name, description, and input schema for validation.
    { name: 'get_regulatory_features', description: 'Get regulatory elements (enhancers, promoters, TFBS) in genomic region', inputSchema: { type: 'object', properties: { region: { type: 'string', description: 'Genomic region (chr:start-end)' }, species: { type: 'string', description: 'Species name (default: homo_sapiens)' }, feature_type: { type: 'string', description: 'Regulatory feature type (optional)' }, cell_type: { type: 'string', description: 'Cell type context (optional)' }, }, required: ['region'], },
  • src/index.ts:859-860 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement.
    case 'get_regulatory_features': return this.handleGetRegulatoryFeatures(args);
  • Type guard function for validating input arguments to the get_regulatory_features tool.
    const isValidRegulatoryArgs = ( args: any ): args is { region: string; species?: string; feature_type?: string; cell_type?: string } => { return ( typeof args === 'object' && args !== null && typeof args.region === 'string' && args.region.length > 0 && (args.species === undefined || typeof args.species === 'string') && (args.feature_type === undefined || typeof args.feature_type === 'string') && (args.cell_type === undefined || typeof args.cell_type === 'string') ); };
  • TypeScript interface defining the structure of Ensembl regulatory feature data.
    interface EnsemblRegulatoryFeature { id: string; feature_type: string; start: number; end: number; strand: number; bound_start: number; bound_end: number; description: string; cell_type?: string[]; activity?: string; }

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

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