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. */
| 986 | * Used by the CLI to build --flag arguments and per-tool --help from the same |
| 987 | * source of truth the MCP tools/list advertises. Static lifetime; do not free. */ |
| 988 | const char *cbm_mcp_tool_input_schema(const char *tool_name) { |
| 989 | if (!tool_name) { |
| 990 | return NULL; |
| 991 | } |
| 992 | for (int i = 0; i < TOOL_COUNT; i++) { |
| 993 | if (strcmp(TOOLS[i].name, tool_name) == 0) { |
| 994 | return TOOLS[i].input_schema; |
| 995 | } |
| 996 | } |
| 997 | return NULL; |
| 998 | } |
| 999 | |
| 1000 | int cbm_mcp_tool_count(void) { |
| 1001 | return TOOL_COUNT; |
no outgoing calls
no test coverage detected