Forbid empty search queries over MCP#946
Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
🤖 Augment PR SummarySummary: This PR tightens validation for schema search queries sent via MCP to prevent empty searches. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
| "type": "string", | ||
| "maxLength": 256 | ||
| "maxLength": 256, | ||
| "minLength": 1 |
There was a problem hiding this comment.
minLength: 1 blocks the empty string, but it still allows whitespace-only queries (e.g. " ") which are often effectively empty after trimming; if the intent is to forbid "empty" queries in that broader sense, schema validation alone may not fully enforce it.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Benchmark Index (community)
Details
| Benchmark suite | Current: 2c8f0a9 | Previous: c35fa5c | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
279 ms |
282 ms |
0.99 |
Add one schema (100 existing) |
26 ms |
27 ms |
0.96 |
Add one schema (1000 existing) |
84 ms |
84 ms |
1 |
Add one schema (10000 existing) |
718 ms |
924 ms |
0.78 |
Update one schema (1 existing) |
18 ms |
19 ms |
0.95 |
Update one schema (101 existing) |
27 ms |
27 ms |
1 |
Update one schema (1001 existing) |
84 ms |
87 ms |
0.97 |
Update one schema (10001 existing) |
834 ms |
711 ms |
1.17 |
Cached rebuild (1 existing) |
5 ms |
6 ms |
0.83 |
Cached rebuild (101 existing) |
8 ms |
8 ms |
1 |
Cached rebuild (1001 existing) |
30 ms |
31 ms |
0.97 |
Cached rebuild (10001 existing) |
303 ms |
272 ms |
1.11 |
Index 100 schemas |
111 ms |
114 ms |
0.97 |
Index 1000 schemas |
876 ms |
887 ms |
0.99 |
Index 10000 schemas |
13006 ms |
13978 ms |
0.93 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Benchmark Index (enterprise)
Details
| Benchmark suite | Current: 2c8f0a9 | Previous: c35fa5c | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
291 ms |
292 ms |
1.00 |
Add one schema (100 existing) |
28 ms |
29 ms |
0.97 |
Add one schema (1000 existing) |
80 ms |
86 ms |
0.93 |
Add one schema (10000 existing) |
654 ms |
844 ms |
0.77 |
Update one schema (1 existing) |
20 ms |
21 ms |
0.95 |
Update one schema (101 existing) |
27 ms |
28 ms |
0.96 |
Update one schema (1001 existing) |
80 ms |
87 ms |
0.92 |
Update one schema (10001 existing) |
679 ms |
710 ms |
0.96 |
Cached rebuild (1 existing) |
6 ms |
7 ms |
0.86 |
Cached rebuild (101 existing) |
9 ms |
9 ms |
1 |
Cached rebuild (1001 existing) |
29 ms |
32 ms |
0.91 |
Cached rebuild (10001 existing) |
245 ms |
277 ms |
0.88 |
Index 100 schemas |
121 ms |
119 ms |
1.02 |
Index 1000 schemas |
1140 ms |
1075 ms |
1.06 |
Index 10000 schemas |
13594 ms |
14093 ms |
0.96 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com