Skip to main content
Glama
ember-tooling

Ember MCP Server

search_ember_docs

Search across Ember.js API docs, guides, and community content to find official documentation for your queries.

Instructions

Search through Ember.js documentation including API docs, guides, and community content. Returns relevant documentation with links to official sources. Use this for general queries about Ember concepts, features, or usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g., 'component lifecycle', 'tracked properties', 'routing')
categoryNoFilter by documentation category (default: all)
limitNoMaximum number of results (default: 5)

Implementation Reference

  • Core search logic in DocumentationService. Filters sections by category, scores results by relevance (exact phrase, title match, term frequency, all-terms presence, proximity), generates excerpts and URLs, and returns top results sorted by score.
    async search(query, category = "all", limit = 5) {
      const results = [];
      const queryLower = query.toLowerCase();
      const searchTerms = queryLower.split(/\s+/).filter(term => term.length > 0);
    
      const sectionsToSearch =
        category === "all"
          ? Object.keys(this.sections)
          : category === "api"
          ? ["api-docs"]
          : category === "guides"
          ? Object.keys(this.sections).filter(
              (s) => !["api-docs", "community-bloggers"].includes(s)
            )
          : category === "community"
          ? ["community-bloggers"]
          : [];
    
      for (const sectionName of sectionsToSearch) {
        const sectionItems = this.sections[sectionName] || [];
    
        for (const item of sectionItems) {
          const content = item.content.toLowerCase();
          const title = this.extractTitle(item.content);
          const titleLower = title.toLowerCase();
    
          // Calculate relevance score with better weighting
          let score = 0;
          let matchedTerms = [];
          let termPositions = [];
    
          // Exact phrase match - highest value
          if (content.includes(queryLower)) {
            score += SEARCH_CONFIG.EXACT_PHRASE_BONUS;
            matchedTerms.push(queryLower);
          }
    
          // Check each term
          searchTerms.forEach((term) => {
            const matches = (content.match(new RegExp(term, "gi")) || []).length;
            if (matches > 0) {
              matchedTerms.push(term);
    
              // Title matches are highly relevant
              if (titleLower.includes(term)) {
                score += SEARCH_CONFIG.TITLE_MATCH_BONUS;
              }
    
              // Base score for term presence
              score += matches * SEARCH_CONFIG.TERM_MATCH_WEIGHT;
    
              // Find first position of this term for proximity scoring
              const pos = content.indexOf(term);
              if (pos !== -1) {
                termPositions.push({ term, pos });
              }
            }
          });
    
          // All terms present - significant bonus
          if (matchedTerms.length === searchTerms.length) {
            score += SEARCH_CONFIG.ALL_TERMS_BONUS;
    
            // Proximity bonus: terms close together are more relevant
            if (termPositions.length > 1) {
              termPositions.sort((a, b) => a.pos - b.pos);
              const spread = termPositions[termPositions.length - 1].pos - termPositions[0].pos;
              // If all terms within proximity threshold, add proximity bonus
              if (spread < SEARCH_CONFIG.PROXIMITY_THRESHOLD) {
                score += Math.floor((SEARCH_CONFIG.PROXIMITY_THRESHOLD - spread) / SEARCH_CONFIG.PROXIMITY_BONUS_DIVISOR);
              }
            }
          }
    
          // Only include results with meaningful matches
          // Require at least 2 terms or a high-value single match
          if (score >= SEARCH_CONFIG.MIN_SCORE && (matchedTerms.length >= 2 || score >= SEARCH_CONFIG.MIN_SCORE_SINGLE_TERM)) {
            const excerpt = this.extractExcerpt(item.content, searchTerms, termPositions);
    
            // Check if this result is for a deprecated API
            const deprecationInfo = this.deprecationManager.checkSearchResult({ title, content: item.content });
    
            results.push({
              title,
              category: this.categorizeSectionName(sectionName),
              excerpt,
              score,
              url: generateUrl(sectionName, title),
              apiLink: generateApiLink(item.content),
              matchedTerms: matchedTerms.length,
              totalTerms: searchTerms.length,
              deprecationInfo: deprecationInfo,
            });
          }
        }
      }
    
      // Sort by score and return top results
      results.sort((a, b) => b.score - a.score);
      return results.slice(0, limit);
    }
  • Helper function that formats search results into markdown. Includes title, category, match quality, deprecation warnings, excerpt, URL, and API reference links for each result.
    export function formatSearchResults(results, deprecationManager) {
      let output = `# Ember Documentation Search Results\n\n`;
      output += `Found ${results.length} result(s):\n\n`;
    
      results.forEach((result, index) => {
        output += `## ${index + 1}. ${result.title}`;
    
        // Add deprecation indicator if applicable
        if (result.deprecationInfo && result.deprecationInfo.status !== 'possibly-deprecated') {
          output += ` ${deprecationManager.generateWarning(result.title, 'short')}`;
        }
        output += `\n\n`;
    
        output += `**Category:** ${result.category}`;
    
        // Show match quality
        if (result.matchedTerms !== undefined && result.totalTerms !== undefined) {
          output += ` | **Match:** ${result.matchedTerms}/${result.totalTerms} terms`;
        }
        if (result.score !== undefined) {
          output += ` (relevance: ${result.score})`;
        }
        output += `\n\n`;
    
        // Add inline deprecation warning if applicable
        if (result.deprecationInfo && result.deprecationInfo.status !== 'possibly-deprecated') {
          output += `${deprecationManager.generateWarning(result.title, 'inline')}\n\n`;
        }
    
        output += `${result.excerpt}\n\n`;
    
        if (result.url) {
          output += `**Link:** ${result.url}\n\n`;
        }
    
        if (result.apiLink) {
          output += `**API Reference:** ${result.apiLink}\n\n`;
        }
    
        output += `---\n\n`;
      });
    
      return output;
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. The description states it 'returns relevant documentation with links to official sources,' which indicates a read-only, safe operation. It does not disclose rate limits, pagination, or authentication needs. For a simple search tool, this is adequate but not comprehensive.

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 two sentences, front-loaded with the main verb and resource. Every word adds value; no filler. It is highly concise and structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 parameters, no output schema), the description is complete. It explains what the tool searches, what it returns (relevant docs with links), and its intended use. It could mention result ordering or filtering behavior, but the core information is present.

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%: all three parameters have descriptions in the schema. The tool description adds no additional parameter-level detail beyond the schema. Baseline is 3 when coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches through Ember.js documentation including various types (API, guides, community content). The verb 'search' and resource 'Ember.js documentation' are specific. Among sibling tools like get_api_reference or get_best_practices, this is the only general search tool, so it distinguishes well.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises using the tool for 'general queries about Ember concepts, features, or usage.' This provides clear context. It does not explicitly state when to avoid using it or list alternatives, but the sibling tools are specific (e.g., get_api_reference for detailed lookups), so the guidance is sufficient.

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/ember-tooling/ember-mcp'

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