Skip to main content
Glama

Add a field to a database table

add_field
Destructive

Adds one field to a table of the site's connected Supabase project, the same way as Add field in Xodia's Database view (Content, Database): always optional (the table may have entries already), with a migration file in supabase/migrations/ on the branch. Changes the user's live database at once, outside Xodia's Versions. Refused when the table already has that field, for kinds Xodia doesn't add, and for a link to a table with no single ID field. 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: it adds the field to that file and sends it to the test data, like create_table. 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": {
      "table": "<table>",
      "name": "<name>",
      "kind": "<kind>",
      "projectId": "<projectId>"
    },
    "name": "add_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesThe kind of field: "text" (Text), "number" (Number), "yes_no" (Yes or no), "date" (Date), "date_time" (Date and time), "link" (Link to another table)
nameYesThe field's name: letters, numbers, spaces and underscores, starting with a letter (it is stored lower case with underscores: "Guest count" becomes guest_count)
tableYesThe table's name as list_tables gives it (bookings)
branchNoOptional branch for the migration file; default the branch the workspace has open
linkToNoFor kind "link": the table it points at (its single ID field is used)
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
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: it warns that the change hits the user's live database at once and sits outside Xodia's Versions, notes the migration file written to supabase/migrations/ on the branch, and explains the special xodia path that edits xodia/data-rules.json and pushes to test data. The annotations (destructiveHint=true, openWorldHint=true) are consistent with, and enriched by, this text.

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 core action and its live-database consequence are front-loaded, and most sentences carry real information. It is a dense single paragraph with some redundancy, notably the repeated "(Content, Database)" reference and a closing sentence about what no tool does that is only tangentially about adding a field.

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 7-parameter mutation with no output schema, the description covers side effects, persistence, failure modes and branch behavior thoroughly. The remaining gap is the return value and whether the migration is committed or pushed, which the agent must discover by calling.

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, but the description adds genuine meaning: what the "xodia" value of source actually does, that source defaults to get_project's database.source, and that linkTo requires a target with a single ID field. It does not restate the name-normalization or branch-default rules, which the schema already covers.

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?

Opens with a specific verb and resource ("Adds one field to a table") and immediately scopes it to the connected Supabase project. It also distinguishes itself from siblings by likening the operation to Add field in the Database view and by naming create_table as the analogous sibling for the xodia source.

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 lists the refusal conditions (field already exists, unsupported kinds, link to a table without a single ID field) and routes the agent elsewhere for deletions and renames: "the owner does that in Xodia's Database view." It also states how to pick the source, including the default via get_project database.source.

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