Skip to content

strands.tools.mcp.mcp_tasks

Task-augmented tool execution configuration for MCP.

This module provides configuration types and defaults for the experimental MCP Tasks feature.

DEFAULT_TASK_CONFIG = TasksConfig(ttl=DEFAULT_TASK_TTL, poll_timeout=DEFAULT_TASK_POLL_TIMEOUT) module-attribute

DEFAULT_TASK_POLL_TIMEOUT = timedelta(minutes=5) module-attribute

DEFAULT_TASK_TTL = timedelta(minutes=1) module-attribute

TasksConfig

Bases: TypedDict

Configuration for MCP Tasks (task-augmented tool execution).

When enabled, supported tool calls use the MCP task workflow: create task -> poll for completion -> get result.

Warning

This is an experimental feature in the 2025-11-25 MCP specification and both the specification and the Strands Agents implementation of this feature are subject to change.

Attributes:

Name Type Description
ttl timedelta

Task time-to-live. Defaults to 1 minute.

poll_timeout timedelta

Timeout for polling task completion. Defaults to 5 minutes.

Source code in strands/tools/mcp/mcp_tasks.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class TasksConfig(TypedDict, total=False):
    """Configuration for MCP Tasks (task-augmented tool execution).

    When enabled, supported tool calls use the MCP task workflow:
    create task -> poll for completion -> get result.

    Warning:
        This is an experimental feature in the 2025-11-25 MCP specification and
        both the specification and the Strands Agents implementation of this
        feature are subject to change.

    Attributes:
        ttl: Task time-to-live. Defaults to 1 minute.
        poll_timeout: Timeout for polling task completion. Defaults to 5 minutes.
    """

    ttl: timedelta
    poll_timeout: timedelta