Suggested way to pass files from the client #54
Replies: 2 comments 1 reply
-
Hey @nickwinder - thanks for reaching out, I'm on the anthropic team and this is something that I've been looking into recently, and want to figure out a good way to implement this sort of thing at the protocol level. I don't think you're overlooking anything, your use-case is currently finicky in the current state of the protocol. My initial thoughts/work have been about allowing MCP server tools to return "files" - basically a tool result content type that is not intended for the LLM's context window, but more for use in an conversation's workspace. For an example scenario, this is what I'd like to enable:
This effectively allows bespoke ETL style workflows to be done by the LLM using MCP (along with many other use cases). My thinking so far is to extend the tool result format to have a Some things that are top of mind here for me are:
|
Beta Was this translation helpful? Give feedback.
-
I started a related discussion in the Specification area here: modelcontextprotocol/specification#90 I think this is what the "Audience" annotation is for - But this doesn't quite answer how best to deal with the specific implementation (which could be Roots, Resource Templates, or custom handling). At the moment, the Client doesn't expose Resource Templates to the server; having a symmetrical approach might make sense for this case where the client can offer Metadata and Resource Identifiers that are made available to the server (and potentially scoped to a session). This feels cleaner than a shared file system via Roots. Another thing I'm finding is that I'm enjoying playing with MCP Servers and having Claude orchestrate them - but in a lot of cases once I've seen 2 clients working together, I don't necessarily need inference between them - some way of chaining them might be good. |
Beta Was this translation helpful? Give feedback.
-
Pre-submission Checklist
Question Category
Your Question
👋
I’m exploring ways to enable LLMs to process files using MCP servers. As a first step, the client needs to pass or report the file to the server for processing.
From the specification, I see two potential approaches:
Does anyone have suggestions for better ways to pass files from the client to the server for processing? Am I overlooking something fundamental in the protocol?
Beta Was this translation helpful? Give feedback.
All reactions