Azure AI Foundry agent doesn't receive user-uploaded PDF attachment

Aria Rahujani 20 Reputation points
2026-07-24T07:07:56.35+00:00

New Foundry (ai.azure.com), standard Agents, OpenAPI 3.0.1 action pointing at a Python Azure Function. Endpoint is anonymous, works with curl.

In Playground I attach a PDF and prompt the agent to process it. The attachment chip shows the file, but the agent responds asking me to upload the file — as if no attachment is present. The tool is never called.

What's the supported way to make an uploaded file available to an agent tool call — is it a URL parameter with blob storage, the Azure Function tool type, or a file_search index? The OpenAPI action with a base64 field doesn't seem to receive the attachment at all.

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

Answer accepted by question author
Deepanshu katara 18,230 Reputation points MVP Volunteer Moderator
2026-07-24T08:17:06.9+00:00

Hello , Welcome to MS Q&A

The uploaded file in the Foundry Playground is not automatically passed to an OpenAPI tool as a base64 payload or request parameter. OpenAPI tools only receive the structured arguments that the model generates. For document processing, the supported approach is to use File Search (upload the file to a vector store and attach it to the agent/thread), or provide your tool with a Blob/SAS URL so the Azure Function can download the file itself. This is the documented pattern for Microsoft Foundry Agents.

Microsoft docs:

Pls check and let us know if any further ques

Thanks
Deepanshu

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Oldest
  1. Pavan Kumar Purilla 410 Reputation points Microsoft External Staff Moderator
    2026-07-27T04:46:41.48+00:00

    Hello Aria Rahujani,
    Thank you for reaching out to Microsoft Q&A.

    Based on the current behavior of Azure AI Foundry Agents, when you upload a PDF in the Playground, the file is not automatically passed to an OpenAPI tool or Azure Function as a Base64 payload. The attachment is available to the agent, but it is not included in the request body sent to your custom tool. This is why the agent responds by asking you to upload the file again, and your Azure Function is never called with the PDF content.

    If your Azure Function needs to process the original PDF, the recommended approach is to upload the file to Azure Blob Storage or the Agents Files API and pass the file URL or file ID to your function. Your Azure Function can then download the file and process it. This is the supported pattern for custom tools that need access to the original document.

    If your goal is for the agent to read and answer questions about the PDF, Microsoft recommends using the File Search tool with a vector store. In this approach, the uploaded document is indexed, allowing the agent to retrieve relevant information from the PDF without sending the entire file to your custom tool. This is the recommended workflow for document-based question answering and Retrieval-Augmented Generation (RAG) scenarios.

    References:
    File search tool for agents
    How to upload files using the file search tool (classic)

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.