refactor: improve type docstrings and remove internal type exports (#1950)

This commit is contained in:
Marcelo Trylesinski 2026-01-24 17:17:09 +01:00 • committed by GitHub
commit ce75b2d7d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,17 +60,22 @@ The following deprecated type aliases and classes have been removed from `mcp.ty
|---------|-------------|
| `Content` | `ContentBlock` |
| `ResourceReference` | `ResourceTemplateReference` |
| `Cursor` | Use `str` directly |
| `MethodT` | Internal TypeVar, not intended for public use |
| `RequestParamsT` | Internal TypeVar, not intended for public use |
| `NotificationParamsT` | Internal TypeVar, not intended for public use |
**Before (v1):**
```python
from mcp.types import Content, ResourceReference
from mcp.types import Content, ResourceReference, Cursor
```
**After (v2):**
```python
from mcp.types import ContentBlock, ResourceTemplateReference
# Use `str` instead of `Cursor` for pagination cursors
```
### `args` parameter removed from `ClientSessionGroup.call_tool()`