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

Function cbm_build_openhands_mcp_entry

src/cli/cli.c:2517–2533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2515}
2516
2517static char *cbm_build_openhands_mcp_entry(const char *binary_path) {
2518 yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
2519 if (!doc) {
2520 return NULL;
2521 }
2522 yyjson_mut_val *root = yyjson_mut_obj(doc);
2523 bool ok = root && yyjson_mut_obj_add_strcpy(doc, root, "transport", "stdio") &&
2524 yyjson_mut_obj_add_strcpy(doc, root, "command", binary_path) &&
2525 yyjson_mut_obj_add_bool(doc, root, "enabled", true);
2526 char *json = NULL;
2527 if (ok) {
2528 yyjson_mut_doc_set_root(doc, root);
2529 json = yyjson_mut_write(doc, YYJSON_WRITE_NOFLAG, NULL);
2530 }
2531 yyjson_mut_doc_free(doc);
2532 return json;
2533}
2534
2535/* Insert or leave alone: an already-owned entry (exact match, or annotated
2536 * with extra keys the client added) needs no write. A same-named entry that

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected