MCPcopy
hub / github.com/benjitaylor/agentation / updateAnnotationHandler

Function updateAnnotationHandler

mcp/src/server/http.ts:385–400  ·  view source on GitHub ↗
(req, res, params)

Source from the content-addressed store, hash-verified

383 * PATCH /annotations/:id - Update an annotation.
384 */
385const updateAnnotationHandler: RouteHandler = async (req, res, params) => {
386 try {
387 const body = await parseBody<Partial<Annotation>>(req);
388
389 // Check if annotation exists
390 const existing = getAnnotation(params.id);
391 if (!existing) {
392 return sendError(res, 404, "Annotation not found");
393 }
394
395 const annotation = updateAnnotation(params.id, body);
396 sendJson(res, 200, annotation);
397 } catch (err) {
398 sendError(res, 400, (err as Error).message);
399 }
400};
401
402/**
403 * GET /annotations/:id - Get an annotation.

Callers

nothing calls this directly

Calls 4

sendErrorFunction · 0.85
sendJsonFunction · 0.85
getAnnotationFunction · 0.70
updateAnnotationFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…