Skip to main content
Glama
ember-tooling

Ember MCP Server

get_api_reference

Retrieve detailed API documentation for Ember classes, modules, methods, or properties, including parameters, return values, examples, and links to official docs.

Instructions

Get detailed API reference documentation for a specific Ember class, module, or method. Returns full API documentation including parameters, return values, examples, and links to official API docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the API element (e.g., 'Component', '@glimmer/component', 'Service', 'Router')
typeNoType of API element (optional)

Implementation Reference

  • Core data-fetching helper in DocumentationService. Looks up API doc by name in the index, falls back to searching and parsing JSON from docs, and returns enriched object with deprecation info and API URL.
    async getApiReference(name, type) {
      const key = name.toLowerCase();
      const apiDoc = this.apiIndex.get(key);
    
      if (!apiDoc) {
        // Try to search for it
        const results = await this.search(name, "api", 1);
        if (results.length > 0 && results[0].apiLink) {
          // Try to extract from the content
          const apiDocs = this.sections["api-docs"] || [];
          for (const doc of apiDocs) {
            if (doc.content.toLowerCase().includes(key)) {
              try {
                const jsonMatch = doc.content.match(/\{[\s\S]*"data"[\s\S]*\}/);
                if (jsonMatch) {
                  const parsed = JSON.parse(jsonMatch[0]);
                  if (parsed.data?.attributes) {
                    const attrs = parsed.data.attributes;
                    return {
                      name: attrs.name || attrs.shortname,
                      type: parsed.data.type,
                      module: attrs.module,
                      description: attrs.description,
                      file: attrs.file,
                      line: attrs.line,
                      extends: attrs.extends,
                      methods: attrs.methods || [],
                      properties: attrs.properties || [],
                      apiUrl: results[0].apiLink,
                    };
                  }
                }
              } catch (e) {
                // Continue searching
              }
            }
          }
        }
        return null;
      }
    
      // Check if API is deprecated
      const deprecationInfo = this.deprecationManager.getDeprecationInfo(apiDoc.name);
    
      return {
        ...apiDoc,
        apiUrl: generateApiUrl(apiDoc.name, apiDoc.type),
        deprecationInfo: deprecationInfo,
      };
    }
  • Formatting helper that converts API doc object into a markdown string with name, module, type, description, extends, source, methods (up to 10 with params/returns), properties (up to 10), and a link to full API docs.
    export function formatApiReference(apiDoc, deprecationManager) {
      let output = `# ${apiDoc.name}\n\n`;
    
      // Add deprecation warning if applicable
      if (apiDoc.deprecationInfo) {
        output += deprecationManager.generateWarning(apiDoc.name, 'banner');
      }
    
      if (apiDoc.module) {
        output += `**Module:** \`${apiDoc.module}\`\n\n`;
      }
    
      if (apiDoc.type) {
        output += `**Type:** ${apiDoc.type}\n\n`;
      }
    
      if (apiDoc.description) {
        output += `## Description\n\n${apiDoc.description}\n\n`;
      }
    
      if (apiDoc.extends) {
        output += `**Extends:** ${apiDoc.extends}\n\n`;
      }
    
      if (apiDoc.file) {
        output += `**Source:** \`${apiDoc.file}\``;
        if (apiDoc.line) {
          output += `:${apiDoc.line}`;
        }
        output += `\n\n`;
      }
    
      if (apiDoc.methods && apiDoc.methods.length > 0) {
        output += `## Methods\n\n`;
        apiDoc.methods.slice(0, 10).forEach((method) => {
          output += `### ${method.name}\n\n`;
          if (method.description) {
            output += `${method.description}\n\n`;
          }
          if (method.params && method.params.length > 0) {
            output += `**Parameters:**\n`;
            method.params.forEach((param) => {
              output += `- \`${param.name}\``;
              if (param.type) output += ` (${param.type})`;
              if (param.description) output += `: ${param.description}`;
              output += `\n`;
            });
            output += `\n`;
          }
          if (method.return) {
            output += `**Returns:** ${method.return.type || "void"}`;
            if (method.return.description) {
              output += ` - ${method.return.description}`;
            }
            output += `\n\n`;
          }
        });
      }
    
      if (apiDoc.properties && apiDoc.properties.length > 0) {
        output += `## Properties\n\n`;
        apiDoc.properties.slice(0, 10).forEach((prop) => {
          output += `### ${prop.name}\n\n`;
          if (prop.description) {
            output += `${prop.description}\n\n`;
          }
          if (prop.type) {
            output += `**Type:** ${prop.type}\n\n`;
          }
        });
      }
    
      if (apiDoc.apiUrl) {
        output += `\n**Full API Documentation:** ${apiDoc.apiUrl}\n`;
      }
    
      return output;
    }
Behavior3/5

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

No annotations are provided, leaving the description to carry the full burden. It mentions returns include parameters, return values, examples, and links, but does not disclose potential errors, authorization needs, or limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, focused sentence that gets to the point without extraneous words. Could be slightly more structured, but it is efficient.

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?

No output schema exists, but the description adequately explains the return content (parameters, return values, examples, links). Given the tool's simplicity (2 params, 1 required), the description is sufficiently complete.

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 coverage is 100%, so the baseline is 3. The description adds minimal extra meaning, just echoing the schema's field descriptions (e.g., 'Ember class, module, or method' aligns with 'name' and 'type').

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?

Clearly states the verb 'Get' and the resource 'API reference documentation' for Ember classes, modules, or methods. Distinguishes from siblings like 'search_ember_docs' which is for searching, not retrieving specific docs.

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?

No guidance on when to use this tool vs alternatives. Does not mention when not to use it or provide context for selection.

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