Workflow
Access and behavior
Requires a current workspace role of Member or higher. The connection needsrows:write scope.
- This tool changes data or starts work. Confirm the target and input before calling it.
- Keep the same
idempotencyKeywhen retrying an unchanged request; use a new key for different input. - Read the current table schema before supplying
expectedSchemaVersion. - A returned job is pending work. Use rootset_get_job to check its final result.
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. |
mutations | Yes | array of JSON value | — |
repair | No | object | — |
idempotencyKey | Yes | string | Stable caller-provided key across retries of this exact operation. |
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
},
"mutations": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z_]+$"
},
"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": ["type", "values"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"rowId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"expectedVersion": {
"type": "string",
"pattern": "^[1-9][0-9]{0,18}$"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z_]+$"
},
"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": {}
}
]
}
},
"type": {
"type": "string",
"const": "update"
}
},
"required": ["rowId", "expectedVersion", "values", "type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "delete"
},
"rowId": {
"type": "string",
"pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
},
"expectedVersion": {
"type": "string",
"pattern": "^[1-9][0-9]{0,18}$"
}
},
"required": ["type", "rowId", "expectedVersion"],
"additionalProperties": false
}
]
}
},
"repair": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": ["reason"],
"additionalProperties": false
},
"idempotencyKey": {
"type": "string",
"minLength": 8,
"maxLength": 255,
"description": "Stable caller-provided key across retries of this exact operation."
}
},
"required": [
"orgId",
"databaseId",
"tableId",
"expectedSchemaVersion",
"mutations",
"idempotencyKey"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"required": ["repair"]
},
"then": {
"properties": {
"mutations": {
"items": {
"properties": {
"type": {
"const": "update"
}
}
}
}
}
}
}
]
}
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_mutate_rows",
"arguments": {
"orgId": "01K6J7B8000000000000000000",
"databaseId": "01K6J7B8000000000000000000",
"tableId": "01K6J7B8000000000000000000",
"expectedSchemaVersion": 1,
"mutations": [
{
"type": "create",
"values": {}
}
],
"idempotencyKey": "example-request-0001"
}
}
}
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