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

Function parse_search_mode

src/mcp/mcp.c:9500–9511  ·  view source on GitHub ↗

Parse search mode string (0=compact, 1=full, 2=files). */

Source from the content-addressed store, hash-verified

9498
9499/* Parse search mode string (0=compact, 1=full, 2=files). */
9500static int parse_search_mode(const char *mode_str) {
9501 if (!mode_str) {
9502 return 0;
9503 }
9504 if (strcmp(mode_str, "full") == 0) {
9505 return SKIP_ONE;
9506 }
9507 if (strcmp(mode_str, "files") == 0) {
9508 return MCP_RETURN_2;
9509 }
9510 return 0;
9511}
9512
9513/* Validate shell-safe arguments for search. */
9514/* Search/grep paths and globs are ALWAYS single-quoted (POSIX sh) or

Callers 1

handle_search_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected