MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / parametersSchema

Method parametersSchema

tools/ProjectSearchTool.cpp:51–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51QJsonObject ProjectSearchTool::parametersSchema() const
52{
53 QJsonObject properties;
54
55 properties["query"] = QJsonObject{
56 {"type", "string"},
57 {"description", "Text string or symbol name to search for. In text mode with "
58 "use_regex=true, this is a regular expression."}};
59
60 properties["search_type"] = QJsonObject{
61 {"type", "string"},
62 {"enum", QJsonArray{"text", "symbol"}},
63 {"description", "Search mode: 'text' scans file contents, 'symbol' looks up C++ "
64 "declarations via the code model."}};
65
66 properties["symbol_type"] = QJsonObject{
67 {"type", "string"},
68 {"enum", QJsonArray{"all", "class", "function", "enum", "variable", "namespace"}},
69 {"description", "Filter for symbol mode. Default: 'all'. Ignored in text mode."}};
70
71 properties["case_sensitive"] = QJsonObject{
72 {"type", "boolean"},
73 {"description", "Case-sensitive matching. Default: false."}};
74
75 properties["use_regex"] = QJsonObject{
76 {"type", "boolean"},
77 {"description", "Treat the query as a regular expression. Default: false."}};
78
79 properties["whole_words"] = QJsonObject{
80 {"type", "boolean"},
81 {"description", "Match whole words only. Text mode only; ignored in symbol mode. "
82 "Default: false."}};
83
84 properties["file_pattern"] = QJsonObject{
85 {"type", "string"},
86 {"description", "Wildcard to restrict which files are searched in text mode, e.g. "
87 "'*.cpp' or '*.h'. Default: all files."}};
88
89 QJsonObject definition;
90 definition["type"] = "object";
91 definition["properties"] = properties;
92 definition["required"] = QJsonArray{"query", "search_type"};
93
94 return definition;
95}
96
97QFuture<LLMQore::ToolResult> ProjectSearchTool::executeAsync(const QJsonObject &input)
98{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected