Skip to main content
Glama

Put an artifact block into a post

create_block

On one site of the account, named in site. Puts a live, custom-coded block into a post. The block is one self-contained HTML document (inline CSS and JavaScript, no build step, no external requests except a script from cdnjs.cloudflare.com or cdn.jsdelivr.net) with a height in pixels. It renders inside a sandboxed iframe with an opaque origin: no cookies, no access to the page, nothing shared with the site — so bake the data into the document, or fetch it from a public source with CORS. Match the site's look with the fonts and accent from the pixelglass://site resource, and read pixelglass://blocks/contract first for the rules and a complete example. The block goes after the given top-level paragraph, or at the end; the write is a revision the writer can undo. Answers with the block's id and the post's preview and editor links — give both links back.

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>",
      "html": "<html>"
    },
    "name": "create_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesThe whole document: <!doctype html> through </html>, self-contained
siteYesThe site to work on, as list_sites names it
heightNoThe frame's height in pixels (80–4000); 480 when unsure
post_idYesThe post's id from list_posts
after_paragraphNoPut the block after this top-level paragraph, counting from 1; leave out to put it at the end

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the safe-mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true); the description goes well past that by explaining the sandboxed iframe with an opaque origin, no cookies, no page access, and the exact external-request allowlist (cdnjs.cloudflare.com, cdn.jsdelivr.net). It also discloses that the write is an undoable revision and that placement defaults to the end when after_paragraph is omitted — behavior an agent could not derive from the annotations.

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 scope, then constraints, then return contract — a sensible order with no filler sentences. It runs long and dense in the middle (origin/sandbox/CDN caveats packed into one clause) but each sentence carries an actionable constraint rather than restating the name or schema.

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?

There is no output schema, so the description supplies the return contract itself — the block id plus preview and editor links, with an instruction to pass both back. Combined with the sandbox and CSP constraints and the pointer to the contract resource, an agent has enough to author and place a valid block on the first attempt.

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 100%, so the baseline is 3, but the description adds real meaning beyond the field docs: the html must be one self-contained document with inline CSS/JS and no build step, and data must be baked in or CORS-fetchable because the iframe shares nothing with the site. Position semantics for after_paragraph (after a given top-level paragraph, or at the end) are also restated in context rather than as a bare range.

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?

"Puts a live, custom-coded block into a post" gives a concrete verb plus resource, and the description immediately narrows scope to "one site of the account, named in site." This cleanly separates it from create_post, update_block, and delete_block without requiring the schema to be opened.

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?

It gives clear operating context: read pixelglass://blocks/contract first, pull fonts/accent from pixelglass://site, and hand back both returned links. What's missing is explicit routing against the closest sibling — nothing says when to reach for update_block versus create_block versus delete_block, leaving the create/update boundary to inference from the names.

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