Skip to main content
Glama

Check embedded schema against upstream

card_builder_check_schema_sync
Read-onlyIdempotent

Compares embedded Card Builder block schema with upstream GitHub main to flag schema drift or breaking changes that cause recipes to fail.

Instructions

Compare the embedded block schema against upstream Card Builder's main branch on GitHub.

Fetches custom_components/card_builder/manifest.json and frontend/src/common/blocks/loader.ts from raw.githubusercontent.com/{UPSTREAM_REPO}/main over HTTP and diffs the upstream version/block list against this module's BLOCK_TYPES and UPSTREAM_SCHEMA_SYNC constants. Reaches outside the HA instance and its host.

Use when: a recipe that used to work stops producing the expected card — the upstream integration may have shipped a breaking schema change. Returns: {status: "ok"|"drift"|"fetch_failed", upstream_version, embedded_version, version_matches, missing_block_types, extra_embedded_block_types, advice, embedded_schema, ...}. Errors: {"status": "fetch_failed", "error": <exception text>, "embedded": ...} when the manifest request itself fails (a timeout or network error); a failed loader fetch instead sets loader_fetch_error and still returns status. Limits: two GitHub requests with a 10-second timeout each.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.1

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, openWorld, non-destructive), the description discloses that it reaches outside the HA instance and host, makes two GitHub HTTP requests with a 10-second timeout each, and specifies distinct error behaviors for manifest vs loader fetch failures. This is exactly the extra behavioral context annotations cannot carry.

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?

Well front-loaded: purpose first, then Use when / Returns / Errors / Limits sections. Each block is information-dense and specific, with no filler sentences.

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 no-arg diagnostic tool that touches the network, the definition covers purpose, trigger, return shape, error modes, and rate/timeout limits. Even though an output schema exists (so return values needn't be restated), the added detail is accurate and useful rather than redundant padding.

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?

The tool takes zero parameters, so per the rubric the baseline is 4. There is nothing for the description to clarify beyond the schema, and it correctly focuses its prose elsewhere.

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 opens with a specific verb and resource — 'Compare the embedded block schema against upstream Card Builder's main branch on GitHub' — and names the exact upstream files involved. An agent can distinguish this diagnostic tool from siblings like card_builder_get_block_schema or card_builder_validate_config 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 Guidelines4/5

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

'Use when: a recipe that used to work stops producing the expected card — the upstream integration may have shipped a breaking schema change' gives a concrete triggering scenario. It stops short of naming alternatives or explicit when-not conditions, so it is clear but not a full routing guide.

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