Skip to main content
Glama

Create an HTML block

create_block

Create an HTML block for Zuar Portal by providing name, CSS, JSON data, UI queries, tags, and access. Validates structure and references, with dry-run support to preview before writing.

Instructions

Create a new HTML block. Accepts the full block payload (name, css, json_data, ui_queries, tags, access). Type is always html. Read the zportal://guide/* resources first to produce a correct two-field block. Equivalent to create_resource resource="block" with a typed schema; the authoring rules, structural and referential gates run either way. dry_run:true previews.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoBlock CSS. Array form per the portal API; a raw CSS string is also accepted.
dataNoLegacy query-config object. Ignored by current portal versions — bind data via `ui_queries` instead. Kept only for backward compatibility.
nameYesDisplay name of the block.
tagsNoTag names to attach.
typeNoBlock type. This server only handles HTML blocks, so it must be "html".html
accessNoAccess control, e.g. { "groups": ["group-name"] }.
dry_runNoRun every gate and report the would-be write without creating.
css_fileNoPath to a file holding the block's CSS; the server reads it into `css`. Same byte-exact guarantee and same root containment as html_file. Mutually exclusive with `css`.
html_fileNoPath to a file holding the block's HTML+JS; the server reads it into json_data.html. PREFER THIS over inlining large content: the bytes are read off disk byte-exact, so nothing is retyped and characters like em dashes or box-drawing cannot silently normalize. Mutually exclusive with json_data.html. Must resolve under the CWD, the VC dir, or a PORTAL_FILE_ROOTS entry.
json_dataNoWidget/extra config object.
ui_queriesNoQuery/datasource binding (this is how a block gets data — the portal has no `data` field). Array of { enabled, page_size, query_id, filter_strategy }, e.g. [{ "enabled": true, "page_size": 50, "query_id": "<query-uuid>", "filter_strategy": { "type": "blacklist", "value": [] } }]. The query_id must reference a saved query that already has a datasource attached. On update_block, the existing ui_queries is preserved automatically unless you pass a new value.
Behavior4/5

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

Annotations indicate readOnlyHint=false, openWorldHint=true, idempotentHint=false, and destructiveHint=false, so the create operation is clearly not read-only. The description adds important behavioral nuance: it warns that the legacy 'data' field is ignored by current portal versions, explains that ui_queries is how data binding works and that update_block preserves existing ui_queries, and clarifies that dry_run only reports without creating. It doesn't cover all failure modes or side effects, but given the annotations already flag non-read-only and non-idempotent, the added context is strong and not contradictory.

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?

The main description is dense and front-loaded with the action, type constraint, and guide reference. However, it is long and packs multiple instructions (equivalence to create_resource, structural gates, dry_run) into a paragraph, and parameter-level guidance is spread across the schema. The information is valuable, but the main description could be more scannable. Still, every sentence earns its place.

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?

For an 11-parameter tool with 100% schema coverage, no output schema, and nested objects, the description covers prerequisites (reading guides), equivalent alternatives, parameter semantics with examples, and caveats about deprecated fields. The agent has enough to call it correctly without external guesswork. The inclusion of update_block behavior adds forward-looking completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 substantial meaning beyond field names: it explains the legacy nature of 'data' (ignored, kept for backward compat), provides a practical example for ui_queries with a full JSON object, explains the mutual exclusivity and byte-exact reading of css_file and html_file, and notes root containment. This goes well beyond the schema's terse descriptions.

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?

The description states a clear verb and resource ('Create a new HTML block'), explicitly notes the type is always html, and distinguishes it from the generic create_resource while also mentioning the typed alias. It names the related sibling update_block for updates, helping an agent differentiate create from modify behavior.

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?

The description explicitly directs the agent to read zportal://guide/* resources first for correct authoring, mentions dry_run for previews, and clarifies that this is equivalent to create_resource with a typed schema, and that structural and referential gates run either way. It also recommends preferring html_file for large content and notes ui_queries is the proper binding mechanism, providing clear selection and usage guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zuarbase/Zuar-Portal-MCP-Public'

If you have feedback or need assistance with the MCP directory API, please join our Discord server