update-ml-model
Apply JSON Patch operations to modify fields (e.g., description) of an ML model identified by its UUID.
Instructions
Update an ML model using JSON Patch operations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ML Model UUID to update | |
| operations | Yes | JSON Patch operations array (e.g. [{op:'add', path:'/description', value:'...'}]) |
Implementation Reference
- src/tools/mlmodels.ts:78-81 (handler)The updateMlModel handler function: sends a PATCH request to /mlmodels/{id} with JSON Patch operations.
export async function updateMlModel(params: z.infer<typeof updateMlModelSchema>) { assertWriteAllowed(); return omClient.patch(`/mlmodels/${params.id}`, params.operations); } - src/tools/mlmodels.ts:73-76 (schema)The updateMlModelSchema Zod schema: defines required 'id' (string UUID) and 'operations' (array of JSON Patch operation objects).
export const updateMlModelSchema = z.object({ id: z.string().describe("ML Model UUID to update"), operations: z.array(z.record(z.string(), z.any())).describe("JSON Patch operations array (e.g. [{op:'add', path:'/description', value:'...'}])"), }); - src/index.ts:314-314 (registration)Registration of the 'update-ml-model' tool in the MCP server, wiring the schema and handler.
tool("update-ml-model", "Update an ML model using JSON Patch operations", updateMlModelSchema.shape, wrapToolHandler(updateMlModel)); - src/index.ts:78-84 (helper)Import of updateMlModelSchema and updateMlModel from src/tools/mlmodels.ts.
getContainerByNameSchema, getContainerByName, createContainerSchema, createContainer, updateContainerSchema, updateContainer, deleteContainerSchema, deleteContainer, } from "./tools/containers.js"; import { listMlModelsSchema, listMlModels, getMlModelSchema, getMlModel, getMlModelByNameSchema, getMlModelByName, createMlModelSchema, createMlModel, updateMlModelSchema, updateMlModel, deleteMlModelSchema, deleteMlModel,