Skip to main content
Glama

Apply a template

apply_template
Destructive

Fill the draft with a starter template (pages, stylesheet and any form collections), personalised with the site title and styled with a design direction from design_guide (palette, Google Fonts pair and character), so sites from the same template look different. niche and direction default to the brief (the design option the owner chose), and the brief's brand colours are applied; without either, the direction recommended for this site is used. Then customise the text, prices, phone number and images. Existing files with the same paths are replaced.

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": {
      "site": "<site>",
      "template": "<template>"
    },
    "name": "apply_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesSite slug (e.g. "kopitiam-muar") or id
nicheNoThe kind of business, e.g. "kedai kek", "klinik gigi". Defaults to the template's own niche.
templateYes
directionNoDesign direction name from design_guide for this niche (e.g. "Street-food bold"), or its number

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / direction
      Added value: +{
      +  "description": "Design direction name from design_guide for this niche (e.g. \"Street-food bold\"), or its number",
      +  "maxLength": 60,
      +  "type": "string"
      +}
    • addedInput schema / properties / niche
      Added value: +{
      +  "description": "The kind of business, e.g. \"kedai kek\", \"klinik gigi\". Defaults to the template's own niche.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations flag destructiveHint=true, and the description corroborates that independently with 'Existing files with the same paths are replaced', which tells the agent exactly what can be lost. It also explains the default-resolution chain for niche/direction and the personalisation applied from the brief, adding behaviour beyond the annotations, though it says nothing about failure modes or the response.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The main action is front-loaded, which is good, but the description is a single dense paragraph in which the default-precedence sentence ('niche and direction default to the brief ... without either, the direction recommended for this site is used') is convoluted and takes parsing. The closing customisation sentence earns its place; the parenthetical '(the design option the owner chose)' is filler.

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 destructive four-parameter mutation with no output schema, the definition covers what is created, what is overwritten, how defaults resolve, and that post-generation editing is expected. Only missing pieces are the state requirements of the target site and any indication of what is returned.

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 75%, and the description does add meaning for the undocumented 'template' enum by explaining that each template supplies pages, a stylesheet and form collections. For 'niche' and 'direction' it mostly restates the schema's defaulting rules, adding only the precedence detail about the brief's design option and brand colours. Useful but partly redundant with the schema text.

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?

The description names a specific verb and resource ('Fill the draft with a starter template') and enumerates what the template contains (pages, stylesheet, form collections). It is clear what the tool produces, though it never explicitly contrasts itself with adjacent tools such as edit_files or create_site.

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?

Usage is only implied: it establishes that the template is a starting point to be followed by editing text, prices, phone and images, which hints at sequencing. There is no explicit statement of when to choose this over alternatives, nor of prerequisites such as the site needing to be a draft already.

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