Skip to main content
Glama

Publish the package

publish_package

Publishes a project package to npm, PyPI, or crates.io from the terminal, skipping existing versions and opening the approval page for sign-in or 2FA.

Instructions

Publish from the terminal (npm publish [--access public], twine upload, cargo publish). Skips when the version already exists. Returns a job; the npm approval page is opened in the browser for the user. If the link expires, call again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirYesProject folder (absolute path, or relative to the server's working directory).
dryRunNo
openBrowserNoOpen approval pages in the default browser.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the sparse annotations: it discloses that the version-exists case is silently skipped, that the call returns an async job rather than a completed publish, that an approval page is opened in the user's browser (a side effect annotations do not cover), and that retry is expected when links expire. These are exactly the behaviors an agent needs to plan around.

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?

Four short sentences, verb-first, with the alternative commands, idempotency behavior, return shape, and retry guidance each in its own clause. No filler and nothing buried.

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

Completeness4/5

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

For a 3-parameter, output-schema-less tool it covers the essentials: what it publishes, the skip condition, the async job return, and the browser link lifecycle. It omits authentication prerequisites and any mention of dryRun, which leaves a modest gap for a tool with an openWorldHint annotation.

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 67%: 'dir' and 'openBrowser' are documented in the schema, and the description's browser-approval sentence loosely reinforces openBrowser, but 'dryRun' is undocumented in both schema and description. Baseline 3 is appropriate when the schema carries most of the load.

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 ('Publish from the terminal') and enumerates the concrete registry commands it drives (npm publish, twine upload, cargo publish), leaving no doubt about what it does. It does not explicitly name how it differs from close siblings like tag_and_release or setup_trusted_publishing, so it stops short of a 5.

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?

Gives real operational context: it is idempotent ('Skips when the version already exists') and tells the agent to re-invoke if the approval link expires. It never states prerequisites (login / trusted publishing already configured) or when a sibling such as tag_and_release should run instead, so no explicit exclusions.

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