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

Function add_string_array

src/mcp/mcp.c:13003–13013  ·  view source on GitHub ↗

Build an enriched snippet response for a resolved node. */ Add a string array to a JSON object (no-op if count == 0). */

Source from the content-addressed store, hash-verified

13001/* Build an enriched snippet response for a resolved node. */
13002/* Add a string array to a JSON object (no-op if count == 0). */
13003static void add_string_array(yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *key,
13004 char **strings, int count) {
13005 if (count <= 0) {
13006 return;
13007 }
13008 yyjson_mut_val *arr = yyjson_mut_arr(doc);
13009 for (int i = 0; i < count; i++) {
13010 yyjson_mut_arr_add_str(doc, arr, strings[i]);
13011 }
13012 yyjson_mut_obj_add_val(doc, obj, key, arr);
13013}
13014
13015/* get_code_snippet coverage note (#963): if the resolved node's file is
13016 * flagged parse_partial or parse_unusable, warn that the graph may

Callers 1

build_snippet_responseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected