Skip to main content
Glama
NullVoxPopuli

Ember MCP Server

get_ember_version_info

Retrieve details about Ember.js versions, including stable releases, recent updates, and migration guidance to understand version-specific features and deprecations.

Instructions

Get information about Ember versions, including current stable version, what's new in recent releases, and migration guides. Useful for understanding version-specific features and deprecations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoSpecific version to get info about (optional, returns latest if not specified)

Implementation Reference

  • index.js:116-130 (registration)
    Registration of the 'get_ember_version_info' tool in the list of available tools, including name, description, and input schema definition.
    {
      name: "get_ember_version_info",
      description:
        "Get information about Ember versions, including current stable version, what's new in recent releases, and migration guides. Useful for understanding version-specific features and deprecations.",
      inputSchema: {
        type: "object",
        properties: {
          version: {
            type: "string",
            description:
              "Specific version to get info about (optional, returns latest if not specified)",
          },
        },
      },
    },
  • Handler function in the MCP server that executes the 'get_ember_version_info' tool by calling DocumentationService.getVersionInfo and formatting the result with formatVersionInfo.
    async handleGetVersionInfo(args) {
      const { version } = args;
      const versionInfo = await this.docService.getVersionInfo(version);
    
      const formattedInfo = formatVersionInfo(versionInfo);
      return {
        content: [
          {
            type: "text",
            text: formattedInfo,
          },
        ],
      };
    }
  • Core implementation of version information retrieval in DocumentationService, fetching latest Ember releases from GitHub API, handling specific versions, and providing fallback data.
    async getVersionInfo(version) {
      try {
        // Fetch release information from GitHub
        const releasesResponse = await fetch(VERSION_SOURCES.GITHUB_RELEASES, {
          headers: {
            'Accept': 'application/vnd.github.v3+json',
            'User-Agent': 'ember-mcp-server'
          }
        });
    
        if (!releasesResponse.ok) {
          console.error(`Failed to fetch releases: ${releasesResponse.status}`);
          return this.getFallbackVersionInfo(version);
        }
    
        const releases = await releasesResponse.json();
    
        if (!Array.isArray(releases) || releases.length === 0) {
          return this.getFallbackVersionInfo(version);
        }
    
        // Filter to only stable releases (not pre-releases)
        const stableReleases = releases.filter(r => !r.prerelease && !r.draft);
    
        if (version) {
          // Find specific version
          const targetRelease = stableReleases.find(r =>
            r.tag_name === `v${version}` || r.tag_name === version
          );
    
          if (targetRelease) {
            return this.formatReleaseInfo(targetRelease, version);
          } else {
            return {
              current: version,
              description: `Version ${version} not found in recent releases`,
              features: [],
              bugFixes: [],
              breakingChanges: [],
              migrationGuide: `For migration guides, see ${generateUpgradeGuideUrl(version)}`,
              releaseNotesUrl: generateReleaseNotesUrl(version),
              links: generateVersionLinks(),
              note: "Version not found in recent GitHub releases. It may be an older version or the version number may be incorrect.",
            };
          }
        } else {
          // Get latest stable version
          const latestRelease = stableReleases[0];
          if (latestRelease) {
            const latestVersion = latestRelease.tag_name.replace(/^v/, '');
            return this.formatReleaseInfo(latestRelease, latestVersion, stableReleases.slice(1, 4));
          }
        }
    
        return this.getFallbackVersionInfo(version);
      } catch (error) {
        console.error("Error fetching version info:", error);
        return this.getFallbackVersionInfo(version);
      }
    }
  • Helper function to format the version information object into a comprehensive Markdown response for the MCP tool output.
    export function formatVersionInfo(versionInfo) {
      let output = `# Ember.js Version Information\n\n`;
    
      if (versionInfo.current) {
        output += `**Version:** ${versionInfo.current}`;
        if (versionInfo.releaseDate) {
          output += ` (Released: ${versionInfo.releaseDate})`;
        }
        output += `\n\n`;
      }
    
      if (versionInfo.description) {
        output += `${versionInfo.description}\n\n`;
      }
    
      // Show note if present (e.g., data unavailable warning)
      if (versionInfo.note) {
        output += `> **Note:** ${versionInfo.note}\n\n`;
      }
    
      if (versionInfo.features && versionInfo.features.length > 0) {
        output += `## Features & Enhancements\n\n`;
        versionInfo.features.forEach((feature) => {
          output += `- ${feature}\n`;
        });
        output += `\n`;
      }
    
      if (versionInfo.bugFixes && versionInfo.bugFixes.length > 0) {
        output += `## Bug Fixes\n\n`;
        versionInfo.bugFixes.forEach((fix) => {
          output += `- ${fix}\n`;
        });
        output += `\n`;
      }
    
      if (versionInfo.breakingChanges && versionInfo.breakingChanges.length > 0) {
        output += `## ⚠️ Breaking Changes\n\n`;
        versionInfo.breakingChanges.forEach((change) => {
          output += `- ${change}\n`;
        });
        output += `\n`;
      }
    
      if (versionInfo.recentReleases && versionInfo.recentReleases.length > 0) {
        output += `## Recent Releases\n\n`;
        versionInfo.recentReleases.forEach((release) => {
          output += `- **${release.version}**`;
          if (release.date) {
            output += ` (${release.date})`;
          }
          output += ` - ${release.url}\n`;
        });
        output += `\n`;
      }
    
      if (versionInfo.migrationGuide) {
        output += `## Migration Guide\n\n`;
        output += `${versionInfo.migrationGuide}\n\n`;
      }
    
      if (versionInfo.releaseNotesUrl) {
        output += `**Release Notes:** ${versionInfo.releaseNotesUrl}\n\n`;
      }
    
      if (versionInfo.blogPost) {
        output += `**Blog Posts:** ${versionInfo.blogPost}\n\n`;
      }
    
      if (versionInfo.links && versionInfo.links.length > 0) {
        output += `## Useful Links\n\n`;
        versionInfo.links.forEach((link) => {
          output += `- ${link}\n`;
        });
        output += `\n`;
      }
    
      return output;
    }

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

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