How to return a file within a tool #2017
Unanswered
rdstettler
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an openai runner agent running in the client, something like
So far, for text with works like a charm. However, I have one tool I'd like to return a pdf. Github Copilot always tries to convert the content of the pdf into base64 and return as string, this however very quickly overflows the context window of the AI. OpenAI for example allows to post files, like such
https://platform.openai.com/docs/actions/sending-files
I was looking into something like
but so far in vain, I don't really know how to structure the answer.
What is the correct way for MCP to return a pdf/image?
Beta Was this translation helpful? Give feedback.
All reactions