You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: MCP tools with execution.taskSupport "optional" are skipped, although they can be called without Tasks #9675
Versions: agent-framework 1.23.0, agent-framework-foundry-hosting 1.0.0b261022, mcp 2.3.0 (worked in agent-framework 1.21.0 with mcp 1.x).
What happens
Since the MCP 2.x migration (#9236), _load_tools_locked skips every tool whose execution.taskSupport is "required"or"optional":
Skipping MCP tool 'pbi-mcp___ExecuteQuery' because it (might) require the Tasks extension, which MCP Python SDK 2.2 does not implement.
A Foundry Toolbox (FoundryToolbox) marks its Power BI MCP tools and its Foundry IQ knowledge-base tool as "optional". After upgrading from 1.21 to 1.23, all of them disappear from the agent; only tools without taskSupport remain.
Expected
Per the MCP spec, "optional" means the client may invoke the tool with task augmentation, but a plain tools/call is valid. Only "required" tools need the Tasks extension. With 1.21 / mcp 1.x the same tools were called normally and work.
Suggestion
Skip only "required", and call "optional" tools as plain calls until Tasks client support (#9215) lands. Alternatively, make this configurable on MCPStreamableHTTPTool / FoundryToolbox.
Impact
Blocks upgrading Foundry-hosted agents that use Toolbox connections, with no workaround short of patching internals.
Reproduced on agent-framework-core 1.23.0 + mcp 2.3.0 — thanks for the clear report.
Minimal repro (mirroring the mock-session pattern from tests/core/test_mcp.py): a session exposing two tools, one plain and one with execution.task_support="optional", produces
Skipping MCP tool 'optional_task_tool' because it (might) require the Tasks extension, which MCP Python SDK 2.2 does not implement.
and only the plain tool ends up in tool._functions.
Root cause is the membership test at python/packages/core/agent_framework/_mcp.py (~line 3110): if task_support in ["required", "optional"] skips both. Per the Tasks-extension semantics, "optional" means the tool works without the extension (it may use it when available), so only "required" warrants skipping — which would also let the warning message drop the "(might)" hedge.
Proposed direction: skip only when task_support == "required", load "optional" tools normally, and add a regression test with both variants.
Following the AI-assisted contributions policy: this analysis and repro were prepared with an AI coding agent at my direction and reviewed by me; happy to implement once a maintainer adds ready-for-implementation or agrees with the direction.
Activity
Sainath-Reddy7 commentedon Oct 25, 2026
Reproduced on agent-framework-core 1.23.0 + mcp 2.3.0 — thanks for the clear report.
Minimal repro (mirroring the mock-session pattern from
tests/core/test_mcp.py): a session exposing two tools, one plain and one withexecution.task_support="optional", producesand only the plain tool ends up in
tool._functions.Root cause is the membership test at
python/packages/core/agent_framework/_mcp.py(~line 3110):if task_support in ["required", "optional"]skips both. Per the Tasks-extension semantics,"optional"means the tool works without the extension (it may use it when available), so only"required"warrants skipping — which would also let the warning message drop the "(might)" hedge.Proposed direction: skip only when
task_support == "required", load"optional"tools normally, and add a regression test with both variants.Following the AI-assisted contributions policy: this analysis and repro were prepared with an AI coding agent at my direction and reviewed by me; happy to implement once a maintainer adds
ready-for-implementationor agrees with the direction.