microsoft-foundry / microsoft-foundry/foundry-samples

mcp.py sample getting error "Unknown parameter: 'tools[0].require_approval'"

Open
#270 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

Trying out the MCP sample https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/python/getting-started-agents/mcp.py and get error as below "Unknown parameter: 'tools[0].require_approval'".

Complete trace as below:

PS C:\Users\zhuohangli\Documents\dev\azure-ai-agent-service-quickstart> uv run .\src\mcp_quickstart_disable_approval.py
Traceback (most recent call last):
  File "C:\Users\zhuohangli\Documents\dev\azure-ai-agent-service-quickstart\src\mcp_quickstart_disable_approval.py", line 24, in <module>
    agent = project_client.agents.create_agent(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zhuohangli\Documents\dev\azure-ai-agent-service-quickstart\.venv\Lib\site-packages\azure\core\tracing\decorator.py", line 119, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zhuohangli\Documents\dev\azure-ai-agent-service-quickstart\.venv\Lib\site-packages\azure\ai\agents\_patch.py", line 322, in create_agent
    new_agent = super().create_agent(
                ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zhuohangli\Documents\dev\azure-ai-agent-service-quickstart\.venv\Lib\site-packages\azure\core\tracing\decorator.py", line 119, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zhuohangli\Documents\dev\azure-ai-agent-service-quickstart\.venv\Lib\site-packages\azure\ai\agents\operations\_operations.py", line 5329, in create_agent
    raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: (unknown_parameter) Unknown parameter: 'tools[0].require_approval'.      
Code: unknown_parameter
Message: Unknown parameter: 'tools[0].require_approval'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with samples/microsoft/python/getting-started-agents/mcp.py and compare its MCP tool configuration with the installed Azure Agents SDK and service behavior shown in the traceback. Run the sample with the documented environment; done when agent creation completes without the unknown-parameter error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
ai
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.