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

Function parse_search_mode

src/mcp/mcp.c:5024–5035  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

5022
5023/* Parse search mode string (0=compact, 1=full, 2=files). */
5024static int parse_search_mode(const char *mode_str) {
5025 if (!mode_str) {
5026 return 0;
5027 }
5028 if (strcmp(mode_str, "full") == 0) {
5029 return SKIP_ONE;
5030 }
5031 if (strcmp(mode_str, "files") == 0) {
5032 return MCP_RETURN_2;
5033 }
5034 return 0;
5035}
5036
5037/* Validate shell-safe arguments for search. */
5038/* 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