xtiles_alter_table
Change the COLUMNS of one xTiles table — a canvas table or a collection: add a column, rename one, change its type, delete it, or add options to a select column. A collection’s column is a property of every item in it: a column added is a new property of each of them. Rows are written with xtiles_write_table_rows, not here. Address the table by the url of its <table …> tag and each column by its id. The url of a <collection url row_id> tag in an item’s <properties> is that collection’s address too. Read the table with xtiles_read_table_rows first: it gives the column ids, types and options this tool works against. Up to 50 operations, applied in order; this is NOT a transaction, and the answer reports every operation separately — applied, unchanged (already so; do not retry), invalid or not_found (refused, with the reason; the rest still run), failed (and every later one skipped, never sent). Declarable types: TEXT, NUMBER, DATE, CHECKBOX, SELECT, MULTISELECT, URL, and on a collection RELATION (with relation_url). Any other type is refused with the list of allowed ones; on a collection, PRIORITY, DUE_DATE and ASSIGNEE are task properties, and their refusal says what to add instead. A canvas table cannot change a column’s type: add a column of the new type, copy the values with xtiles_write_table_rows, delete the old one. On a collection, a type change that would clear or change existing values is refused with the counts unless confirm_data_loss: true; delete_column always needs it. DATA LOSS NEEDS THE USER’S CONSENT: when an operation is refused for it, tell the user what would be lost and ask. Only once they agree, resend THAT refused operation alone, with confirm_data_loss: true on it — not the whole batch, whose other operations have already run. A collection’s title column and its system columns cannot be retyped or deleted. A column is not the place for a record's notes or description — those belong in its nested tile. A type that cannot be added here — a person, a file, an image: add the nearest, and tell the person in one sentence that its type can be changed in the app. A column whose values are people — who is responsible, an owner, an author — is such a column, even when the person only gave names. A relation column is one-way: the other collection shows nothing of it — tell the person, and that the other side is switched on in the app. What this tool is addressed by comes from a reading made with format: "tags" (xtiles_get_view_content, xtiles_get_content_by_link, xtiles_get_project_content, xtiles_get_planner_content); the default reading is plain markdown and shows none of it.
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": {
"url": "<url>",
"operations": "<operations>"
},
"name": "xtiles_alter_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The `url` attribute of the `<table …>` tag that was rendered when the page was read. Pass it back unchanged — it addresses a canvas table and a collection alike, and it is not assembled from ids. The `url` of a `<collection url row_id>` tag in an item’s `<properties>` is that collection’s address too. A page's id — from a project's structure or anywhere else — is not this url: read the page first. | |
| operations | Yes | Up to 50 structure changes, applied in order. Not a transaction — see the tool description. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | No | ||
| summary | No |