Skip to main content
Glama

swebsy_insert_block

Insert a pre-built block from the catalog, optionally customizing its content and position, so it re-themes to the current site and you avoid building from scratch.

Instructions

Insert a pre-built block from the catalog and optionally customize its content. STRONGLY preferred over generating from scratch when a matching block exists. The block re-themes on insert — its colour and font classes resolve against THIS site's theme, so the result is meant to differ from the catalog thumbnail (a screenshot of the block in the template it came from).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockIdYesThe block ID from the catalog (e.g., 'clarity-content-with-image').
positionNoWhere to insert. Defaults to 'end' if omitted. 'before-selected'/'after-selected' are measured against `targetPath` when you pass one, otherwise against the canvas selection — so pass `targetPath` with them unless the user has selected something.
targetPathNoZero-based component indexes from the current page root, exactly as returned by the most recent `read_page` call. The block lands as a sibling immediately before or after this component, per `position`. Ignored when `position` is 'start' or 'end'.
adaptationsNoStructured customizations applied to the block before insertion.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals the important re-theming behavior, warning that colors and fonts resolve against the current site's theme, so output will differ from the thumbnail. It does not explicitly state that insertion is non-destructive to existing content, but the 'insert' verb implies addition rather than modification.

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 concise sentences that front-load the core purpose and then add critical usage and behavioral context. No filler; every clause contributes value, including the caution about re-theming.

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 tool with four parameters and a nested adaptations object, the description covers the essential context: what it does, when to use it, and a key behavioral surprise. It omits explicit prerequisites like having an open site or calling read_page for targetPath, but those are inferable from the schema and sibling tools. Overall, the description is sufficient for an agent to call it correctly.

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?

The schema already covers 100% of parameter descriptions, so the baseline is 3. The description mentions optional customization but adds no additional parameter semantics beyond what the schema provides for blockId, position, targetPath, or adaptations.

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 clearly states the action: inserting a pre-built block from the catalog, with optional customization. It identifies the resource (catalog blocks) and the verb (insert), making the tool's purpose unambiguous. It does not explicitly differentiate from sibling tools like swebsy_add_section, but the catalog-block focus is distinct enough.

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?

The description explicitly says it is strongly preferred over generating from scratch when a matching block exists, giving a concrete condition for use. It implies using list_blocks to find a block and then inserting it, though it does not name alternatives like add_section. This provides clear when-to-use guidance, though it could be more explicit about when not to use it.

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