python-sdk/src/mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Soria Parra b1942b31c4
Fix #177: Returning multiple tool results (#222)
* feat: allow lowlevel servers to return a list of resources

The resource/read message in MCP allows of multiple resources
to be returned. However, in the SDK we do not allow this. This
change is such that we allow returning multiple resource in
the lowlevel API if needed. However in FastMCP we stick to
one, since a FastMCP resource defines the mime_type in the decorator
and hence a resource cannot dynamically return different mime_typed resources.
It also is just the better default to only return one resource.
However in the lowlevel API we will allow this.

Strictly speaking this is not a BC break since the new return value
is additive, but if people subclassed server, it will break them.

* feat: lower the type requriements for call_tool to Iterable
2025-02-20 21:31:26 +00:00
..
cli refactor: use built-in typing.Annotated instead of typing_extensions 2025-01-06 10:47:44 +00:00
client fix: ruff format 2025-02-20 11:04:46 +00:00
server Fix #177: Returning multiple tool results (#222) 2025-02-20 21:31:26 +00:00
shared Add client handling for sampling, list roots, ping (#218) 2025-02-20 10:49:43 +00:00
__init__.py rename mcp_python to mcp 2024-11-11 12:40:32 +00:00
py.typed rename mcp_python to mcp 2024-11-11 12:40:32 +00:00
types.py Update URL validation to allow file and other nonstandard schemas 2025-02-13 14:58:58 -08:00