@Varsha Ravichandran welcome to the Micosoft Q&A community.
You can troubleshoot the error using the following steps below:
- Check Tool Registration in the Agent Backend
Even though the tools appear in the agent’s metadata (i.e. their names show up when you print), they might not be properly registered or initialized in the backend C# code. Make sure that:
- The tools are added to the agent's toolset during startup.
- Any dynamic registration code isn’t skipping them due to configuration or context.
- Validate Access Permissions
Since these tools interact with Azure Repos:
- Ensure your Agent has the appropriate Azure identity (e.g. managed identity or credentials) and permissions to access those repo resources.
- If authentication or permission errors occur, the agent might silently fail to attach the tools.
- Inspect Tool Execution Interfaces
Your Python backend likely sends an execution request to the agent for a tool. Confirm that:
- The tool’s name matches exactly (case-sensitive, no typos).
- The tool has a defined execution handler in C# that’s exposed through the Agent’s endpoint.
- If you’re using OpenAPI or a schema registry, confirm that the tool is described properly there and accessible to external callers.
- Debug the Agent’s Response
When the agent replies that the tool isn’t part of the toolset:
- Log the toolset from the agent’s perspective right before invocation.
- You might find that although the name appears in a config, it was never fully activated at runtime.
- Cross-Language Invocation Check
Since your app is Python and your agent backend is C#, look into whether:
- The serialization format is consistent (e.g. JSON schema).
- The Python client is using the correct API version and authentication tokens when calling the agent.
N/B: I have generated the above answer using co-pilot as an AI tool. Also I have validated and updated the AI output.
If you can share a snippet of how you're invoking the tool from Python (minus anything sensitive), I can give more specific guidance.
I hope these helps. Let me know if you have any further questions or need additional assistance.
Also if these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.