fix: return 202 for stale-session notifications, warn on updateTable columns (#654) (#655)

This commit is contained in:
Romuald Członkowski
2026-03-22 19:59:57 +01:00
committed by GitHub
parent 6f6668acc4
commit ec19c9dade
7 changed files with 200 additions and 10 deletions

View File

@@ -2834,10 +2834,13 @@ export async function handleUpdateTable(args: unknown, context?: InstanceContext
const client = ensureApiConfigured(context);
const { tableId, name } = updateTableSchema.parse(args);
const dataTable = await client.updateDataTable(tableId, { name });
const rawArgs = args as Record<string, unknown>;
const hasColumns = rawArgs && typeof rawArgs === 'object' && 'columns' in rawArgs;
return {
success: true,
data: dataTable,
message: `Data table renamed to "${dataTable.name}"`,
message: `Data table renamed to "${dataTable.name}"` +
(hasColumns ? '. Note: columns parameter was ignored — table schema is immutable after creation via the public API' : ''),
};
} catch (error) {
return handleDataTableError(error);

View File

@@ -619,10 +619,10 @@ export const n8nManagementTools: ToolDefinition[] = [
description: 'Operation to perform',
},
tableId: { type: 'string', description: 'Data table ID (required for all actions except createTable and listTables)' },
name: { type: 'string', description: 'For createTable/updateTable: table name' },
name: { type: 'string', description: 'For createTable: table name. For updateTable: new name (rename only — schema is immutable after creation)' },
columns: {
type: 'array',
description: 'For createTable: column definitions',
description: 'For createTable only: column definitions (schema is immutable after creation via public API)',
items: {
type: 'object',
properties: {