Skip to main content
Glama

Update Lovelace resource

dashboards_update_dashboard_resource
DestructiveIdempotent

Replace the URL and type of an existing Lovelace resource to repoint it at a new file or change its declared type.

Instructions

Replace the URL and type of an existing Lovelace resource.

Sends resource_id, url and resource_type to lovelace/resources/update, replacing both fields of that resource entry — the previous URL/type are not recoverable afterwards. Like dashboards_add_dashboard_resource, this tool never fetches url itself.

Use when: repointing an existing resource entry at a new file or changing its declared type. Not for: registering a brand-new resource — use dashboards_add_dashboard_resource. Returns: {"status": "updated", "resource_id": ..., "url": ..., "resource_type": ..., "result": ...} on success. Errors: {"error": "resource_type must be 'module', 'js', or 'css'"} when resource_type is anything else.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesNew resource URL, replacing the current one.
resource_idYesNumeric resource id to update, from dashboards_get_dashboard_resources.
resource_typeNoResource kind: 'module' (ES module JS), 'js' (legacy script), or 'css'. Defaults to 'module'.module

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.25.1
    • changedInput schema / properties / resource_id / description
      Previous value: -"Numeric ID of the resource to update."New value: +"Numeric resource id to update, from dashboards_get_dashboard_resources."
    • changedInput schema / properties / resource_type / description
      Previous value: -"'module', 'js', or 'css'."New value: +"Resource kind: 'module' (ES module JS), 'js' (legacy script), or 'css'. Defaults to 'module'."
    • changedInput schema / properties / url / description
      Previous value: -"New resource URL."New value: +"New resource URL, replacing the current one."
  2. Addedv0.18.1

TDQS

A4.6/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 what is destroyed ('the previous URL/type are not recoverable afterwards') and a non-obvious trait not captured by any annotation: 'this tool never fetches url itself'. It also documents the error response format and the resource_type constraint, giving concrete operational context.

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 core action, then well-labeled Use when / Not for / Returns / Errors sections that make it easy to scan. Slightly long, and the Returns block partially duplicates the existing output schema, but no line is truly wasteful.

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 destructive, 3-parameter, single-purpose mutation with annotations and an output schema, the description covers purpose, routing, irreversibility, side-effect scope, and error cases. An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all three parameters (resource_id, url, resource_type) are already documented in the schema, so the description's mention of them is largely confirmatory. The error-string detail for resource_type echoes what the schema enum description already states. Baseline 3 is correct when the schema does the heavy lifting.

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?

Opens with a specific verb+resource: 'Replace the URL and type of an existing Lovelace resource', and even names the backend endpoint (lovelace/resources/update). It explicitly contrasts with the sibling dashboards_add_dashboard_resource, so an agent can distinguish update vs create without opening the 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?

Contains explicit 'Use when: repointing an existing resource entry' and 'Not for: registering a brand-new resource — use dashboards_add_dashboard_resource'. Both the triggering condition and the named alternative are spelled out.

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