Skip to main content
Glama

deploy_template

Deploy a starter app from a template ID and app name, then call wait_for_service to follow the asynchronous build.

Instructions

Use when: you want a starter app. Asynchronous — follow with wait_for_service.

    Resolves ``template_id`` (see ``list_app_templates``), clones its
    catalog repo server-side, and deploys it under ``name``. ``env`` and the
    deploy overrides layer over the template's defaults.
    The response carries ``summary``, ``hints``
    (never empty) and ``next_step`` — the structured follow-up call — since
    a 201 here means the build was accepted, not that the app is up.

    An existing Dockerfile retains precedence over ``build_settings``.
    Omission preserves overrides; a null field resets to repository/default.
    ``dry_run=True`` previews without writes,
    building or storing secrets. ``public_env`` passes public build-time
    variables (shown in clear in a dry run; secret references are refused);
    secret mounts are unsupported.

    If the template declares ``[ai.*]`` bindings, each is injected at launch
    as ``NERDIT_AI_<NAME>_URL/_KEY/_MODEL``, and the ``default`` binding also
    sets ``OPENAI_BASE_URL/OPENAI_API_KEY/OPENAI_MODEL`` — point the app's
    OpenAI SDK at these; no code change needed. WARNING: the ``secrets`` values you pass
    here transit this agent's transcript in plaintext; for high-value keys
    prefer ``nerdit secrets set`` from the CLI and deploy without ``secrets``.
    

Input Schema

NameRequiredDescriptionDefault
envNoRuntime env for the container: values are literal strings, never resolved (a ``${secrets.*}`` reference is passed through as text); a null value deletes that key on redeploy. Secrets go through ``set_secret``, which overrides an ``env`` key of the same name at launch.
gpusNoGPUs to reserve for the container (0 = none). Omit to use the template's default, else the repo's ``[deploy].gpus``.
nameYesApp name (lowercase DNS label). A new name creates the app; an existing one redeploys it in place.
portNoPort the container listens on: the only port published and health-checked. Omit to use the template's default, else the repo's ``[deploy].port``, else 8000.
startNoStart command run inside the built image (shell syntax). Omit to use the template's default, else the repo's ``[deploy].start`` or the buildpack default.
healthNoHTTP health path probed on ``port`` (e.g. ``/health``); the app is ``healthy`` once it answers 2xx. Omit to use the template's default, else the repo's ``[deploy].health``.
vendorNoGPU vendor to reserve when ``gpus`` > 0 (``nvidia`` or ``amd``); omit to let the daemon choose on a fresh deploy — a redeploy keeps the vendor already recorded.
dry_runNotrue = validate and return the plan (what would change) with zero writes; nothing is built, deployed or audited as a change.
secretsNoWrite-only secrets for the template's required secret inputs; stored server-side right AFTER the app row is written (the row is the authorization point) and before the first launch, so a failed secret write leaves the app created. Only key names are ever read back. Omit when the template declares none.
template_idYesTemplate id from ``list_app_templates`` (its ``id`` field).
build_settingsNoBuild overrides, same keys as ``[deploy.build_settings]`` in ``nerdit.toml``: ``preset`` (node/nextjs/python/dockerfile), ``install``, ``build`` (``false`` skips compilation), ``start``, ``node_version``, ``package_manager``, ``subdir``, ``public_env`` (build-time variables baked into the bundle, never secrets). Commands run inside the build container.
idempotency_keyNoCaller-chosen key: a retry with the same key replays the first result instead of acting twice. Omit and a fresh key is minted per call, so each call acts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does well: async semantics ('a 201 here means the build was accepted, not that the app is up'), the follow-up call, override precedence (existing Dockerfile wins over build_settings), null-resets-vs-omission semantics, unsupported secret mounts, and an explicit plaintext-transcript warning about passing secrets.

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?

Front-loads the trigger, then the async contract, then behavior, then the safety warning. Dense but nearly every sentence carries operational information; the AI-binding paragraph is the longest block and borders on verbose.

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?

For a 12-parameter mutation with no annotations and no output schema, the description covers the response shape (summary, hints never empty, next_step), the async contract, and the destructive/secret-handling risks. Nothing an agent needs to call this correctly is missing.

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 baseline is 3, but the description adds real meaning beyond the schema: env/overrides layer over template defaults, public_env is public build-time variables with secret references refused, and AI bindings get injected as NERDIT_AI_<NAME>_*. The gpus/vendor/port interactions are left to the schema.

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?

States the specific action chain: resolves template_id, clones the catalog repo server-side, deploys under name. An agent can tell it is the template-based deploy path from list_app_templates. Sibling differentiation against deploy_app/deploy_git is only implied, not stated.

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?

'Use when: you want a starter app' plus the explicit instruction to follow with wait_for_service gives clear entry and exit conditions. dry_run=True is offered as the preview path. It never says when NOT to use this versus deploy_app or deploy_git.

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