Skip to main content
Glama

Compose a block

compose_block
Read-only

Designs one block as a finished TSX file in the direction's world: nav, hero, features, stats, cta, loading, footer, pricing, faq, testimonials, logos, gallery, timeline, contact, feature-icons, split, banner. Pass variant to choose its layout, component to build around a particular piece. Returns the file, the site layer CSS it relies on and the components to install with fit_component.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>"
    },
    "name": "compose_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
copyNoOverride the brief's headline, subline or call to action here.
kindYes
briefNoUsed when there is no direction_id yet: brand, app (required), audience, mood, colors, theme, headline, subline, cta, avoid, and optionally world.
titleNoThe section title.
targetNonext: Next.js app router files (default). vite: Vite React files.
contentNoThe site's real content, in the user's words. Blocks that need facts (numbers, quotes, prices, names) are only planned when they are given here; nothing is invented.
variantNoLayout variant. nav: bar, float, masthead; hero: backdrop, split, poster, frame, masthead, kinetic, page; features: rows, columns, bento, sticky; stats: band, inline, boxed; cta: panel, type, quiet; loading: center, bar; footer: columns, wordmark, line; pricing: cards, table, menu; faq: accordion, split, grid; testimonials: single, columns, wall; logos: row, grid; gallery: mosaic, strip, grid; timeline: vertical, steps; contact: split, card, details; feature-icons: grid, list; split: media, wide, quote; banner: strip, notice.
componentNoOptional slug to build the block around.
direction_idNoThe direction_id from set_direction (or create_direction).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations (readOnlyHint=true, openWorldHint=false) already establish this as a side-effect-free, closed-domain generation step. The description adds the useful disclosure that output comprises the TSX file, the site-layer CSS it depends on, and installable components. It does not disclose non-obvious behavior like the no-invention rule for facts (that lives only in the content schema) or determinism/regeneration semantics.

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 purpose, then parameter guidance, then return shape — a sensible order with little filler. The 17-kind enumeration duplicates the schema's kind enum verbatim, which is wasted length, though it does let an agent see scope without opening the schema.

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?

For a 9-parameter tool with nested objects and no output schema, the description does explain the return payload and the direction/brief prerequisite relationship. Gaps remain around target (next vs vite), direction_id, and the fact that data-bearing blocks are only rendered when real content is supplied, but the core contract is legible.

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 coverage is 89%, so the schema already carries most parameter meaning, including the full variant enumeration and brief fields. The description clarifies only that variant selects layout and component scopes the block around a slug, and it never mentions direction_id or target. At the 89% coverage baseline, a 3 is right.

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?

States a specific verb and resource — 'Designs one block as a finished TSX file in the direction's world' — and enumerates the supported block kinds. The phrase 'one block' implicitly separates it from compose_page and compose_section, but it never names those siblings, so the differentiation is inferred rather than stated.

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?

Gives real sequencing context: direction_id comes from set_direction, brief applies 'when there is no direction_id yet', and the returned components are installed with fit_component. It stops short of explicit when-not-to-use guidance or naming compose_page/compose_section as alternatives for multi-block output.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources