Skip to content

Python: MCP tools with execution.taskSupport "optional" are skipped, although they can be called without Tasks #9675

Open

Description

@gluc

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.

Activity

  1. added
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 24, 2026
  2. Sainath-Reddy7 commented on Oct 25, 2026

    @Sainath-Reddy7

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions