Skip to main content
Glama

set_app_config

Update a deployed app's deploy, AI, or database config sections with validation and optional dry runs. Restart the service to apply changes or get a report on whether a restart is needed.

Instructions

Write an app's deploy or ai config section (admin/owner-scoped).

    Writing the ``ai`` section re-wires the app's bindings: on the next
    launch/restart each ``[ai.<name>]`` binding is injected as
    ``NERDIT_AI_<NAME>_URL/_KEY/_MODEL``, and the ``default`` binding also
    sets ``OPENAI_BASE_URL/OPENAI_API_KEY/OPENAI_MODEL`` — pass
    ``restart=True`` to apply it immediately. A dry run needs neither an
    ``If-Match`` nor an idempotency key.
    

Input Schema

NameRequiredDescriptionDefault
nameYesName of a deployed app (``kind=service``). A served model or a managed database is a 404 ``config.not_an_app``; an unknown name a 404 ``not_found``.
valuesYesKeys to merge into that section: an omitted key keeps its value, a null deletes it (a whole binding, or a ``deploy`` key back to its default). In ``ai``/``db`` the unit is the binding — each ``[ai.<name>]``/``[db.<name>]`` table REPLACES the stored one wholesale, so send the whole binding. In ``deploy`` name and port are immutable (422); ``get_app_config`` lists the writable keys.
dry_runNotrue = validate and return the plan (what would change) with zero writes; nothing is built, deployed or audited as a change.
restartNotrue = restart the service right after a real write, whether or not the change needed one. false leaves the running container alone and the response's ``requires_restart`` says whether it should be restarted. No effect when ``dry_run`` is true.
sectionYesSection to write: ``deploy``, ``ai`` or ``db`` (anything else is a 422 ``config.unknown_section``). ``env`` is not writable here — it belongs to the deploy tools and ``set_secret``.
if_matchNoETag from a previous read of this app's config, sent as ``If-Match`` (409 ``config.stale`` when it no longer matches). Omit and the current ETag is read and used for you; ``*`` matches unconditionally.
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?

No annotations exist, so the description carries the full burden and does so well: it explains that writing `ai` re-wires bindings into `NERDIT_AI_<NAME>_URL/_KEY/_MODEL` and `OPENAI_*` on next launch, that ETag mismatch yields 409 `config.stale`, that retries replay via idempotency key, and that a dry run is neither built, deployed nor audited.

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-loaded with the action and scope, then the highest-value behavioral note about binding re-wiring. Dense but nearly every clause carries information; the em-dash-heavy formatting is slightly harder to scan than plain sentences.

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?

With 7 parameters, a nested `values` object, no output schema and no annotations, the description covers authorization scope, side effects, error codes, idempotency and dry-run behavior. An agent has what it needs to call this safely without further discovery.

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 already 100%, which sets baseline 3, but the description adds real meaning beyond the schema: the binding-level replace semantics, the restart-on-write behavior, and the note that a dry run skips `If-Match` and idempotency keys. The merge/delete semantics are covered by the schema rather than the description, keeping it off a 5.

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?

Opens with a specific verb and resource — 'Write an app's deploy or ai config section' — and states the scope (admin/owner). It implicitly distinguishes itself by noting that `env` is not writable here and belongs to the deploy tools and `set_secret`, though it never names its closest siblings `set_config` or `apply_config`.

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?

Clear operational guidance: pass `restart=True` to apply immediately, use `dry_run` to validate with zero writes, and a dry run needs neither `If-Match` nor an idempotency key. It also excludes `env` explicitly. What's missing is when to reach for this tool over `set_config`/`apply_config`, which the description never addresses.

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