Skip to main content
Glama

deploy

Deploy all Run402 project resources — database, functions, site, routes, secrets, assets — in one operation with explicit replace/patch semantics and controlled warnings.

Instructions

Unified apply primitive. Accepts a structured ReleaseSpec — database (migrations + expose), value-free secrets.require/delete declarations, functions, site, site.public_paths, subdomains, and routes.replace web routes — with explicit replace vs patch semantics per resource. Use site.public_paths for clean static URLs such as /events backed by release asset events.html; explicit mode does not expose /events.html unless separately declared, while mode: 'implicit' restores filename-derived reachability and can widen access. Route entries map exact/final-wildcard browser paths like /admin and /admin/* to Node 22 Fetch Request -> Response functions, or exact GET/HEAD method-aware static aliases such as /events to { type: 'static', file: 'events.html' }; intentional read-only GET/HEAD wildcard function routes may set acknowledge_readonly: true. Direct /functions/v1/:name remains API-key protected. Secret values must be set first with set_secret, never placed in deploy specs. All bytes ride through CAS (no inline-body cap). Returns release_id, URLs, warnings, and a structured progress-event log. Stops before upload/commit on confirmation-required warnings unless reviewed codes are passed with allow_warning_codes or allow_warnings is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoDiff base. Default `{ release: 'current' }`. Use `{ release: 'empty' }` for a fresh deploy that fails if a release already exists.
i18nNoRouted-locale-context release slice. Omit to carry forward from base release; pass null to clear the slice; pass { defaultLocale, locales, detect? } to replace. Drives the negotiated locale that the gateway surfaces to routed HTTP function invocations via x-run402-locale and x-run402-default-locale request headers (omitted entirely when the active release has no i18n slice). Static-route hits do NOT receive locale negotiation.
siteNo
assetsNov1.48 unified-apply assets slice. Asset writes promote inside the same activation transaction as functions/site/secrets so a release flips atomically.
routesNoApply-v1 web routes. Omit or pass null to carry forward base routes; pass { replace: [] } to clear routes; pass { replace: [{ pattern, methods?, target: { type: 'function', name } }] } for functions or exact GET/HEAD { target: { type: 'static', file } } entries for method-aware static route aliases. Prefer site.public_paths for ordinary clean static URLs.
secretsNo
databaseNo
functionsNo
project_idYesProject ID to deploy to (from provision).
subdomainsNoAt most one subdomain per project — multi-element `set` is rejected with SUBDOMAIN_MULTI_NOT_SUPPORTED.
allow_warningsNoContinue past plan warnings that require confirmation. Default false: the tool stops before upload/commit so an agent can set missing secrets or inspect warnings.
idempotency_keyNoOptional client idempotency key. Combined with the project id and gateway-computed manifest digest to deduplicate retries.
allow_warning_codesNoContinue past specific reviewed plan warning codes. Prefer this to allow_warnings when only one known warning class is intentional.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains the tool's behavior: explicit replace vs patch semantics, CAS for all bytes, stopping before upload on warnings, and return value structure. It also notes that direct `/functions/v1/:name` remains API-key protected. However, it does not cover authorization requirements or rate limits, and some behaviors (like failure modes) are implied but not explicit. Still, the disclosure is thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well-structured, starting with the purpose and then listing capabilities. Each sentence adds detail, though some sections (like the route explanation) could be more concise. Given the tool's complexity, the length is justified, and the format is front-loaded with the core concept.

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?

Considering the tool's complexity, lack of output schema, and moderate schema coverage, the description does a good job covering return values, warning behavior, and core use cases. It mentions edge cases like i18n clear vs carry forward, and the distinction between explicit and implicit site modes. However, it could better explain the interplay between subdomains and routing. Overall, it is fairly 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?

The schema description coverage is 69%, meaning the schema already documents many parameters. The description adds context by explaining the purpose of key parameters like `site.public_paths` and `routes.replace` with examples. However, it does not describe every parameter or provide exhaustive detail for complex nested structures. The baseline for moderate coverage is 3, and the description adds some value but not enough to raise the score.

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?

The description clearly defines the tool as a 'Unified apply primitive' and lists the specific resources it handles (database, secrets, functions, site, subdomains, routes). This distinguishes it from sibling tools like deploy_function or deploy_site, which are more specialized. The verb 'deploy' combined with the detailed scope leaves no ambiguity.

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?

The description provides explicit guidance on when to use this tool versus alternatives, such as recommending `site.public_paths` for ordinary clean static URLs and noting that secret values must be set beforehand with `set_secret`. It also warns about the tool stopping before upload on warnings unless specific flags are used. However, it does not explicitly say when to use a sibling tool like `deploy_function`, so the guidance is strong but not exhaustive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MajorTal/run402'

If you have feedback or need assistance with the MCP directory API, please join our Discord server