class documentation

Provider for creating Temporal-aware MCP toolsets.

Warning

This class is experimental and may change in future versions. Use with caution in production environments.

Manages the creation of toolset activities and handles tool execution within Temporal workflows.

This provider is stateless: every list-tools/call-tool activity invocation builds a fresh McpToolset via toolset_factory, runs the operation, and always closes the toolset in a finally block. This means factory_argument is honored on every single call (no cross-workflow connection sharing or silent mis-routing) and no MCP session or stdio subprocess is leaked. State is not maintained across calls; if a persistent connection is required, use TemporalStatefulMcpToolSetProvider.

Method __init__ Initializes the toolset provider.
Method _get_activities Undocumented
Instance Variable _name Undocumented
Instance Variable _toolset_factory Undocumented
def __init__(self, name: str, toolset_factory: Callable[[(Any | None)], McpToolset]): (source)

Initializes the toolset provider.

Parameters
name:strName prefix for the generated activities.
toolset_factory:Callable[[(Any | None)], McpToolset]Factory function that creates McpToolset instances. It should return a new toolset each time so that no state is shared between workflow runs.
def _get_activities(self) -> Sequence[Callable]: (source)

Undocumented

Undocumented

_toolset_factory = (source)

Undocumented