Immutable solution version
AI Project client says "Invalid tool value(s): azure_function"
Complete solution
The Invalid tool value: azure_function error means the Azure AI Foundry hub/project is missing its capability host, which is required for the Azure Functions tool. Two confirmed fixes: 1.
What was reported: Issue Azure/azure-sdk-for-python#39778 (closed, 36 comments): Hi all, I have been trying to create an agent with an azure function (queue trigger) deployed into azure with the azure ai foundry SDK. The only problem is when i create an agent with tool as the azure function, it fails saying: "Invalid tool value(s): azurefunction" Pasting the code for reference: ``` import os from azure.ai.projects import AIProjectClient from azure.identity import DefaultAzureCredential from dotenv import loaddotenv loaddotenv() projectconnectionstring = os.getenv("PROJECTCONNECTIONSTRING") model=os.getenv("MODELDEPLOYMENTNAME") storageconnection_string =...
What works: The Invalid tool value: azure_function error means the Azure AI Foundry hub/project is missing its capability host, which is required for the Azure Functions tool. Two confirmed fixes:
- Deploy (or redeploy) your resources with the Standard Agent setup template from the Azure docs. Users confirmed creating the agent this way resolves the error, because the template creates the capability hosts.
- For an existing hub, create the capability host directly from Cloud Shell or the CLI:
az ml capability-host create --name NAME --resource-group GROUP --workspace-name WORKSPACE
Note: the later internal server error discussion in the thread is a separate, unresolved problem with the function-app integration itself, not this tool-value error.
Evidence
In the GitHub issue, the reporter asked: AI Project client says "Invalid tool value(s): azurefunction". The working answer that came out of the thread: The Invalid tool value: azurefunction error means the Azure AI Foundry hub/project is missing its capability host, which is required for the Azure Functions tool. Two confirmed fixes:
- Deploy (or redeploy) your resources with the Standard Agent setup template from the Azure docs. Users confirmed creating the agent this way resolves the error, because the template creates the capability hosts.
- For an existing hub, create the capability host directly from Cloud Shell or the CLI:
az ml capability-host create --name NAME --resource-group GROUP --workspace-name WORKSPACE
Note: the later internal server error discussion in the thread is a separate, unresolved problem with the function-app integration itself, not this tool-value error. Source: https://github.com/Azure/azure-sdk-for-python/issues/39778
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_ArN8GfLNpxFj1D2ifGYa7Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">AI Project client says "Invalid tool value(s): azure_function" <span>— Vectle</span></a>