Skip to main content
Glama

design_section

Design page sections one at a time, ensuring visual consistency with previous sections to build full pages within token limits.

Instructions

Design a single page section that matches previous sections.

Use this tool to build large pages section-by-section, where each section maintains visual consistency with previous ones. This solves the token limit problem by designing one section at a time.

Content language is configurable (default: Turkish).

Chain Workflow:

  1. Design first section (e.g., hero) - no previous_html needed

  2. Design second section with previous_html from step 1

  3. Continue chain, each section matches the previous style

  4. Combine all sections into a complete page

Args: section_type: Type of section to design. Options: - hero: Hero/banner section with headline and CTA - features: Feature showcase grid or list - pricing: Pricing tiers/cards - testimonials: Customer testimonials/reviews - cta: Call-to-action section - footer: Page footer with links - stats: Statistics/metrics display - faq: FAQ accordion section - team: Team members grid - contact: Contact form section - gallery: Image/portfolio gallery - newsletter: Newsletter signup section context: Usage context explaining where/how the section will be used. Example: "Hero section for a Turkish SaaS landing page" previous_html: HTML from previous section for style matching. When provided, Gemini will analyze and match: - Color palette (primary, secondary, background) - Typography (fonts, weights, sizes) - Spacing patterns (padding, margins) - Border radius - Shadow styles - Animation patterns design_tokens: JSON string with explicit design tokens to use. If not provided but previous_html is given, tokens will be extracted automatically. Format: '{"colors": {...}, "typography": {...}, "spacing": {...}}' content_structure: JSON string with section content. Example: '{"headline": "Başlık", "subheadline": "Alt başlık", "cta": "Başla"}' theme: Visual style preset (modern-minimal, brutalist, etc.) vibe: Optional design spirit / persona. Options: - elite_corporate: Precise, luxury corporate - playful_funny: High energy, bouncy, witty - cyberpunk_edge: High contrast, neon, industrial - luxury_editorial: Elegant, spacious, serif-heavy project_context: Project-specific context for design consistency. content_language: Language code for content generation (default: "tr"). Supported: "tr" (Turkish), "en" (English), "de" (German).

Returns: Dict containing: - section_type: Type of section designed - html: Self-contained HTML with TailwindCSS classes - design_tokens: Extracted design tokens for next section in chain - tailwind_classes_used: List of Tailwind classes used - accessibility_features: A11y features implemented - responsive_breakpoints: Breakpoints used - dark_mode_support: Whether dark mode is supported - design_notes: Gemini's design decisions explanation - model_used: Always gemini-3-pro-preview

Example Chain: # 1. Start with hero hero = design_section( section_type="hero", context="Landing page for B2B SaaS" )

# 2. Features section matching hero style
features = design_section(
    section_type="features",
    previous_html=hero["html"],
    design_tokens=json.dumps(hero["design_tokens"])
)

# 3. Pricing section continuing the chain
pricing = design_section(
    section_type="pricing",
    previous_html=features["html"],
    design_tokens=json.dumps(features["design_tokens"])
)

# 4. Combine all sections
full_page = hero["html"] + features["html"] + pricing["html"]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vibeNo
themeNomodern-minimal
contextNo
auto_fixNo
section_typeYes
use_trifectaNo
design_tokensNo{}
previous_htmlNo
project_contextNo
content_languageNotr
content_structureNo{}
inject_js_fallbacksNo
Behavior5/5

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

With no annotations, the description fully discloses behavior: generates HTML with TailwindCSS, outputs design tokens for chaining, uses Gemini model, matches style from previous_html, configurable language, and lists return fields. It covers what the tool does and how it works.

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 description is well-structured with clear sections: purpose, usage, chain workflow, args, returns, example. It front-loads the purpose. While slightly long, every part adds value; minor redundancy in the chain example could be trimmed.

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?

Given 12 params, no output schema, and no annotations, the description is thorough. It explains the chain workflow, provides a full example, lists return fields, and covers most parameters. Missing explanation for three boolean params prevents a perfect score.

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?

Schema coverage is 0%, but the description provides extensive details for most parameters: section_type options with descriptions, context example, previous_html usage, design_tokens format, content_structure example, vibe options, content_language codes. Three boolean params (auto_fix, use_trifecta, inject_js_fallbacks) are not explained, leaving a small gap.

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 clearly states 'Design a single page section that matches previous sections' and explains the chain workflow for building pages section-by-section. This differentiates it from siblings like 'design_page' (whole page) or 'design_from_reference'.

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?

Explicitly says 'Use this tool to build large pages section-by-section' and provides a detailed step-by-step chaining workflow with an example. It implies not to use for entire page design, and the chain example shows how to combine sections.

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/archolet/claude-gemini-bridge'

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