Skip to main content
Glama

Validate Card Builder config

card_builder_validate_config
Read-onlyIdempotent

Validate a Card Builder config's structure before creating or updating a card. Checks version, rootId, block types, parent/child links, entity providers, and prop wrappers.

Instructions

Run lightweight structural validation on a Card Builder config (DocumentData).

Checks version, rootId presence, that every block has a known type, that parent/child links are mutually consistent, that entity-required blocks resolve an entity provider (inherited, slot, or fixed) by walking up the tree, and that prop values use the {value: ...}/{binding: ...} wrapper Card Builder requires. Pure computation — makes no call to Home Assistant and does not check against the live upstream schema (see card_builder_check_schema_sync for that).

Use when: sanity-checking a config before card_builder_create_card/card_builder_update_card. Returns: {ok: bool, errors: [...], warnings: [...], block_count, slot_count} — ok is false only when errors is non-empty; warnings flags renamed/unwrapped/unknown props without failing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYesDocumentData config to check, as produced by card_builder_build_from_recipe or returned by card_builder_get_card.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.1
    • addedInput schema / properties / config / description
      Added value: +"DocumentData config to check, as produced by card_builder_build_from_recipe or returned by card_builder_get_card."
  2. Addedv0.18.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so safety and idempotency are covered. The description adds valuable behavioral context beyond annotations: it's pure computation with no Home Assistant call, does not check the live upstream schema, defines what `ok` means (false only when errors is non-empty), and clarifies that warnings do not fail validation.

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?

Well-structured with a definition, an enumerated check list, a usage directive, and a return contract. It is longer than strictly necessary but every sentence earns its place by specifying a distinct check or behavior. The 'Use when' and 'Returns' sections are clearly front-loaded.

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?

Given one required parameter, 100% schema coverage, an output schema, and annotations covering safety/idempotency, the description fills all remaining gaps: it specifies the checks, the pure-computation boundary, the absence of upstream schema comparison, and the exact semantics of the returned status fields. Nothing an agent needs to call it correctly is missing.

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% and the schema describes the single `config` parameter, so the schema does the heavy lifting (baseline 3). The description adds meaning by naming the config format (DocumentData) and clarifying its origin (as produced by card_builder_build_from_recipe or returned by card_builder_get_card), which helps the agent supply a correct value.

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 description states a specific verb (validate) and resource (Card Builder config / DocumentData) and enumerates the exact structural checks performed. It distinguishes itself from card_builder_check_schema_sync by explicitly noting it does not check against the live upstream 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?

Explicitly names the 'when to use' condition: sanity-checking a config before card_builder_create_card/card_builder_update_card. It also names the alternative (card_builder_check_schema_sync) for upstream schema checks, giving the agent a clear routing decision.

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