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

Function snippet_render_payload

src/mcp/mcp.c:13087–13095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13085}
13086
13087static char *snippet_render_payload(yyjson_mut_doc *doc, const char *args) {
13088 char *json = yy_doc_to_str(doc);
13089 if (!json || mcp_wants_json(args)) {
13090 return json;
13091 }
13092 char *tree = cbm_json_to_tree(json);
13093 free(json);
13094 return tree;
13095}
13096
13097static int snippet_source_line_count(const char *source) {
13098 if (!source || !source[0]) {

Callers 1

build_snippet_responseFunction · 0.85

Calls 3

yy_doc_to_strFunction · 0.85
mcp_wants_jsonFunction · 0.85
cbm_json_to_treeFunction · 0.85

Tested by

no test coverage detected