Skip to main content
Glama

Copy a site's served files into a new source tree

promote_dist_to_source
Idempotent

Create the editable source tree of a site that has none by copying the files it serves, so later changes can use write_source_files, apply_edits(target:'source') and build_and_deploy. The served files do not change, and a site that already has source is left as is. Use mode 'force' only after telling the user that build output (minified bundles) is not original source.

Input Schema

NameRequiredDescriptionDefault
modeNoauto (default): copy plain static files only and refuse build output such as hashed bundles. force: copy build output too.
nameNoSite name as shown by list_sites, e.g. my-portfolio. Provide name or siteId.
siteIdNoSite id from list_sites or get_site. Use instead of name.

Output Schema

NameRequiredDescriptionDefault
hintNoNext step when nothing was copied.
modeYes
nameYes
reasonNoWhy nothing was copied: the site already has a source tree, or auto mode found build output.
siteIdYes
noBuildNoTrue when no package.json was copied: build_and_deploy then publishes the source as is.
promotedYesTrue when this call created the source tree.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare non-read-only, idempotent, non-destructive, but the description adds traits they cannot express: the served files are not modified, an already-sourced site is untouched, and force mode copies minified build output that is not original source. That last point surfaces a real consequence and a consent requirement beyond the structured hints.

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, front-loaded with the outcome and precondition, then consequences, then the caveat. No filler and nothing repeated from the name or schema.

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?

An output schema exists, so return values need not be described, and all three parameters are documented in the schema. The behavioral and usage context needed to invoke this safely (precondition, no-op case, force-mode risk) is fully covered.

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 the baseline is 3, and the description does add value by tying the mode parameter to a behavioral rule ('force only after telling the user that build output is not original source'). It does not further clarify name vs siteId, which the schema already handles.

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?

States a specific verb (create/copy) and resource (the editable source tree) with an explicit precondition: a site that has none. It also names the downstream tools (write_source_files, apply_edits, build_and_deploy) that exist only after this runs, which cleanly separates it from siblings like list_source_files or write_source_files.

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?

It gives the exact condition for use ('a site that has none'), the no-op case ('a site that already has source is left as is'), and a conditional rule for the risky path ('use mode force only after telling the user...'). That is when-to-use, when-not-to-use, and a gating instruction in one place.

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.