Skip to main content
Glama

Add an app block

add_block

Adds an app block from Xodia's data kit to a page, the same way as the App group in Xodia's Add panel: the block's component (booking widget, my bookings, calendar, table view, search and filter, entry page, stats, chart, profile, edit profile, list, form, the sign-in set (one sign-in card: Google first when on, then a Password | Email me a code switch; methods picks the ways, default the site's own), comments, likes, checklist, board or an upload field) written into the file next to or inside the element whose opening tag starts on line, bound to the tables in bind (a table of the user's may have other field names: map them in bind), in the site's own colours and fonts, editable on the canvas. Read the file first and pick the element; for a block that makes its own tables, call make_block_tables first and pass its bind. For seats at an event (a booking widget on items that happen once), pass oneTime. Comments and likes hang on the entry around them (a DataList row, an entry page) or on entry or param. Blocks on any table name the table and map their slots in bind.table: a chart, label (also accepted as groupBy: what it groups by, a choice, text, date or yes/no field) and value (an optional number field it adds up; without it, it counts entries): { "table": { "table": "orders", "fields": { "label": "status", "value": "total" } } }; stats, value (an optional number field: without it, one card counts the entries; with it, also its total and average; each number becomes a you can edit after): { "table": { "table": "bookings", "fields": { "value": "people" } } }; a table view, the columns it shows, each column's word as the key and the table's field as the value (up to 8): { "table": { "table": "members", "fields": { "name": "full_name", "joined": "created_at", "plan": "plan" } } }; a search and filter, title (the field searched first) and the other fields it searches: { "table": { "table": "listings", "fields": { "title": "headline", "area": "neighbourhood" } } }, beside the list or table view it filters (filterBy). A board binds any table with a status field ({ "table": { "table": "projects", "fields": { "status": "stage", "title": "name" } } }) and takes columns. An upload goes only inside a form (DataForm): its line, position "inside", bind { "table": { "table": "<the form's table>", "fields": { "file": "" } } }, after make_block_tables with block "upload" set up the file storage. Only React files (.tsx, .jsx) on a site with the data kit (src/components/data). Saved at once like every edit. Afterwards read the file, wrap the block in the site's own section and container when it stands alone, and run run_check typecheck. When it answers add_unsupported, Xodia can't add blocks on this project yet: write the block yourself in the shape skill app-blocks gives.

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": {
      "block": "<block>",
      "file": "<file>",
      "line": "<line>",
      "position": "<position>",
      "projectId": "<projectId>"
    },
    "name": "add_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
bindNoWhich tables and fields the block uses. From make_block_tables as it answers; for a block on any table, { "table": { "table": "listings", "fields": { "title": "headline" } } } (slot name to the table's field; slots: calendar title, starts, ends; searchFilter title; entryPage title, image, text; stats value; chart label (group by, also accepted as groupBy) and value (a number to add up, else entries are counted), e.g. { "table": { "table": "bookings", "fields": { "label": "status" } } }; board status, title; list title, text, image, date; upload file); on a ready-made table from make_block_tables the slots are filled from its fields when left out; for a ready-made table under another name, { "bookings": { "table": "class_bookings" } }; for a table of the user's whose fields have other names, map each recipe field name to theirs, null for an optional field the table hasn't: { "services": { "table": "events", "fields": { "name": "title", "minutes": null } } }. Left out: the recipe's own names
fileYesThe page or section file to add it to, relative to the project root (src/pages/Book.tsx, src/components/sections/Bookings.tsx)
lineYesThe line where the element to place it next to (or inside) starts its opening tag, as read_file numbers lines
blockYesThe app block to add: "bookingWidget" (Booking widget), "myBookings" (My bookings), "calendar" (Calendar), "tableView" (Table view), "searchFilter" (Search and filter), "entryPage" (Entry page), "stats" (Stats), "chart" (Chart), "profile" (Profile), "editProfile" (Edit my profile), "list" (List and cards), "form" (Add or edit form), "signIn" (Sign-in set), "comments" (Comments), "likes" (Likes), "checklist" (Checklist), "board" (Board), "upload" (File upload)
entryNocomments and likes only: what the thread or like is under, as a page key ("about", "pricing") so each page has its own. Leave entry and param out inside a DataList row (each row's own id) or on an entry page (its route parameter)
paramNocomments and likes only: on an entry page (/lessons/:id), the route parameter that names the entry (id, slug), instead of entry
branchNoOptional branch; default the branch the workspace has open
sampleNotrue: the block works on sample entries until a database is connected (Keep sample entries for now). Default false
columnsNoboard only: its columns left to right, each a status value as the table stores it and its words: [{ "value": "todo", "label": "To do" }]. Default To do, In progress, Done
methodsNosignIn only: the ways the one sign-in card offers, any of google, email_code, password (Google first, then a Password | Email me a code switch). Default: the ways the site's sign-in has on (get_members), else a password and a code by email
oneTimeNobookingWidget only, for items that happen once (events): each item is booked on its own date and time, with no day or time picker. when: the items table's date or date-and-time field (default starts); param and match: on an entry page (/events/:slug), the route parameter and the field it matches ({ "param": "slug", "match": "slug" }) so only that item is offered. The items are bind.services or, without it, the events table. {} for the defaults
positionYesWhere the block goes: "before" or "after" that element, or "inside" it as its last child
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / bind / additionalProperties / properties / kinds
      Added value: +{
      +  "additionalProperties": {
      +    "enum": [
      +      "id",
      +      "text",
      +      "number",
      +      "yes_no",
      +      "date",
      +      "date_time",
      +      "json",
      +      "list",
      +      "option",
      +      "link",
      +      "unsupported"
      +    ],
      +    "type": "string"
      +  },
      +  "propertyNames": {
      +    "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,62}$",
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / bind / description
      Previous value: -"Which tables and fields the block uses. From make_block_tables as it answers; for a block on any table, { \"table\": { \"table\": \"listings\", \"fields\": { \"title\": \"headline\" } } } (slot name to the table's field); for a ready-made table under another name, { \"bookings\": { \"table\": \"class_bookings\" } }; for a table of the user's whose fields have other names, map each recipe field name to theirs, null for an optional field the table hasn't: { \"services\": { \"table\": \"events\", \"fields\": { \"name\": \"title\", \"minutes\": null } } }. Left out: the recipe's own names"New value: +"Which tables and fields the block uses. From make_block_tables as it answers; for a block on any table, { \"table\": { \"table\": \"listings\", \"fields\": { \"title\": \"headline\" } } } (slot name to the table's field; slots: calendar title, starts, ends; searchFilter title; entryPage title, image, text; stats value; chart label (group by, also accepted as groupBy) and value (a number to add up, else entries are counted), e.g. { \"table\": { \"table\": \"bookings\", \"fields\": { \"label\": \"status\" } } }; board status, title; list title, text, image, date; upload file); on a ready-made table from make_block_tables the slots are filled from its fields when left out; for a ready-made table under another name, { \"bookings\": { \"table\": \"class_bookings\" } }; for a table of the user's whose fields have other names, map each recipe field name to theirs, null for an optional field the table hasn't: { \"services\": { \"table\": \"events\", \"fields\": { \"name\": \"title\", \"minutes\": null } } }. Left out: the recipe's own names"
    • addedInput schema / properties / methods
      Added value: +{
      +  "description": "signIn only: the ways the one sign-in card offers, any of google, email_code, password (Google first, then a Password | Email me a code switch). Default: the ways the site's sign-in has on (get_members), else a password and a code by email",
      +  "items": {
      +    "enum": [
      +      "google",
      +      "email_code",
      +      "password"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 3,
      +  "minItems": 1,
      +  "type": "array"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that edits are saved at once, the block is editable on the canvas, only React files on sites with the data kit are supported, and the add_unsupported fallback behavior. These details add real behavioral context without contradicting the annotations that this is a non-read-only, non-destructive mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The main purpose is front-loaded, but the remainder is a single dense run-on paragraph mixing prerequisites, examples, fallback behavior, and block-specific details. It is bloated and hard to scan, with several explanations duplicating what the schema already provides.

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 a complex 13-parameter mutation with no output schema, the description covers the essential prerequisites, constraints, post-call workflow, block-specific binding rules, and failure fallback. An agent has enough information to invoke it correctly without needing to infer critical missing steps.

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 description coverage is already 100%, so the baseline is 3. The description still adds meaningful semantics beyond the schema by giving concrete bind shapes per block type, explaining slot mapping and defaults, oneTime matching behavior, methods defaults, and column formatting, though much of this is also present in the schema 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 specific verb and resource: "Adds an app block from Xodia's data kit to a page." It then enumerates the block types and explains that it behaves like the App group in Xodia's Add panel, making the purpose unmistakable and distinguishable from siblings such as make_block_tables.

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?

Usage guidance is explicit and actionable: read the file first and pick the element, call make_block_tables first when a block creates its own tables, pass oneTime for booking widgets on one-time events, use upload only inside a DataForm, and run run_check typecheck afterward. It also states the file-type/location constraint and what to do when add_unsupported is returned.

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