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

Function arch_json_section

src/mcp/mcp.c:7996–8008  ·  view source on GitHub ↗

Begin a json-tree {cols, rows} section under `key` on root; returns the * rows array for the caller to fill with column-ordered row arrays. */

Source from the content-addressed store, hash-verified

7994/* Begin a json-tree {cols, rows} section under `key` on root; returns the
7995 * rows array for the caller to fill with column-ordered row arrays. */
7996static yyjson_mut_val *arch_json_section(yyjson_mut_doc *doc, yyjson_mut_val *root, const char *key,
7997 const char *const *cols, int ncols) {
7998 yyjson_mut_val *sec = yyjson_mut_obj(doc);
7999 yyjson_mut_val *c = yyjson_mut_arr(doc);
8000 for (int i = 0; i < ncols; i++) {
8001 yyjson_mut_arr_add_str(doc, c, cols[i]);
8002 }
8003 yyjson_mut_obj_add_val(doc, sec, "cols", c);
8004 yyjson_mut_val *rows = yyjson_mut_arr(doc);
8005 yyjson_mut_obj_add_val(doc, sec, "rows", rows);
8006 yyjson_mut_obj_add_val(doc, root, key, sec);
8007 return rows;
8008}
8009
8010/* Fetch the complete qualified_name for a node id, or a "#<id>" fallback. */
8011static char *arch_node_qn(cbm_store_t *store, int64_t id) {

Callers 1

handle_get_architectureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected