Skip to main content
Glama

restart_flow_run

Restart a Prefect workflow execution by providing the flow run ID to initiate a new run from the same starting point.

Instructions

Restart a flow run.

Args: flow_run_id: The flow run UUID

Returns: Details of the new flow run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_run_idYes

Implementation Reference

  • The restart_flow_run tool handler, decorated with @mcp.tool. It restarts the specified Prefect flow run by creating a new one from the original using the Prefect client, adds a UI URL, and returns the details as text content.
    @mcp.tool async def restart_flow_run( flow_run_id: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Restart a flow run. Args: flow_run_id: The flow run UUID Returns: Details of the new flow run """ async with get_client() as client: flow_run_id_uuid = UUID(flow_run_id) new_flow_run = await client.create_flow_run_from_flow_run(flow_run_id_uuid) new_flow_run_dict = new_flow_run.dict() new_flow_run_dict["ui_url"] = get_flow_run_url(str(new_flow_run.id)) return [types.TextContent(type="text", text=str(new_flow_run_dict))]
  • The @mcp.tool decorator that registers the restart_flow_run function as an MCP tool.
    @mcp.tool

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/allen-munsch/mcp-prefect'

If you have feedback or need assistance with the MCP directory API, please join our Discord server