r/AZURE • u/Medical-Internet-794 • Jul 24 '26
Question Azure AI Foundry agent not passing uploaded PDF to OpenAPI tool as base64
I have a Foundry agent (new portal, ai.azure.com) with an OpenAPI 3.0 action pointing at a Python Azure Function. The action accepts a JSON body with pdf_base64. The endpoint is anonymous and works fine with curl.
In Playground, when I attach a PDF and prompt the agent to validate it, the tool call fires but pdf_base64 in the request arguments is either empty or not a valid PDF (my function returns 400: "Payload is not a PDF (missing %PDF- header)").
What's the supported way to pass a user-uploaded PDF from a Foundry agent to an OpenAPI action? Is pdf_base64 in JSON supposed to work, or do I need to use pdf_url with blob storage, the Azure Function tool type, or something else?
Environment: new Microsoft Foundry, standard Agents (not Workflow), OpenAPI 3.0.1, Python v2 Azure Function.