MCPcopy Create free account
hub / github.com/benjitaylor/agentation / updateAnnotation

Function updateAnnotation

package/src/utils/sync.ts:84–100  ·  view source on GitHub ↗
(
  endpoint: string,
  annotationId: string,
  data: Partial<Annotation>
)

Source from the content-addressed store, hash-verified

82 * Update an annotation on the server.
83 */
84export async function updateAnnotation(
85 endpoint: string,
86 annotationId: string,
87 data: Partial<Annotation>
88): Promise<Annotation> {
89 const response = await fetch(`${endpoint}/annotations/${annotationId}`, {
90 method: "PATCH",
91 headers: { "Content-Type": "application/json" },
92 body: JSON.stringify(data),
93 });
94
95 if (!response.ok) {
96 throw new Error(`Failed to update annotation: ${response.status}`);
97 }
98
99 return response.json();
100}
101
102/**
103 * Delete an annotation from the server.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…