Skip to main content
Glama

Make an app block's tables

make_block_tables
Destructive

Makes the tables an app block needs in the site's connected Supabase project, the same way as Make it for me on the block's card in Xodia: the block's ready-made tables with their exact fields and "who can see and change" rule (services and events: everyone sees, only the owner changes; bookings: each person sees their own, people with the role owner see all, and a database rule that refuses a booking past the service's seats; profiles: signed-in people see everyone's, each changes their own, one per person; comments: signed-in people read and each changes their own, or with rules a public thread everyone reads; likes: everyone sees, signed-in people add their own, one per person and entry; progress for the checklist: each person sees only their own ticks, one per item), plus a migration file in supabase/migrations/ on the branch. A table that is already there with the fields is used as it is. Answers bind: pass it to add_block. For block "upload" (and "editProfile" with storage true) it sets up the database's file storage, once per database: files is private (only the person who sent a file and people with the role owner open it, up to 10 MB) and pictures is public (anyone with a picture's address sees it, pictures only, up to 5 MB); each signed-in person adds, changes and removes only their own files. It never makes a bucket public, and makes a public files bucket private. Changes the user's live database at once, outside Xodia's Versions: say which tables you are making (or the storage) and who can see them before you call it; dryRun says what it would do first and changes nothing (on the Xodia database it also says when the database isn't on yet, when the real call answers data_not_on). Refused with block_table_mismatch (details.tables, field by field; nothing made) when a table with that name lacks the fields, with block_no_tables for a block that works on a table you pick (board) or uses none, with backend_storage_refused when Supabase doesn't allow the storage change, and with backend_storage_conflict when a pictures bucket there is private. With source "xodia" (or when get_project database.source is "xodia") it works on the site's own Xodia database, whose tables and rules are the file xodia/data-rules.json in the repo: the same tables go into that file with the indexes the blocks list along, and a table already there under the name is merged (it gets the fields and indexes it lacks) instead of refused. No file uploads there yet. It refuses a booking past a service's seats (the booking widget shows the seats left), but not yet a second entry per person: the answer says so. No tool deletes or renames a table or field, deletes entries, or runs SQL: the owner does that in Xodia's Database view (Content, Database).

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>",
      "projectId": "<projectId>"
    },
    "name": "make_block_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
blockYesThe app block whose tables to make: "bookingWidget" (services and bookings), "myBookings" (services and bookings), "calendar" (events), "profile" (profiles), "editProfile" (profiles), "comments" (comments), "likes" (likes), "checklist" (progress). Other blocks work on a table you pick (bind in add_block) and make none
namesNoOptional other names for the tables, by recipe ({ "bookings": "class_bookings" }), when a table with the usual name is there but doesn't fit. Default: the recipe's own name (services, bookings, events, profiles, comments, likes, progress)
rulesNoOptional: who can see a new table's entries, for recipes with a choice. comments: "signed_in_reads_own_writes" (default, signed-in people see everyone's, each changes only their own) or "everyone_reads_signed_in_adds" (public thread: Anyone can read the comments. People who are signed in add one and change their own.). Ask the owner when it isn't clear; a client portal or a course keeps the default. Only for tables it makes; a table that is there keeps its rule
branchNoOptional branch for the migration file; default the branch the workspace has open
dryRunNotrue: only say which tables are there, which would be made and which don't fit, with the bind; nothing changes. Default false
sourceNoWhich database: "xodia" (the site's own Xodia database, kept by Xodia) or "supabase" (the Supabase project the owner connected). Leave out to use the one get_project database.source names
storageNoeditProfile only: true also sets up file storage so people upload their profile picture. The upload block always sets it up. Default false
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / rules / additionalProperties / enum
      Previous value: -[
      -  "everyone_reads_signed_in_adds",
      -  "everyone_reads_owner_writes",
      -  "own_rows_only",
      -  "own_rows_read_owner_writes",
      -  "signed_in_reads_own_writes",
      -  "signed_in_only",
      -  "owner_only"
      -]New value: +[
      +  "everyone_reads_signed_in_adds",
      +  "everyone_reads_owner_writes",
      +  "own_rows_only",
      +  "own_rows_read_owner_writes",
      +  "signed_in_reads_own_writes",
      +  "signed_in_only",
      +  "owner_only",
      +  "visitors_add_owner_reads"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Which database: \"xodia\" (the site's own Xodia database, kept by Xodia) or \"supabase\" (the Supabase project the owner connected). Leave out to use the one get_project database.source names",
      +  "enum": [
      +    "xodia",
      +    "supabase"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, and the description goes further: it says changes hit the live database immediately outside Versions, that existing fitting tables are reused, that xodia mode merges rather than refuses, that no file uploads work there yet, and it enumerates the exact error codes (block_table_mismatch, block_no_tables, backend_storage_refused, backend_storage_conflict). It stops short of describing response shape or how long the operation takes, keeping it below a 5.

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

Conciseness3/5

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

Front-loaded with what it does, but the body is one dense mega-sentence packing six per-recipe visibility rules, storage sizes, error codes and mode differences into parentheticals. Much of it earns its place for such a destructive tool, yet a bulleted or clause-separated structure would be far easier for an agent to parse.

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 8-parameter, nested-object, no-output-schema mutation tool, the definition covers prerequisites, side effects, preview mode, both database targets, refusal cases, and what is deliberately not supported (deletes, renames, second-entry enforcement). Nothing an agent needs before calling is missing.

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 still adds cross-parameter meaning the schema cannot — that source "xodia" is implied by get_project database.source, that dryRun on the Xodia database also reports when the database isn't on, and that storage is implied for the upload block. Some of the rules/naming text duplicates the schema descriptions, which caps this at 4.

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?

States a specific verb and resource ("Makes the tables an app block needs") and scopes it to the block's ready-made tables plus a migration file, which clearly separates it from create_table/add_field siblings. An agent can tell what it produces without opening the schema.

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?

Explicitly routes the workflow: call it, take the returned bind and pass it to add_block; use dryRun first to preview; names which blocks make tables (bookingWidget, calendar, profile, comments, likes, checklist, etc.) and which make none (board, or blocks that work on a picked table). It also states the alternative for deletions (Xodia's Database view) rather than implying this tool does them.

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