Commit e5926bd
committed
mcp(refactor[server_tools]): centralize socket_name exemption
The contract "every registered tool accepts socket_name except
list_servers" was encoded in two places: the prose of
``_BASE_INSTRUCTIONS`` (server.py) and a hardcoded set in
``test_registered_tools_accept_socket_name`` (tests/test_server.py).
A second exempt tool would have required two synchronized edits.
Lift the exemption to a module-level constant
``SOCKET_NAME_EXEMPT: frozenset[str]`` next to ``list_servers`` in
``server_tools.py``. The test imports it; the docstring near the
constant tells future contributors to update the
``_BASE_INSTRUCTIONS`` prose alongside any addition.
No behaviour change.1 parent c2dd6ef commit e5926bd
2 files changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
262 | 272 | | |
263 | 273 | | |
264 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
| 210 | + | |
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
| 218 | + | |
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
| |||
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
229 | | - | |
| 228 | + | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
0 commit comments