Skip to main content
Glama
YawLabs

@yawlabs/npmjs-mcp

by YawLabs

npm_org_member_set

DestructiveIdempotent

Assign or update an npm user's role in an organization, preserving their current role when none is specified. Prevents accidental demotion by re-sending the existing role explicitly.

Instructions

Add a user to an org or change their role. Roles: 'developer', 'admin', 'owner'. If the user is already in the org, updates the role. Omitting role keeps the member's current role: this tool reads the roster first and re-sends the existing role explicitly, because the registry DEFAULTS an omitted role to 'developer' rather than preserving it (which would silently demote an admin or owner). For a user who is not yet a member, omitting role adds them as 'developer'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgYesOrganization name (with or without leading @)
roleNoRole to assign
userYesnpm username
confirmYesMust be literally true. Guards against accidental org membership changes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.2

TDQS

A4.7/5.0
Behavior5/5

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

The description goes far beyond the annotations (destructiveHint, idempotentHint) by disclosing the critical behavior: the registry defaults an omitted role to 'developer', which would silently demote admins/owners. It explains the workaround of reading the roster first and re-sending the existing role. It also notes that omitting role for new users adds them as 'developer'. This is essential behavioral context that annotations do not provide.

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 somewhat long but every sentence is information-dense. The primary purpose is front-loaded, and the crucial nuance about role omission is explained in a structured flow. No filler or redundant phrasing; the length is justified by the complexity of the behavior.

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 destructive org membership mutation with no output schema, the description covers all necessary aspects: adding vs updating, role omission behavior, the registry's surprising default, and the safety requirement. The confirm parameter is also described in the schema, and the description emphasizes the guard. An agent has enough to invoke this tool correctly.

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?

Schema coverage is 100%, so baseline is 3. The description adds meaningful semantic detail about the 'role' parameter: the effect of omitting it differs for existing vs new members, and the tool explicitly preserves existing roles. This extra explanation helps the agent pass the correct parameters, exceeding what the schema alone conveys.

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 verb and resource: 'Add a user to an org or change their role.' It clearly names the action and scope, and differentiates itself from siblings like npm_org_member_remove and npm_owner_add. No ambiguity about what this tool does.

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 for when to use the tool: to add a member or update a role. It explains behavior for both existing and new members, which helps the agent decide based on the scenario. However, it does not explicitly name alternatives or state when-not-to-use, leaving some inference to the agent.

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