Skip to main content
Glama
ember-tooling

Ember MCP Server

get_npm_package_info

Retrieve detailed npm package information including version, dependencies, and maintainers to evaluate updates before upgrading.

Instructions

Get comprehensive information about an npm package including latest version, description, dependencies, maintainers, and more. Essential for understanding package details before upgrading dependencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageNameYesName of the npm package (e.g., 'ember-source', '@glimmer/component', 'ember-cli')

Implementation Reference

  • Formats raw npm registry data into a structured object with name, description, latestVersion, distTags, homepage, repository, license, author, maintainers, keywords, dependencies, devDependencies, peerDependencies, engines, and timestamps.
    formatPackageInfo(packageInfo) {
      const latestVersion = packageInfo['dist-tags']?.latest;
      const latestVersionData = latestVersion ? packageInfo.versions[latestVersion] : null;
    
      return {
        name: packageInfo.name,
        description: packageInfo.description || 'No description available',
        latestVersion: latestVersion || 'Unknown',
        distTags: packageInfo['dist-tags'] || {},
        homepage: packageInfo.homepage || latestVersionData?.homepage || null,
        repository: packageInfo.repository?.url || latestVersionData?.repository?.url || null,
        license: latestVersionData?.license || 'Unknown',
        author: this.formatAuthor(packageInfo.author || latestVersionData?.author),
        maintainers: packageInfo.maintainers || [],
        keywords: latestVersionData?.keywords || [],
        dependencies: latestVersionData?.dependencies || {},
        devDependencies: latestVersionData?.devDependencies || {},
        peerDependencies: latestVersionData?.peerDependencies || {},
        engines: latestVersionData?.engines || {},
        lastPublished: packageInfo.time?.[latestVersion] || null,
        created: packageInfo.time?.created || null,
        modified: packageInfo.time?.modified || null,
      };
    }
  • Fetches package information from the npm registry API (https://registry.npmjs.org/{packageName}) with error handling for 404 and other failures.
    async getPackageInfo(packageName) {
      try {
        const response = await fetch(`${this.registryUrl}/${packageName}`);
        
        if (!response.ok) {
          if (response.status === 404) {
            throw new Error(`Package "${packageName}" not found on npm registry`);
          }
          throw new Error(`Failed to fetch package info: ${response.statusText}`);
        }
    
        const data = await response.json();
        return data;
      } catch (error) {
        throw new Error(`Error fetching npm package info: ${error.message}`);
      }
    }
Behavior2/5

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

No annotations are provided, so the description must disclose behavior. It says 'comprehensive information' but only lists a few examples without detailing the exact output structure, limitations, or whether it makes network calls.

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 concise with no filler, front-loading the purpose in the first sentence and adding a use-case in the second.

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

Completeness3/5

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

For a simple one-parameter tool with no output schema, the description is adequate but could specify the return format or confirm it returns a JSON object. The examples give some idea but not full completeness.

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% with a clear parameter description including examples. The description adds context on what the parameter retrieves but does not significantly enhance understanding beyond the schema.

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 tool name and description clearly state it retrieves comprehensive npm package info, including specific examples like version and dependencies. This distinguishes it from siblings such as compare_npm_versions or get_ember_version_info.

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 mentions it is 'essential for understanding package details before upgrading dependencies,' implying a use case. However, it does not explicitly state when not to use this tool or suggest alternatives like compare_npm_versions for version comparison.

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