Sanity Library Reference Docs
    Preparing search index...

    Type Alias GetWorkflowToolContext

    GetWorkflowToolContext: (
        extra: WorkflowToolExtra,
        input: unknown,
    ) => WorkflowToolContext | Promise<WorkflowToolContext>

    The host seam: produce the WorkflowToolContext for one tool call. extra carries the request (a hosted server derives auth from it); input carries the parsed tool arguments — for the instance-operating tools that includes the per-call workflow environment address, which workflowAddressFromInput extracts so the host can build (or reuse) the engine for that environment. The authoring tools never invoke their context thunk, so this is never called without an address to read.

    Type declaration