Skip to main content
Glama

Replace site code (advanced)

deploy
DestructiveIdempotent

Replace the server-side code of an existing roost. Advanced — most agents should use upload (for static files) or convert (for renames) instead. Pass hatchId, workerName, and a full ES module script (text only, 1.5 MiB max).

Input Schema

NameRequiredDescriptionDefault
policyNoHITL policy override. `optional` does not open a review (call `await_decision`). Under `required`, may fork a sibling `{slug}-vN`. `good_effort` still auto-opens and supersedes.
scriptYesFull ES module source.
hatchIdNoHatch id from the original hatch response.
metadataNo
tenantIdNoLegacy alias for `hatchId`.
hitlTitleNoModal title for auto-opened HITL.
approvalIdNoTier-2 phone approval id from a prior deploy attempt.
webhookUrlNoWebhook for auto-opened HITL.
workerNameYes
sessionTokenNoOptional paired session token from poll_pairing (when Authorization headers are unavailable).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / policy / description
      Previous value: -"HITL policy override. Under `required`, may fork a sibling `{slug}-vN`."New value: +"HITL policy override. `optional` does not open a review (call `await_decision`). Under `required`, may fork a sibling `{slug}-vN`. `good_effort` still auto-opens and supersedes."
    • changedInput schema / properties / policy / enum
      Previous value: -[
      -  "required",
      -  "good_effort"
      -]New value: +[
      +  "required",
      +  "good_effort",
      +  "optional"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / hitlTitle
      Added value: +{
      +  "description": "Modal title for auto-opened HITL.",
      +  "type": "string"
      +}
    • addedInput schema / properties / policy
      Added value: +{
      +  "description": "HITL policy override. Under `required`, may fork a sibling `{slug}-vN`.",
      +  "enum": [
      +    "required",
      +    "good_effort"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / webhookUrl
      Added value: +{
      +  "description": "Webhook for auto-opened HITL.",
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / hatchId
      Added value: +{
      +  "description": "Hatch id from the original hatch response.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tenantId / description
      Added value: +"Legacy alias for `hatchId`."
    • changedInput schema / required
      Previous value: -[
      -  "tenantId",
      -  "workerName",
      -  "script"
      -]New value: +[
      +  "workerName",
      +  "script"
      +]
  4. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=true and openWorldHint=true, so the safety profile is covered. The description adds the 'advanced' framing and a 1.5 MiB text-only script constraint, but says nothing about the HITL review flow that the schema's policy/approvalId/hitlTitle/await_decision parameters imply, which is the most consequential behavior for this 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?

Three tight sentences: purpose, routing guidance, then required inputs and limits. Front-loaded and free of 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?

Adequate for invoking the tool given 80% schema coverage and annotations covering the mutation profile, but for a 10-parameter, HITL-driven, no-output-schema operation the description omits the review/approval lifecycle an agent needs to complete the call. The missing piece is behavioral, not syntactic.

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 80%, so most parameters are already documented; the description names hatchId, workerName and script plus a useful 1.5 MiB size limit not present in the schema. However, it does not touch the HITL-related parameters (policy, approvalId, hitlTitle, webhookUrl) that carry the most ambiguity, so the baseline applies.

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?

Specific verb 'Replace' plus a precise resource 'the server-side code of an existing roost', and it explicitly names sibling tools it is not (upload, convert). An agent can distinguish it from all siblings without opening a schema.

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?

States the selection condition up front ('Advanced — most agents should use upload... or convert... instead') with the reason each alternative applies (static files, renames). Explicit when-to-use and when-to-avoid guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.