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

Function budget_result_doc

tests/test_mcp.c:21303–21308  ·  view source on GitHub ↗

Parse the JSON object inside an MCP tool result. NULL when absent. */

Source from the content-addressed store, hash-verified

21301
21302/* Parse the JSON object inside an MCP tool result. NULL when absent. */
21303static yyjson_doc *budget_result_doc(const char *result) {
21304 char *text = extract_text_content(result);
21305 yyjson_doc *doc = text ? yyjson_read(text, strlen(text), 0) : NULL;
21306 free(text);
21307 return doc;
21308}
21309
21310static const char *budget_doc_str(yyjson_doc *doc, const char *key) {
21311 return doc ? yyjson_get_str(yyjson_obj_get(yyjson_doc_get_root(doc), key)) : NULL;

Callers 1

test_mcp.cFile · 0.85

Calls 1

extract_text_contentFunction · 0.85

Tested by

no test coverage detected