Skip to main content
Glama
Augmented-Nature

Ensembl MCP Server

get_motif_features

Retrieve transcription factor binding motifs within a specified genomic region to identify potential regulatory elements and analyze gene expression patterns.

Instructions

Get transcription factor binding motifs in genomic region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionYesGenomic region (chr:start-end)
speciesNoSpecies name (default: homo_sapiens)
binding_matrixNoSpecific binding matrix (optional)

Implementation Reference

  • The handler function that executes the get_motif_features tool. It validates arguments, queries the Ensembl regulatory motif API endpoint (/regulatory/species/{species}/microarray/{region}), and returns the motif features data.
    private async handleGetMotifFeatures(args: any) {
      if (!isValidMotifArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid motif feature arguments');
      }
    
      try {
        const species = this.getDefaultSpecies(args.species);
        const region = this.formatGenomicRegion(args.region);
    
        const params: any = {};
    
        if (args.binding_matrix) {
          params.binding_matrix = args.binding_matrix;
        }
    
        const response = await this.apiClient.get(`/regulatory/species/${species}/microarray/${region}`, { params });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        return this.handleError(error, 'fetching motif features');
      }
    }
  • The input schema definition for the get_motif_features tool, registered in the list_tools handler.
      name: 'get_motif_features',
      description: 'Get transcription factor binding motifs 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)' },
          binding_matrix: { type: 'string', description: 'Specific binding matrix (optional)' },
        },
        required: ['region'],
      },
    },
  • src/index.ts:861-862 (registration)
    Registration of the get_motif_features tool handler in the CallToolRequestSchema switch statement.
    case 'get_motif_features':
      return this.handleGetMotifFeatures(args);
  • Type guard function used for input validation of get_motif_features tool arguments.
    const isValidMotifArgs = (
      args: any
    ): args is { region: string; species?: string; binding_matrix?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.region === 'string' &&
        args.region.length > 0 &&
        (args.species === undefined || typeof args.species === 'string') &&
        (args.binding_matrix === undefined || typeof args.binding_matrix === 'string')
      );
    };
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 what the tool does but lacks critical details: it doesn't specify if this is a read-only operation, what the output format is (e.g., list of motifs, scores, or visualizations), or any limitations like rate limits or data availability. This is inadequate for a tool with potential complexity in genomic data retrieval.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 complexity of genomic data retrieval and the lack of annotations and output schema, the description is insufficient. It doesn't explain what 'motifs' entail (e.g., binding sites, scores, or sequences), how results are returned, or any behavioral traits like error handling. This leaves significant gaps for an agent to use the tool effectively.

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?

The schema description coverage is 100%, so the input schema already documents all three parameters with clear descriptions. The description adds no additional meaning beyond implying the tool operates on genomic regions, which is redundant with the schema. 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 verb ('Get') and resource ('transcription factor binding motifs in genomic region'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_regulatory_features' or 'get_sequence', which might also retrieve genomic 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. It doesn't mention prerequisites, exclusions, or compare it to sibling tools like 'get_regulatory_features' that might overlap in functionality, leaving the agent to infer usage context.

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