Skip to main content
Glama
ember-tooling

Ember MCP Server

get_api_reference

Retrieve comprehensive API documentation for Ember.js classes, modules, or methods, including parameters, return values, examples, and official links.

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

  • index.js:79-99 (registration)
    Registration of the 'get_api_reference' tool in the MCP server's tool list, including name, description, and input schema.
    {
      name: "get_api_reference",
      description:
        "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.",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description:
              "Name of the API element (e.g., 'Component', '@glimmer/component', 'Service', 'Router')",
          },
          type: {
            type: "string",
            enum: ["class", "module", "method", "property"],
            description: "Type of API element (optional)",
          },
        },
        required: ["name"],
      },
    },
  • The main handler function for the 'get_api_reference' tool. Extracts arguments, calls DocumentationService.getApiReference, formats the result, and returns the MCP response.
    async handleGetApiReference(args) {
      const { name, type } = args;
      const apiDoc = await this.docService.getApiReference(name, type);
    
      if (!apiDoc) {
        return {
          content: [
            {
              type: "text",
              text: `No API documentation found for "${name}". Try searching with search_ember_docs first.`,
            },
          ],
        };
      }
    
      const formattedDoc = formatApiReference(apiDoc, this.docService.deprecationManager);
      return {
        content: [
          {
            type: "text",
            text: formattedDoc,
          },
        ],
      };
    }
  • Input schema defining the parameters for the 'get_api_reference' tool: name (required string), type (optional enum).
    inputSchema: {
      type: "object",
      properties: {
        name: {
          type: "string",
          description:
            "Name of the API element (e.g., 'Component', '@glimmer/component', 'Service', 'Router')",
        },
        type: {
          type: "string",
          enum: ["class", "module", "method", "property"],
          description: "Type of API element (optional)",
        },
      },
      required: ["name"],
    },
  • Core implementation of API reference lookup in DocumentationService: retrieves from indexed API data or searches and parses JSON from documentation sections.
    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,
      };
    }
Behavior3/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 describes the return content ('full API documentation including parameters, return values, examples, and links to official API docs'), which is useful, but does not cover aspects like error handling, rate limits, or authentication needs. It adds some value but lacks comprehensive behavioral context.

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 front-loaded with the core purpose in the first sentence and efficiently details the return content in the second sentence. Every sentence adds value without waste, making it appropriately sized and well-structured.

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 moderate complexity (2 parameters, no output schema, no annotations), the description is mostly complete. It clearly explains the purpose and return values, but lacks details on error cases or behavioral constraints. Without an output schema, the description adequately covers return content, but could be more comprehensive for a tool with no annotations.

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 both parameters ('name' and 'type') thoroughly. The description does not add any parameter-specific details beyond what the schema provides, such as examples of valid 'name' inputs beyond the schema's examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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's purpose with specific verbs ('Get detailed API reference documentation') and resources ('for a specific Ember class, module, or method'), distinguishing it from siblings like 'search_ember_docs' (which likely searches broadly) or 'get_ember_version_info' (which focuses on version data).

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

Usage Guidelines3/5

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

The description implies usage when detailed API documentation is needed for a specific Ember element, but it does not explicitly state when to use this tool versus alternatives like 'search_ember_docs' or provide exclusions. The context is clear but lacks explicit guidance on tool 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