Skip to main content
Glama

Create or overwrite a script config

automations_set_script_config
DestructiveIdempotent

Create or overwrite a script's stored YAML config and reload scripts. Replaces the whole config at a given ID, creating a new script if the ID is unused.

Instructions

Create or overwrite a script's stored YAML config, then reload scripts.

Posts config to /api/config/script/config/<id>, replacing the whole stored config at that id (or creating a new script if the id is unused), then calls the script.reload service.

Not for: running the script — use automations_run_script. Returns: dict {"status": "saved", "script_id", "result"}. Errors: returns {"error": "config must be a dict"} when config isn't a dict, or {"error": "config must contain at least 'alias' or 'sequence'"} when both are missing. Limits: no confirm parameter; an existing script at script_id is replaced without a prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYesFull script config replacing whatever is stored at `script_id` (sequence, fields, alias, mode). Must contain at least 'alias' or 'sequence'.
script_idYesScript id to create or replace, bare (e.g. 'goodnight') or prefixed ('script.goodnight'). An id that does not exist yet creates a new script.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.25.1
    • addedInput schema / properties / config / description
      Added value: +"Full script config replacing whatever is stored at `script_id` (sequence, fields, alias, mode). Must contain at least 'alias' or 'sequence'."
    • addedInput schema / properties / script_id / description
      Added value: +"Script id to create or replace, bare (e.g. 'goodnight') or prefixed ('script.goodnight'). An id that does not exist yet creates a new script."
  2. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds concrete consequences: the whole stored config at that id is replaced (not merged), script.reload is invoked as a side effect, and there is no confirm step so an existing script is overwritten silently. It also documents two specific error payloads, which is exactly the kind of behavior an agent cannot infer from annotations.

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?

The first sentence front-loads the whole operation (write config, then reload) and every subsequent line is a labeled block (Not for / Returns / Errors / Limits). No filler, no repetition of the title, and the destructive-overwrite caveat is given its own line rather than buried.

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 an idempotent-but-destructive config writer, it covers the alternative tool, the return shape, the failure modes, and the absence of a confirmation guard. With an output schema present it did not need to explain return values in detail, yet the one-line 'Returns' is a harmless reinforcement rather than padding.

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; the description earns one more by spelling out replacement semantics and surfacing runtime validation failures tied to `config` ('config must be a dict', must contain 'alias' or 'sequence'). This tells the caller what a well-formed `config` actually needs before the call, which the schema alone only partially conveys.

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 opening sentence states a specific verb pair and resource (create or overwrite a script's stored YAML config) plus the follow-on effect (reload scripts). It also states the exact endpoint, which makes it trivially distinguishable from siblings like automations_get_script_config, automations_delete_script and automations_set_scene_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?

Explicitly names a near-miss sibling and when to prefer it: 'Not for: running the script — use automations_run_script.' The create-vs-overwrite condition is also covered by the schema/description ('an id that does not exist yet creates a new script'). It stops short of 5 because it doesn't compare against automations_get_script_config or the delete/reload siblings in the same family.

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

Deploy Server

Other Tools