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

Function doccand_forward_call

tests/test_mcp.c:15513–15523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15511}
15512
15513static int doccand_forward_call(cbm_mcp_server_t *srv, doccand_executor_capture_t *capture,
15514 const char *repo, const char *extra) {
15515 char args[1024];
15516 snprintf(args, sizeof(args), "{\"repo_path\":\"%s\"%s}", repo, extra);
15517 free(capture->args);
15518 capture->args = NULL;
15519 int before = capture->calls;
15520 char *resp = cbm_mcp_handle_tool(srv, "index_repository", args);
15521 free(resp);
15522 return capture->calls == before + 1 ? doccand_forwarded(capture) : -3;
15523}
15524
15525/* A daemon session forwards doc_candidates only when it is explicit: an
15526 * argument (caller duplicates replaced by the one resolved value) or a

Callers 1

test_mcp.cFile · 0.85

Calls 2

cbm_mcp_handle_toolFunction · 0.85
doccand_forwardedFunction · 0.85

Tested by

no test coverage detected