Skip to main content
Glama

Fabrement

Submit version

fabrement-submit-version

Submit a new version of a block: the backend builds block.json from the shorthand attributes, validates (PHP syntax, security, policy, esbuild) and on success writes the files to the site — then VERIFY with preview {target:"block", id: blockId}. On failure nothing is saved; fix what violations[] names and resubmit. A NEW block needs every field. An existing block takes only what changes: omitted fields keep the current version, and a file can be changed with edits (fragment replacements) instead of re-sent — pass expectedHash from get-block-source. summary is always required, and so is mode: "add" (a NEW version, the current one stays in history) or "replace" (replaces the current version in place, nothing left to roll back to). Rules: get-skill-doc {id:"block-contract"} for a content block; a header follows {id:"header-contract"}, a footer {id:"footer-contract"} — read the one for the block's type before the first call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesRequired — there is no default. add: this becomes a NEW version and the current one stays in history, so it can be rolled back to. replace: the current version is replaced in place (iterative fixes) and there is nothing to roll back to.
tagsNoREQUIRED for a new block: 2-6 lowercase tokens, the SECTION KIND first (get-skill-doc {id:"description-tags"} lists them; a wrong one is refused and the refusal names them all), then mechanics and composition. Check list-blocks `availableTags` and reuse the words already in use.
editsNoFragment replacements per source file of the CURRENT version (as get-block-source returns it, {{nameKebab}} tokens included), instead of re-sending the file. A file is sent whole OR edited, not both.
removeNoParts to DELETE from the block: viewJs, controlsJs, backgroundColor, skills. The only way to delete — an empty value ("" / [] / {}) is treated as not sent.
skillsNoTechnique skill ids you applied (must match the docs you followed). Omit to keep.
viewJsNoview.js source, whole (window.Fabrement.registerBlockView). Omit to keep; remove:["viewJs"] deletes it.
blockIdYesWordPress block id from create-block / list-blocks.
summaryYesREQUIRED changelog line: what changed / was built THIS submit (e.g. "bigger CTA, tighter hero spacing").
styleCssNostyle.css source, whole — `.e-*` selectors written flat (the backend scopes them to the block); only root-state heads carry .block-{{nameKebab}}. Omit to keep.
renderPhpNorender.php source, whole. Omit to keep, or change it with edits.renderPhp.
attributesNoSHORTHAND attributes map — every field needs "control" (get-skill-doc {id:"attributes"}). The WHOLE map when sent; omit to keep.
controlsJsNocontrols.js source, whole (export function Controls, BlockModal). Omit to keep.
descriptionNoREQUIRED for a new block: what it is and where it is used, how it looks and what is in it, any behaviour, and what it depends on. At least 25 words, at most 400 characters. get-skill-doc {id:"description-tags"} has the shape and an example. Omit on an edit to keep the stored one.
expectedHashNo`hash` from get-block-source. If the block got a newer version since, nothing is submitted.
backgroundColorNoWhole-section fill: hex or full CSS gradient string (headers: never). Omit to keep; remove it with remove:["backgroundColor"].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
noticeNoPresent only when the block changed and its description did not — something to check, not a failure. The version is saved either way.
buildOkNo
warningsNoThings to fix that did not stop the save: a site option read with a name that is not a literal string (block.json cannot list it).
versionIdNo
overwrittenNotrue when this replaced the current version in place.
siteOptionsNoThe site options this version reads, "<options page>.<field>", found in render.php and written into block.json. Absent when it reads none.
filesWrittenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses validation steps (PHP syntax, security, policy, esbuild), atomic failure ('nothing is saved'), success writes, the add vs replace rollback distinction, expectedHash conflict behavior, and the required preview verification.

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?

The purpose is front-loaded in the first sentence, followed by behavioral and usage details in compact, information-dense sentences. Despite the tool's complexity, every sentence adds useful context and none is filler.

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?

Given 15 parameters, nested objects, no annotations, and an output schema, the description is complete enough. It covers purpose, failure handling, verification, contract-reading prerequisites, and mode/edit semantics, while the output schema handles return-value explanation.

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. The description adds consolidated meaning beyond the per-parameter schema, including the global rule that a new block needs every field while an existing block only needs changed fields, that omitted fields keep current values, and how edits plus expectedHash work together.

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 states a specific verb ('Submit') and resource ('a new version of a block') and clearly differentiates the new-block case from the existing-block case. However, it does not explicitly distinguish this tool from sibling alternatives such as create-block or import-block, which keeps it from a 5.

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 context: read the block-type contract before the first call, verify with preview, and fix violations[] on failure before resubmitting. It does not name alternative tools for initial creation versus versioning, so the when-not/alternative dimension is only partially covered.

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