Skip to main content
Glama

Save a blueprint file

blueprints_save_blueprint
DestructiveIdempotent

Saves blueprint YAML to Home Assistant's blueprints folder. Set overwrite to replace an existing file.

Instructions

Save blueprint YAML to /config/blueprints//.

Calls the blueprint/save WebSocket command with yaml_content as the payload and overwrite mapped to HA's allow_override flag; with overwrite=False (default) it does not replace an existing file at path, and with overwrite=True it does, losing the previous content.

Not for: fetching a blueprint from the internet first — use blueprints_import_blueprint to get raw_data/suggested_filename. Returns: Home Assistant's blueprint/save result (typically an empty success payload). Errors: Home Assistant raises a WebSocket error, surfaced by ha._ws_call as a RuntimeError, when overwrite=False and a file already exists at path. Limits: blocks for the WebSocket round trip; the default 10 second response wait in ha._ws_call applies. No confirm parameter — the only overwrite guard is the overwrite flag itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesBlueprint path relative to /config/blueprints/<domain>/, e.g. 'author/blueprint_name.yaml'. Typically the `suggested_filename` from `blueprints_import_blueprint`.
domainNoBlueprint domain folder to save under, 'automation' or 'script'. Defaults to 'automation'.automation
overwriteNoIf True, replace an existing file at `path`. If False (default), Home Assistant refuses the save when a file already exists there.
source_urlNoOrigin URL to record as the blueprint's source_url metadata. Omit to save without one.
yaml_contentYesRaw blueprint YAML text to persist, e.g. the `raw_data` field returned by `blueprints_import_blueprint`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.25.1

TDQS

A4.9/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 substantial context beyond them: overwrite=False (default) refuses to replace an existing file while overwrite=True loses the previous content, the RuntimeError surfaced by ha._ws_call on conflict, the blocking WebSocket round trip with a 10s default wait, and the explicit absence of a confirm parameter. This is rich behavioral disclosure.

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 description is front-loaded with the purpose and destination, then cleanly partitioned into Not for / Returns / Errors / Limits sections. Every sentence carries operational value, and length is justified by a mutation tool with several edge conditions.

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 re-explained, and the description still notes the typical empty success payload. Combined with the error and timeout coverage, an agent has everything required to invoke the tool correctly, including the path convention tied to blueprints_import_blueprint.

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 description coverage is 100%, so the baseline is 3. The description still adds cross-system meaning beyond the schema by explaining that overwrite maps to Home Assistant's allow_override flag, which an agent invoking the underlying WebSocket command would not learn from the schema alone.

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 first line states a specific verb and resource with the exact destination ('Save blueprint YAML to /config/blueprints/<domain>/<path>'), and the description explicitly names what this tool is NOT for, routing fetching-from-internet cases to blueprints_import_blueprint. An agent can distinguish this from the sibling import/delete blueprint tools without opening any schema.

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?

The 'Not for:' clause names the alternative tool (blueprints_import_blueprint) and the condition that selects it (getting raw_data/suggested_filename from the internet first). The overwrite semantics also clarify when a destructive save is intended versus refused, leaving nothing to inference.

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