-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Question
Hello!
When returning an embedded resource from an MCP Tool using the MCPServerStreamableHTTP
, pydantic ai currently only returns the text due to this code.
However, information besides the text may be interesting for further processing.
embedded_resource = EmbeddedResource(
type="resource",
resource=TextResourceContents(
uri=f"resource://{to_uri(result.id)}",
text=result.document.text,
mimeType="text/plain",
_meta=result.document.metadata or {},
),
_meta={
"relevance_score": round(result.score, 3),
"document_last_modified": document.metadata.get(
"modifiedDate", None
),
},
)
In this example, only the text would be returned, which may be insufficient. Is this behavior intended for embedded resources? Other clients from fastmcp return all available content. I feel that at least having control over this behavior would be very beneficial.
Thank you in advance for your support.
Additional Context
No response
ivo-1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working