Skip to main content
Glama
NPM Publisher MCP Server

NPM Publisher MCP Server

by GiDanis

npm_validate

Validate package.json and check prerequisites before NPM publishing to catch configuration errors early. Specify a directory or use the current one.

Instructions

Validate package.json and check prerequisites for NPM publishing

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
directoryNoDirectory containing package.json (defaults to current directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. 'Validate' implies a non-mutating read, but the description never confirms it performs no writes, what 'prerequisites' are actually checked, how failures are surfaced, or whether it exits early or collects all issues. For a gatekeeping step ahead of publishing, that is a meaningful gap.

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?

One short sentence with the action and scope front-loaded and zero filler. Nothing in it is redundant or padded.

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 single-parameter tool this covers the essentials, but with no annotations and no output schema the description should explain what a successful vs failed validation looks like and what 'prerequisites' encompasses (auth, version, registry, uncommitted changes). An agent can call it, but cannot predict its result semantics.

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?

With a single optional parameter at 100% schema coverage, the schema already explains the directory default to the current directory. The description adds no further semantics such as relative vs absolute paths or behavior when no package.json exists at that path, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Validate package.json') plus a second scope element ('check prerequisites for NPM publishing'), making it identifiable as the pre-publish validation step rather than a publish or version tool. It does not explicitly name a sibling, but the 'Validate' verb is distinctive enough against npm_publish/npm_version_bump.

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?

Usage is only implied: 'check prerequisites for NPM publishing' suggests running this before npm_publish, but there is no explicit when-to-use, no ordering guidance relative to npm_login_status or publish_workflow, and no statement of what happens if validation fails.

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