Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hello Adrian Bostan,
Welcome to Microsoft Q&A .Thank you for reaching out to us.
Based on the behavior observed, the API endpoint itself appears to be functioning correctly, since direct API testing succeeds outside the Foundry Agent environment.
The key indicator is the following runtime error
SpecificationNotFoundError
No API specification found for spec_id 'LearningPaths'
This error occurs before the API call is executed and typically indicates that the Foundry Agent runtime is unable to locate a successfully registered OpenAPI specification for the attached tool. Based on the current behavior, the issue appears more closely related to OpenAPI tool registration, specification ingestion, or runtime binding rather than the Azure Web App API implementation itself.
Please check if the following steps help isolate and resolve the issue-
- Recreating the OpenAPI tool and refresh runtime metadata In some cases, OpenAPI tool metadata may become stale or partially registered. Recommended steps:
- Remove the existing LearningPaths OpenAPI tool from the agent
- Create a new OpenAPI tool
- Re-upload the OpenAPI schema
- Save the tool configuration
- Save the agent configuration
- Start a completely new playground session and test again
- Simplifying the OpenAPI specification temporarily Although the API works correctly, OpenAPI ingestion behavior in Foundry may differ from standard Swagger/OpenAPI validation tools. The following schema areas should be reviewed:
"$ref": "#/components/schemas/ProblemDetails"without a matching schema definition- Placeholder server URL instead of the deployed HTTPS endpoint
- Complex or unnecessary schema constructs during initial testing
- Single POST operation
- Inline request schema only
- No
$ref - Minimal response definition
- Verifying operation extraction after import After importing the OpenAPI tool, successful import should expose callable operations within the tool configuration UI
createLearningPathIf the operation does not appear after upload, this strongly indicates that the OpenAPI specification ingestion is failing internally. In that situation, the runtime will not be able to resolve thespec_idduring execution, which directly aligns with the observedSpecificationNotFoundError. - Validating the OpenAPI document directly Please confirm that the OpenAPI document used during tool registration is accessible and returns valid OpenAPI JSON.
- Returns HTTP 200
- Returns valid OpenAPI JSON
- No authentication prompt
- No unexpected redirects
The following references might be helpful , please check them out
- Connect OpenAPI tools to Microsoft Foundry agents - Microsoft Foundry | Microsoft Learn
- Agentic app with Microsoft Agent Framework or Foundry Agent Service (.NET) - Azure App Service | Microsoft Learn
- What is Microsoft Foundry Agent Service? - Microsoft Foundry | Microsoft Learn
Please let us know if the response was helpful
Thank you