You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Extra fields no longer allowed on top-level MCP types
327
+
328
+
MCP protocol types no longer accept arbitrary extra fields at the top level. This matches the MCP specification which only allows extra fields within `_meta` objects, not on the types themselves.
329
+
330
+
```python
331
+
# This will now raise a validation error
332
+
from mcp.types import CallToolRequestParams
333
+
334
+
params = CallToolRequestParams(
335
+
name="my_tool",
336
+
arguments={},
337
+
unknown_field="value", # ValidationError: extra fields not permitted
338
+
)
339
+
340
+
# Extra fields are still allowed in _meta
341
+
params = CallToolRequestParams(
342
+
name="my_tool",
343
+
arguments={},
344
+
_meta={"progressToken": "tok", "customField": "value"}, # OK
345
+
)
346
+
```
347
+
324
348
## New Features
325
349
326
350
### `streamable_http_app()` available on lowlevel Server
0 commit comments