Skip to main content
Glama

upsert_rewrite_script

Create or update an immutable ESM rewrite script package via manifest, modules, or one-file content; optionally reload the rewrite snapshot.

Instructions

Creates a new ESM rewrite script package or publishes a new immutable revision. Provide manifest/modules for multi-file packages, or content as a one-file shorthand. Set reload=true to request an immediate runtime snapshot reload after persistence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoExisting script package id. Omit to create a package.
nameNoScript name. Required when creating; optional when updating.
reloadNoRequest an immediate rewrite snapshot reload after the package is stored.
contentNoOne-file shorthand. Converted to main.js with the default restricted permissions.
modulesNoComplete module source list matching manifest.modules.
manifestNoComplete ESM package manifest.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses immutability of revisions and the reload semantics, which is useful. However, it omits permission requirements, whether an existing revision is replaced, error conditions, and the safety profile of a mutation tool.

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?

Two sentences, front-loaded with the core action and followed by practical field guidance. Every clause adds value with no repetition or filler.

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 complex mutation tool with nested manifest/permissions objects and no output schema, the description covers the main calling patterns but leaves gaps: no mention of atomicity, permission defaults beyond content shorthand, or validation behavior. Adequate but not complete.

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 description coverage is 100%, so the schema already documents id, name, reload, content, modules, and manifest in detail. The description only adds meaning for 'reload' (immediate runtime snapshot reload after persistence) and the content-vs-manifest choice, which the schema largely covers. 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?

The description states a clear verb and resource: creating a new ESM rewrite script package or publishing a new immutable revision. The dual create/update nature is well captured. It does not explicitly differentiate from siblings like upsert_module or rollback_rewrite_script, but the specific 'rewrite script package' scope is clear enough.

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?

The description implies usage through the create-vs-update distinction and the manifest/content choice, but gives no explicit when-to-use or when-not-to-use guidance against alternatives like rollback_rewrite_script or validate_rewrite_script_package. No exclusions or prerequisites are stated.

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