Skip to main content
Glama

Compile brand tokens

brand_compile
Idempotent

Compile extracted brand data into DTCG design tokens, brand-runtime contracts, and enforceable interaction policies for AI agents.

Instructions

Generate DTCG design tokens, design-synthesis.json, DESIGN.md, brand runtime, and interaction policy from extracted brand data. Transforms core-identity.yaml into tokens.json, brand-runtime.json (single-document brand contract for AI agents), and interaction-policy.json (enforceable rules). When Session 2+ data exists, also generates visual-identity-manifest.md and system-integration.md. Use after brand_extract_web, brand_extract_site, brand_extract_visual, or brand_extract_figma. Returns token counts, clarification items, and file list.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
_metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.17.0
  2. Removedv0.14.1
  3. Addedv0.13.4
  4. Removedv0.12.0
  5. Changed1 schema field changedv0.11.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "_metadata": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "next_steps": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "what_happened": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "what_happened",
      +        "next_steps"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "_metadata"
      +  ],
      +  "type": "object"
      +}
  6. First observedv0.5.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the safety profile is covered; the description adds which files are written, the conditional Session 2+ branch producing visual-identity-manifest.md and system-integration.md, and what is returned. It stops short of saying whether existing outputs are overwritten or what failures look like.

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?

The main action and its artifacts are front-loaded, and the prerequisite/return information follows in a logical order. The enumeration of five-plus filenames is dense but each item conveys real information about outputs, so it largely earns its space.

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

Completeness4/5

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

With an output schema present, the description needn't explain return values, yet it still summarizes them (token counts, clarification items, file list). Prerequisites, input file, conditional outputs, and the 'brand contract for AI agents' framing are all covered; only overwrite/failure behavior is left implicit.

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 there is nothing for the description to disambiguate and the baseline of 4 applies. The description instead usefully characterizes the implicit input source (core-identity.yaml) and the Session 2+ data condition.

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 (generate/compile) plus the exact artifacts produced (tokens.json, brand-runtime.json, interaction-policy.json, DESIGN.md) and the source it transforms (core-identity.yaml). This clearly separates it from siblings like brand_runtime, brand_export, or the brand_extract_* family.

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?

It explicitly names the prerequisite extract tools (brand_extract_web, brand_extract_site, brand_extract_visual, brand_extract_figma) and the 'Use after' ordering, which is strong context. It does not state when-not to use it or how it relates to downstream siblings such as brand_export or brand_report.

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