Commit f69b613
feat(mcp): add readOnlyHint annotations to all MCP tools (#1013)
* feat(mcp): add readOnlyHint annotations to all MCP tools
Mark all MCP tools as read-only using the MCP specification's
readOnlyHint annotation. This enables compatibility with Cursor's
Ask mode and other MCP clients that restrict tool usage based on
whether tools modify their environment.
All 7 tools (search_code, list_commits, list_repos, read_file,
list_tree, list_language_models, ask_codebase) are now annotated
with readOnlyHint: true in both the built-in web server and the
standalone npm package.
Fixes #SOU-707
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
* docs: add CHANGELOG entry for MCP read-only annotations
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>1 parent 71f0ffc commit f69b613
File tree
3 files changed
+17
-0
lines changed- packages
- mcp/src
- web/src/features/mcp
3 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| 206 | + | |
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
| |||
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| |||
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| |||
395 | 400 | | |
396 | 401 | | |
397 | 402 | | |
| 403 | + | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
| |||
424 | 430 | | |
425 | 431 | | |
426 | 432 | | |
| 433 | + | |
427 | 434 | | |
428 | 435 | | |
429 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| 234 | + | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| |||
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
| |||
308 | 311 | | |
309 | 312 | | |
310 | 313 | | |
| 314 | + | |
311 | 315 | | |
312 | 316 | | |
313 | 317 | | |
| |||
341 | 345 | | |
342 | 346 | | |
343 | 347 | | |
| 348 | + | |
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
| |||
480 | 485 | | |
481 | 486 | | |
482 | 487 | | |
| 488 | + | |
483 | 489 | | |
484 | 490 | | |
485 | 491 | | |
| |||
491 | 497 | | |
492 | 498 | | |
493 | 499 | | |
| 500 | + | |
494 | 501 | | |
495 | 502 | | |
496 | 503 | | |
| |||
0 commit comments