update-table
Apply JSON Patch operations to update an OpenMetadata table's metadata attributes.
Instructions
Update a table using JSON Patch operations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Table UUID to update | |
| operations | Yes | JSON Patch operations |
Implementation Reference
- src/tools/tables.ts:81-84 (handler)The actual handler function for the update-table tool. It asserts write permission, then sends a PATCH request to /tables/{id} with JSON Patch operations.
export async function updateTable(params: z.infer<typeof updateTableSchema>) { assertWriteAllowed(); return omClient.patch(`/tables/${params.id}`, params.operations); } - src/tools/tables.ts:76-79 (schema)Zod schema for the update-table tool: requires a table UUID (id) and an array of JSON Patch operations.
export const updateTableSchema = z.object({ id: z.string().describe("Table UUID to update"), operations: z.array(z.record(z.string(), z.any())).describe("JSON Patch operations"), }); - src/index.ts:180-180 (registration)Registration of the update-table tool with the McpServer, binding the schema and wrapped handler.
tool("update-table", "Update a table using JSON Patch operations", updateTableSchema.shape, wrapToolHandler(updateTable)); - src/index.ts:16-20 (registration)Import of updateTableSchema and updateTable from src/tools/tables.ts.
import { listTablesSchema, listTables, getTableSchema, getTable, getTableByNameSchema, getTableByName, createTableSchema, createTable, updateTableSchema, updateTable, deleteTableSchema, deleteTable, } from "./tools/tables.js";