Commit 5e89269
committed
Address code review: Invert resource fallback logic for safer client compatibility
Per @Valiunia's review feedback, invert the resource fallback tool logic to use an allowlist approach instead of blocklist. This is safer for unknown clients.
Changes:
- OLD: Only provide fallback tools if client name includes 'claude' (blocklist)
- NEW: Provide fallback tools to ALL clients UNLESS we know they support resources (allowlist)
Known clients with proper resource support (skip fallback tools):
- inspector
- vscode
Benefits:
- Unknown/new clients get fallback tools by default (safer)
- No risk of missing clients that need resource fallback
- More defensive approach for ecosystem compatibility
Related: PR #61 review comments
All tests passing (536 tests).1 parent b29c23f commit 5e89269
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
265 | 266 | | |
266 | | - | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | | - | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
0 commit comments