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

Function cbm_mcp_tool_input_schema

src/mcp/mcp.c:917–927  ·  view source on GitHub ↗

Return the JSON input_schema string for a tool by name, or NULL if unknown. * Used by the CLI to build --flag arguments and per-tool --help from the same * source of truth the MCP tools/list advertises. Static lifetime; do not free. */

Source from the content-addressed store, hash-verified

915 * Used by the CLI to build --flag arguments and per-tool --help from the same
916 * source of truth the MCP tools/list advertises. Static lifetime; do not free. */
917const char *cbm_mcp_tool_input_schema(const char *tool_name) {
918 if (!tool_name) {
919 return NULL;
920 }
921 for (int i = 0; i < TOOL_COUNT; i++) {
922 if (strcmp(TOOLS[i].name, tool_name) == 0) {
923 return TOOLS[i].input_schema;
924 }
925 }
926 return NULL;
927}
928
929int cbm_mcp_tool_count(void) {
930 return TOOL_COUNT;

Callers 2

cbm_cli_build_args_jsonFunction · 0.85
cbm_cli_print_tool_helpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected