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

Function cbm_mcp_get_string_arg

src/mcp/mcp.c:1356–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1354}
1355
1356char *cbm_mcp_get_string_arg(const char *args_json, const char *key) {
1357 yyjson_doc *doc = yyjson_read(args_json, strlen(args_json), 0);
1358 if (!doc) {
1359 return NULL;
1360 }
1361 yyjson_val *root = yyjson_doc_get_root(doc);
1362 yyjson_val *val = yyjson_obj_get(root, key);
1363 char *result = NULL;
1364 if (val && yyjson_is_str(val)) {
1365 result = heap_strdup(yyjson_get_str(val));
1366 }
1367 yyjson_doc_free(doc);
1368 return result;
1369}
1370
1371static char *canonicalize_repo_path_if_exists(char *repo_path) {
1372 if (!repo_path) {

Callers 15

mainFunction · 0.85
get_project_argFunction · 0.85
handle_search_graphFunction · 0.85
handle_query_graphFunction · 0.85
handle_get_architectureFunction · 0.85
handle_trace_call_pathFunction · 0.85
handle_index_repositoryFunction · 0.85
handle_get_code_snippetFunction · 0.85
handle_search_codeFunction · 0.85
handle_detect_changesFunction · 0.85

Calls 1

heap_strdupFunction · 0.70

Tested by 2

app_fake_worker_startFunction · 0.68