MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / adr_section_updates_error

Function adr_section_updates_error

src/mcp/mcp.c:19946–19955  ·  view source on GitHub ↗

Build the rejection payload for a set_sections request that never reached a * store. Caller frees. */

Source from the content-addressed store, hash-verified

19944/* Build the rejection payload for a set_sections request that never reached a
19945 * store. Caller frees. */
19946static char *adr_section_updates_error(const adr_section_updates_t *u) {
19947 yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
19948 yyjson_mut_val *root_obj = yyjson_mut_obj(doc);
19949 yyjson_mut_doc_set_root(doc, root_obj);
19950 yyjson_mut_obj_add_str(doc, root_obj, "status", u->status);
19951 yyjson_mut_obj_add_strcpy(doc, root_obj, "error", u->error);
19952 char *json = yy_doc_to_str(doc);
19953 yyjson_mut_doc_free(doc);
19954 return json;
19955}
19956
19957static char *handle_manage_adr(cbm_mcp_server_t *srv, const char *args) {
19958 char *project = get_project_arg(args);

Callers 1

handle_manage_adrFunction · 0.85

Calls 1

yy_doc_to_strFunction · 0.85

Tested by

no test coverage detected