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

Function cli_schema_required_has

src/cli/cli.c:14003–14016  ·  view source on GitHub ↗

True if the schema's required[] array contains `key`. */

Source from the content-addressed store, hash-verified

14001
14002/* True if the schema's required[] array contains `key`. */
14003static bool cli_schema_required_has(yyjson_val *required, const char *key) {
14004 if (!required || !yyjson_is_arr(required)) {
14005 return false;
14006 }
14007 size_t idx;
14008 size_t max;
14009 yyjson_val *v;
14010 yyjson_arr_foreach(required, idx, max, v) {
14011 if (yyjson_is_str(v) && strcmp(yyjson_get_str(v), key) == 0) {
14012 return true;
14013 }
14014 }
14015 return false;
14016}
14017
14018/* Look up a property's JSON-schema "type" string (string/integer/number/
14019 * boolean/array). Returns NULL when the schema or property is unknown — the

Callers 1

cbm_cli_print_tool_helpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected