update-domain
Update a metadata domain by applying JSON Patch operations to modify fields like description.
Instructions
Update a domain using JSON Patch operations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Domain UUID to update | |
| operations | Yes | JSON Patch operations array (e.g. [{op:'add', path:'/description', value:'...'}]) |
Implementation Reference
- src/tools/domains.ts:70-73 (handler)The main handler function for the update-domain tool. It calls assertWriteAllowed() and then sends a PATCH request to /domains/{id} with JSON Patch operations.
export async function updateDomain(params: z.infer<typeof updateDomainSchema>) { assertWriteAllowed(); return omClient.patch(`/domains/${params.id}`, params.operations); } - src/tools/domains.ts:65-68 (schema)Zod schema defining the input shape for update-domain: requires a domain UUID 'id' and an array of JSON Patch 'operations'.
export const updateDomainSchema = z.object({ id: z.string().describe("Domain 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:340-340 (registration)Registration of the update-domain tool on the MCP server, wiring the schema and handler.
tool("update-domain", "Update a domain using JSON Patch operations", updateDomainSchema.shape, wrapToolHandler(updateDomain)); - src/index.ts:95-95 (registration)Import of the updateDomainSchema and updateDomain from src/tools/domains.ts.
updateDomainSchema, updateDomain, deleteDomainSchema, deleteDomain,