Workflow
Access and behavior
Requires a current workspace role of Admin or higher. The connection needsschema:manage scope.
- This tool reads data without changing it.
- Read the current table schema before supplying
expectedSchemaVersion.
Arguments
| Argument | Required | Type | Details |
|---|---|---|---|
orgId | Yes | string | Workspace ID returned by rootset_get_context. |
databaseId | Yes | string | ID of the database to work with. |
tableId | Yes | string | ID of the table to work with. |
expectedSchemaVersion | Yes | integer | Current version returned by the table schema. |
change | Yes | JSON value | — |
Complete input schema
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"orgId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"databaseId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"tableId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"expectedSchemaVersion": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647
},
"change": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "add_field"
},
"field": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"description": "Any finite JSON value. Cell size/depth and typed numeric policies are enforced by the domain validator.",
"anyOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object",
"additionalProperties": {}
}
]
}
}
},
"required": ["kind", "field"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "update_field"
},
"fieldId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"changes": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"description": "Any finite JSON value. Cell size/depth and typed numeric policies are enforced by the domain validator.",
"anyOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object",
"additionalProperties": {}
}
]
}
},
"conversion": {
"type": "string",
"enum": ["explicit", "lossless"]
}
},
"required": ["kind", "fieldId", "changes"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "delete_field"
},
"fieldId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"removeDependencies": {
"type": "boolean"
}
},
"required": ["kind", "fieldId", "removeDependencies"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "reorder_fields"
},
"fieldIds": {
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
}
}
},
"required": ["kind", "fieldIds"],
"additionalProperties": false
}
]
}
},
"required": [
"orgId",
"databaseId",
"tableId",
"expectedSchemaVersion",
"change"
],
"additionalProperties": false
}
Example call
Your client initializes the MCP connection before this call. Example identifiers and values are illustrative; use the IDs, schema version and values from your installation.{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rootset_preview_schema_change",
"arguments": {
"orgId": "01K6J7B8000000000000000000",
"databaseId": "01K6J7B8000000000000000000",
"tableId": "01K6J7B8000000000000000000",
"expectedSchemaVersion": 1,
"change": {
"kind": "add_field",
"field": {}
}
}
}
}
Result
Read the structured result returned by the tool. A tool failure setsisError; do not treat an error as a completed operation. The REST operation documents the corresponding result fields and errors.
Connect an MCP client · REST conventions