Skip to main content
Glama

Build editable source and ship the result as the new dist

build_and_deploy

Run a build inside a hardened one-shot pod against the site's editable source tree (write source first via write_source_files / list_source_files autoPromote), then atomically swap the build output into the live dist. Reuses the same build pod the GitProject git-deploy flow uses, so the same isolation guarantees apply: no SA token, no DB/Vault reach, NetworkPolicy-restricted egress. The first run writes the chosen buildCommand/outputDir into Site.sourceManifest; subsequent calls can omit those fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
siteIdNo
rootPathNoSubdirectory inside the source tree where package.json lives. Empty string = source root. Useful for monorepos.
outputDirNoOverride for which directory to ship as the new dist. If omitted, uses the manifest, then auto-detects (dist > build > out > public).
buildCommandNoOverride for the build script's `npm run build` step (e.g. 'npm run build:prod' or 'pnpm vite build'). If omitted, uses the manifest stored on the site, then falls back to 'npm run build'.
saveManifestNoIf true (default), persists the merged manifest back onto the site so future builds default to these settings. Set false to do a one-off build without changing the saved manifest.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
siteIdYes
buildLogYesCombined orchestrator + builder log; truncated to ~32 KB to fit MCP responses.
manifestYes
outputDirYes
totalBytesYes
filesDeployedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / request_id
      Removed value: -{
      -  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      -  "type": "string"
      -}
  2. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses meaningful runtime behavior: hardened one-shot pod, no SA token, no DB/Vault reach, NetworkPolicy-restricted egress, atomic swap into the live dist, and the side effect of writing buildCommand/outputDir into Site.sourceManifest on first run. These are exactly the behavioral details an agent needs to anticipate consequences.

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 sentences with no filler: the action, the isolation/security guarantees, and the manifest persistence behavior. Technical details are packed efficiently in parentheticals, and the most critical behavior is front-loaded.

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 build-and-swap operation, it covers prerequisites, isolation guarantees, atomicity, and persistent manifest behavior; the output schema handles return values. It stops short of describing failure/rollback behavior or how to identify the site when both name and siteId are absent, but nothing critical is missing for selecting and invoking the tool.

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 schema covers 67% and already documents rootPath, outputDir, buildCommand, and saveManifest. The description adds important cross-parameter semantics: buildCommand and outputDir are persisted into the manifest on first run and can be omitted later. It does not clarify the roles of name or siteId, but those are common identifiers and the description provides enough operational context.

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 specific multi-step action — run a build inside a one-shot pod and atomically swap its output into the live dist — with a clear resource and result. It is unambiguous, though it does not explicitly contrast itself with sibling deploy tools such as deploy_site or begin_deploy.

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?

It gives clear context: source must first be written via write_source_files / list_source_files, and builds reuse the GitProject git-deploy pod. It also explains the first-run vs subsequent-run manifest behavior. It does not name alternatives or state when not to use this tool, so it falls short of a 5.

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.