Skip to main content
Glama

Get one design pattern

card_builder_get_design_pattern
Read-onlyIdempotent

Retrieve the full details of a specific curated design pattern by name, including rationale and anti-patterns, for use in Home Assistant card building.

Instructions

Get one curated design pattern by name, in full.

Looks up name in the module-level DESIGN_PATTERNS constant; makes no call to Home Assistant.

Use when: reading the full rationale/anti-patterns for one pattern already picked (e.g. via card_builder_design_for_intent). Returns: same fields as one entry from card_builder_list_design_patterns. Errors: {"error": "unknown_pattern", "name": ..., "known": [...]} when name isn't a known pattern.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPattern name, e.g. 'sensor_hero', from card_builder_list_design_patterns.

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 / name / description
      Added value: +"Pattern name, e.g. 'sensor_hero', from card_builder_list_design_patterns."
  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 readOnly/idempotent/non-destructive/openWorld=false, and the description still adds genuine value: it discloses that this is a local constant lookup with no Home Assistant call, and it specifies the exact error payload shape for the unknown-pattern case.

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 clearly segmented into lookup behavior, usage, return, and error sections. Slightly sectioned/long for a one-parameter read tool, but each block contributes information and none is redundant.

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 single-param local read with an output schema present, the definition covers purpose, trigger condition, return parity with the list sibling, and the exact failure mode. An agent has everything needed to call and recover from it.

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% for the single required `name` parameter, so the schema already carries the example ('sensor_hero') and source (card_builder_list_design_patterns). The description's only extra is the error `known` list, which is behavioral rather than semantic, so the baseline 3 applies.

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 ('Get one curated design pattern by name, in full') and explicitly positions it against the list and intent-matching siblings, so an agent can pick it without inspecting schemas.

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?

The 'Use when' clause names the exact scenario (reading full rationale/anti-patterns for a pattern already chosen) and even routes the agent to the discovery sibling card_builder_design_for_intent. Nothing about when-not is left ambiguous because the alternative (list/design_for_intent) is implied as the selection phase.

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