Skip to main content
Glama

Set a post's own layout

set_post_layout
Idempotent

On one site of the account, named in site. A layout for this one post, in Liquid: it receives post and the site's names, as a theme's custom-.liquid does, and may render the theme's partials. Print {{ post.content }} in it, itself: that is the post's text, and the paywall for a reader the post is not for. For a look that many posts share, a theme file is better: custom-.liquid with write_theme_file (an admin's). Markup and CSS only: no script, iframe, form, on* attribute or javascript: address; a element applies inside the layout alone, with no url() off this site, no @import and no position: fixed. A save that has any of these is refused with what to change, and the site cleans what it shows in any case. A layout that fails shows the theme's post. Answers the post's facts with its preview link: look at it there. liquid "" removes the layout.

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>",
      "post_id": "<post_id>",
      "liquid": "<liquid>"
    },
    "name": "set_post_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesThe site to work on, as list_sites names it
liquidYesThe layout's Liquid; "" removes it
post_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Discloses validation rules (no script, iframe, form, on* attribute, javascript: address, @import, position: fixed, off-site url()), refusal with remediation, sanitization, fallback to the theme's post on failure, and a preview link return. This adds substantial context beyond annotations that already mark it as a write, idempotent, non-destructive tool.

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?

Information-dense and front-loaded with no filler, but the telegraphic fragments, colons, and run-on clauses make the prose hard to parse. The content earns its place, but structural clarity suffers.

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

Completeness5/5

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

Covers purpose, alternative, validation constraints, failure behavior, removal, and the returned preview link for a 3-parameter mutation tool with no output schema. Nothing essential for correct invocation is missing.

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 67%, with site and liquid documented; the description adds Liquid semantics beyond the schema, including available variables (post, site names), partial rendering, printing {{ post.content }} for paywall behavior, and empty-string removal. post_id is not described but is self-evident from context.

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 that it provides a layout for one post in Liquid and distinguishes this from a theme-wide layout by naming write_theme_file. The opening is a fragment ('On one site...') and never explicitly says 'set', but the resource and scope are clear.

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 directs shared looks to write_theme_file and explains that liquid "" removes the layout. It does not cover permission prerequisites for this tool, but the when-to-use and when-not guidance is strong.

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