We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1dfca6 commit 8d42e69Copy full SHA for 8d42e69
pydantic_ai_slim/pydantic_ai/mcp.py
@@ -208,7 +208,7 @@ async def _sampling_callback(
208
)
209
210
def _map_tool_result_part(
211
- self, part: mcp_types.Content
+ self, part: mcp_types.ContentBlock
212
) -> str | messages.BinaryContent | dict[str, Any] | list[Any]:
213
# See https://github.com/jlowin/fastmcp/blob/main/docs/servers/tools.mdx#return-values
214
@@ -239,8 +239,10 @@ def _map_tool_result_part(
239
240
else:
241
assert_never(resource)
242
+ elif isinstance(part, mcp_types.ResourceLink):
243
+ raise NotImplementedError('ResourceLink is not implemented.')
244
- assert_never(part) # type: ignore[arg-type]
245
+ assert_never(part)
246
247
248
@dataclass
0 commit comments