Skip to main content
Glama
Augmented-Nature

Ensembl MCP Server

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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but lacks critical behavioral details: it doesn't mention whether this is a read-only operation, what format the output takes, potential rate limits, authentication needs, or error conditions. For a tool with 4 parameters and no output schema, this leaves significant gaps in understanding how the tool behaves.

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 extremely concise - a single sentence that efficiently communicates the core functionality. It's front-loaded with the main purpose and includes helpful examples in parentheses. There's no wasted language or unnecessary elaboration.

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 complexity (4 parameters, no annotations, no output schema), the description is insufficiently complete. It doesn't explain what the tool returns, how results are structured, whether there are limitations on region size, or how optional parameters affect results. For a genomic query tool with multiple parameters, users need more context about output format and behavioral constraints.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema - it mentions 'genomic region' which aligns with the 'region' parameter, and 'regulatory elements' which relates to 'feature_type', but provides no additional syntax, format, or usage details. This meets the baseline for high schema coverage.

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 action ('Get') and resource ('regulatory elements') with specific examples (enhancers, promoters, TFBS) and scope ('in genomic region'). It distinguishes from siblings like get_motif_features or get_sequence by focusing on regulatory elements rather than motifs or raw sequences. However, it doesn't explicitly differentiate from all possible alternatives.

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 doesn't mention sibling tools like get_motif_features (which might overlap for TFBS) or specify use cases like regulatory analysis versus gene lookup. There's no discussion of prerequisites, limitations, or comparative contexts.

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

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