Skip to main content
Glama
mgcrea

@mgcrea/mcp-npm

by mgcrea

npm: Reload Auth

npm_auth_reload
Read-only

Re-reads the npm token from ~/.npmrc, NPM_TOKEN, and config, and reports if it changed. Fixes 401s after terminal npm login without restarting.

Instructions

Re-read the npm token from ~/.npmrc, NPM_TOKEN and the config file, and report whether it changed. Use this after npm login in a terminal: this server captures the token when it starts, so a login that visibly worked leaves it sending the OLD credential and failing 401 on everything while npm whoami in your shell succeeds. Cheap and safe — it reads three files, sends nothing to npm, and never reports the token itself. It re-reads ONLY the token: the registry, the write gate and the OTP settings stay as they were at startup, so a reload can never quietly widen what this server may do. One limit worth knowing: if the server started with NO token at all, the credentialled tools were never registered, and a reload cannot add them — that case still needs a restart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.2.2

TDQS

A4.9/5.0
Behavior5/5

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

Despite readOnlyHint=true, the description adds substantial behavioral context: it reads three files, sends nothing to npm, never reports the token itself, and only reloads the token while preserving registry, write-gate, and OTP settings. It also discloses the startup-without-token limitation. No contradiction with the annotation exists.

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 dense but every sentence earns its place: the core behavior, the recommended trigger, the safety profile, the narrow scope, and the one important limitation. It is front-loaded with the main purpose before caveats.

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?

For a zero-parameter, described-safe tool, this is complete: an agent knows what the tool does, why it exists, what side effects it does and does not have, what the return intent is (whether the token changed), and which edge case requires a restart. No output schema is present, but the description covers the needed return semantics.

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 tool has zero parameters and the schema is an empty object with 100% coverage, so there is nothing for the description to add about parameter meaning. The baseline of 4 applies because no parameters are present.

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 states a specific action and resource: re-reading the npm token from ~/.npmrc, NPM_TOKEN, and the config file, then reporting whether it changed. It clearly distinguishes this from the sibling status tool by focusing on the reload-and-detect-change behavior rather than merely inspecting auth state.

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

Usage Guidelines5/5

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

It explicitly says to use this after `npm login` in a terminal, explains why it is needed (stale token captured at startup causing 401s), and gives a concrete exclusion: if the server started with no token, reload cannot help and a restart is required. This gives an agent clear when-to-use and when-not-to-use guidance.

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

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/mgcrea/mcp-npm'

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