Skip to main content
Glama

Upload NeonPlan 3D background image

neonplan_upload_background_image
DestructiveIdempotent

Uploads a PNG, JPEG or WebP image as a shared NeonPlan 3D background so you can trace a scanned floor plan in the editor. Returns an image_id to reference in a floor's background right away.

Instructions

Store a png, jpeg or webp image as a NeonPlan 3D background (floor tracing) image and return its image_id.

Reads the file (or decodes the base64), checks the real content type and the 8 MiB data URL limit, refuses an existing image_id unless overwrite (image/get), and sends neonplan3d/image/set (admin). Images are shared by all plans. WARNING: the integration deletes images no plan references at its next start, so reference it right away in a floor's background ({"image_id", "x", "z", "width", "opacity", "rotation"}) with neonplan_patch_plan.

Use when: tracing a scanned floor plan in the NeonPlan editor. Not for: Lovelace or card images — use card_builder_upload_media. Returns: {"uploaded": true, "image_id", "type", "bytes", "data_url_chars", "replaced", "warning"}. Errors: invalid_image_id, invalid_source, invalid_path, path_not_allowed, file_not_found, unsupported_image, image_too_large, invalid_base64 (all without I/O to HA), image_exists, neonplan_version_unsupported, admin_required, neonplan_not_installed, ha_unreachable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image_id": "<image_id>"
    },
    "name": "neonplan_upload_background_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNopng/jpeg/webp file under /config (or /media when mounted), e.g. `/config/www/plan.png`.
forceNoTrue writes even when the integration is not version 3.0.x (format checked by you).
image_idYesId to store the image under, e.g. `ground_floor_scan` (A-Z a-z 0-9 _ - ., 1-64).
overwriteNoTrue replaces an image already stored under image_id.
data_base64NoThe image as base64 (a `data:image/...;base64,` prefix is accepted) instead of path.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.29.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description earns credit beyond that by disclosing the real mechanism of loss: unreferenced images are garbage-collected at integration start, both inputs are validated (content-type sniffing, 8 MiB data URL cap), an existing image_id is refused unless overwrite is set, and admin rights plus a version check are required. It also enumerates the distinct error names and notes which ones occur without I/O to HA.

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 one-line purpose, then behavior, routing, return shape, and errors in a predictable order; every block is scannable. It runs long, and restating the return keys duplicative of the output schema is the only real waste.

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?

Covers everything needed for a destructive write tool: preconditions (admin, version), input constraints, overwrite semantics, the exact JSON shape required to persist the image before cleanup, and a full error taxonomy. With annotations and an output schema already present, no meaningful gap remains.

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, but the description adds meaning the schema does not: path and data_base64 are alternatives, image_id acts as a key that collides with stored images unless overwrite is true, and image_id has a follow-up contract with plan backgrounds. The force parameter is left to 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?

States a specific verb and resource ("Store a png, jpeg or webp image as a NeonPlan 3D background") and names the return value (image_id). It also names the sibling card_builder_upload_media as the wrong tool for Lovelace/card images, so an agent can route without opening a 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?

Gives an explicit trigger ("Use when: tracing a scanned floor plan in the NeonPlan editor") and an explicit exclusion ("Not for: Lovelace or card images — use card_builder_upload_media"). It further states the required follow-up action (reference the image via neonplan_patch_plan) and the overwrite condition, leaving no inference needed.

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