update-glossary
Update a glossary by applying JSON Patch operations to modify its contents.
Instructions
Update a glossary using JSON Patch operations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Glossary UUID | |
| operations | Yes | JSON Patch operations |
Implementation Reference
- src/tools/glossary.ts:65-68 (handler)The actual handler function that executes the update-glossary tool logic. It validates writes are allowed, then sends a PATCH request to /glossaries/{id} with JSON Patch operations.
export async function updateGlossary(params: z.infer<typeof updateGlossarySchema>) { assertWriteAllowed(); return omClient.patch(`/glossaries/${params.id}`, params.operations); } - src/tools/glossary.ts:60-63 (schema)Zod schema defining the input parameters for update-glossary: id (Glossary UUID) and operations (array of JSON Patch operations).
export const updateGlossarySchema = z.object({ id: z.string().describe("Glossary UUID"), operations: z.array(z.record(z.string(), z.any())).describe("JSON Patch operations"), }); - src/index.ts:250-250 (registration)Registration of the 'update-glossary' tool with the MCP server, wiring the schema and handler together.
tool("update-glossary", "Update a glossary using JSON Patch operations", updateGlossarySchema.shape, wrapToolHandler(updateGlossary)); - src/index.ts:55-56 (helper)Import of updateGlossarySchema and updateGlossary from the glossary tools module.
} from "./tools/glossary.js"; import {