Skip to main content
Glama

dashboards_add_dashboard_resource

Register custom JavaScript modules or CSS files to Home Assistant Lovelace dashboards. Resources can be loaded from local paths or external CDNs to extend dashboard functionality.

Instructions

Add a custom resource (JS module or CSS) to Lovelace.

Resources load on every dashboard page — use this to register custom cards, themes, or scripts stored in /local/ or an external CDN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesResource URL, e.g. '/local/my-card.js' or '/hacsfiles/mini-graph-card/mini-graph-card-bundle.js'.
resource_typeNo'module' (default, ES module JS), 'js' (legacy script), or 'css'.module

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

Without annotations, the description must disclose behavioral traits. It states resources load on every page, but omits important details like whether adding duplicates overwrites or fails, permission requirements, side effects, or any confirmation of the action. This lack of depth leaves an agent unclear about the tool's behavior.

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 very concise: two sentences that efficiently state the action and provide context with examples. No unnecessary words or repetition. Front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an add operation, the description covers basic purpose and scope (global loading). However, it lacks behavioral details like idempotency and response format. Since an output schema exists, the return value detail may be covered there, but the description should still hint at outcomes. Overall adequate but not fully complete.

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?

The input schema has 100% coverage for both parameters, so the schema already documents their types and defaults. The description adds no new meaning beyond the schema—it mentions 'JS module or CSS' which aligns with resource_type options but doesn't enhance understanding. Baseline 3 is appropriate.

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?

The description clearly states the tool adds a custom resource (JS module or CSS) to Lovelace, establishing a specific verb and resource. However, it does not explicitly distinguish from sibling tools like dashboards_remove_dashboard_resource or dashboards_update_dashboard_resource, missing an opportunity to differentiate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on when to use the tool, such as registering custom cards, themes, or scripts that load on every dashboard page. It implies usage scenarios but does not offer explicit guidance on when not to use it or mention alternatives like removal or update tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fistacho/ha-nexus-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server