Skip to main content
Glama

List Npm Files

list_npm_files
Read-onlyIdempotent

jsDelivr Data API — the file tree of one published npm package version (latest by default) as jsDelivr indexes it for CDN delivery. Returns the directory structure with each file's path, byte size, content hash and type, read from jsDelivr's package index. Answers which files, entry points and build outputs an npm package version actually ships.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "package_name": "lodash"
    },
    "name": "list_npm_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
versionNoSpecific published version, e.g. "4.17.21". Omit this argument entirely to get the latest published version — do not pass the literal string "latest"; jsDelivr's API rejects that as an unresolvable version and returns 404.
package_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "package_name": "lodash"
      -  },
      -  {
      -    "package_name": "next",
      -    "version": "14.0.0"
      -  }
      -]New value: +[
      +  {
      +    "package_name": "lodash"
      +  },
      +  {
      +    "package_name": "next",
      +    "version": "14.0.0"
      +  },
      +  {
      +    "package_name": "@types/node",
      +    "version": "22.0.0"
      +  }
      +]
    • changedInput schema / properties / version / description
      Previous value: -"Specific version (default latest)"New value: +"Specific published version, e.g. \"4.17.21\". Omit this argument entirely to get the latest published version — do not pass the literal string \"latest\"; jsDelivr's API rejects that as an unresolvable version and returns 404."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and non-destructive behavior. The description adds meaningful context by specifying the data source (jsDelivr's package index), that it reflects CDN delivery state, and that results reflect what a version actually ships. This goes beyond simple read-only labeling without contradicting annotations.

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?

Three focused sentences convey the source, the scope, the returned data fields, and the intended use case without repetition. Every clause earns its place, and the most important scope information (one version, latest by default) appears immediately.

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

Completeness5/5

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

Given the output schema is present and annotations already cover safety properties, the description provides adequate context for correct invocation: what the tool operates on, default version behavior, the data source, and the type of information returned. No critical operational detail appears to be missing for this read-only listing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema fully documents the version parameter with an important warning about not passing 'latest', while package_name is only illustrated by examples. The description supplements this by defining the operation as covering 'one published npm package version' and emphasizing the latest-by-default behavior, adding useful semantic framing beyond the sparse schema entry for package_name.

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 identifies the action (returns the file tree) and the specific resource (one published npm package version as indexed by jsDelivr). It distinguishes the tool from the sibling list_npm_versions by focusing on files rather than versions, and clarifies that it answers what a package actually ships.

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 gives clear context: use this tool when you need the file/directory structure, entry points, or build outputs of a specific npm package version, with latest as default. It does not explicitly name sibling alternatives or state when not to use it, but the purpose is clear enough for an agent to select it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.