Skip to main content
Glama

layout.generate_code

Idempotent

Generate React, Vue, Svelte, Astro, or HTML components from section patterns. Configure TypeScript or JavaScript output with Tailwind CSS or vanilla styling and responsive breakpoints.

Instructions

セクションパターンからReact/Vue/Svelte/Astro/HTMLコードを生成します。パターンIDを指定して、選択したフレームワーク(React, Vue, Svelte, Astro, HTML)でコードを出力できます。TypeScript/JavaScript、Tailwind CSS/Vanilla CSSの選択も可能です。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternIdYesセクションパターンID(UUID形式、必須)
optionsNoコード生成オプション
Behavior3/5

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

Adds useful behavioral details beyond annotations: specifies file extensions generated (.svelte, .astro) and explains responsive breakpoint conversion logic (mobile-first class transformation). However, fails to clarify the side effect nature given readOnlyHint=false—specifically whether generated code is returned in the response, saved to disk, or stored elsewhere.

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?

Two efficient sentences with zero waste. Front-loaded with the core action ('generates code'), followed by specific framework options and configuration variants. Every word earns its place.

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

Completeness3/5

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

Adequate for the nested parameter structure, explaining the responsive and framework options. However, given the absence of an output schema and readOnlyHint=false indicating mutation, the description should clarify what happens to generated artifacts (return value vs. persistence) to be complete.

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?

With 100% schema description coverage, the baseline is met. The description summarizes available options (frameworks, TypeScript, Tailwind) but adds no semantic depth beyond the schema's own property descriptions regarding valid values or interdependencies.

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?

Clearly states the tool generates code from section patterns, specifying the exact output formats (React/Vue/Svelte/Astro/HTML) and distinguishes itself from sibling layout tools (ingest, inspect, search) by focusing specifically on code generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Implies usage through capability listing (specify patternId to output code), but lacks explicit when-to-use guidance versus alternatives like layout.inspect or layout.search, and does not mention prerequisites such as having a valid patternId from prior layout operations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TKMD/reftrix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server