preview_workflow

Dry-run a supported business workflow. For deal_to_estimate, previews the Sanka estimate draft and approval state. For deal_to_order, previews creating or reusing a Sanka Order from a HubSpot Deal or synced CRM revenue record. For deal_to_subscription, previews the Order-first subscription flow a...

Server Sanka MCP Server sankahq/sanka-mcp
Category Execute
Risk class High
Parameters 00 required

What preview_workflow does on Sanka MCP Server

AI agents invoke preview_workflow to trigger actions in Sanka MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

Why preview_workflow needs a policy

Although described as a 'preview' or 'dry-run', this tool executes complex business logic that interacts with multiple integrated systems (HubSpot CRM, Sanka Orders, Estimates, Invoices, Subscriptions). It triggers workflows whose effects depend on the workflow type and input arguments provided.

From the tool's definition Tool performs 'dry-run' preview of business workflows including deal_to_estimate, deal_to_order, deal_to_subscription, estimate_to_invoice, and order_to_invoice.

Questions about preview_workflow

What does the preview_workflow tool do? +

Dry-run a supported business workflow. For deal_to_estimate, previews the Sanka estimate draft and approval state. For deal_to_order, previews creating or reusing a Sanka Order from a HubSpot Deal or synced CRM revenue record. For deal_to_subscription, previews the Order-first subscription flow and supports HubSpot batch filters such as subscription_flag_property. For estimate_to_invoice, previews creating/reusing a Sanka Order from a Sanka Estimate before invoicing. For order_to_invoice, order_to_subscription, and order_to_purchase_order, previews billing, subscription, or shortage-driven procurement creation from Sanka Orders. For subscription_to_invoice, previews invoice generation from Sanka Subscriptions, including duplicate-period checks by start_date. For deal_to_order_handoff, previews a closed-won HubSpot Deal to Sanka order draft / fulfillment handoff with customer/contact resolution, line items, inventory availability, lead-time and delivery timing, duplicate warnings, and HubSpot writeback plan. For invoice_export, previews syncing explicitly scoped Sanka invoice drafts to freee or MoneyForward invoice drafts and returns needs_confirmation for ambiguous or broad sync requests without writing records. For freee, preview/start provider capabilities and next_actions are the source of truth: freee records are cancelled/restorable rather than physically deleted, allow_resync updates mapped draft/unregistered invoices, and allow_multiple_freee_drafts creates a separate draft only with explicit user intent. Use preview/start results, not list_integration_channels shadow/outbound flags, as the source of truth for accounting export blockers. For quote_readiness, checks whether a Salesforce Opportunity has enough clean data to quote and returns blockers, warnings, fixes, source links, and the generic Sanka platform-mapping reuse/create plan. For revenue_control_summary, summarizes read-only HubSpot closed-won revenue into won, quote_drafted, approval_pending, unbilled, invoiced, unpaid, and blocked buckets with totals and next actions. For sales_incentive_commission, calculates a draft/read-only commission report by rep and deal from HubSpot closed-won deals reconciled with Sanka invoices/orders, payment status, refunds/credits, margin, ownership splits, and Sanka incentive rules. Direct CRM deal_to_invoice is disabled; create an order first. Does not write records. It is categorised as a Execute tool in the Sanka MCP Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on preview_workflow? +

Register the Sanka MCP Server MCP server in PolicyLayer and add a rule for preview_workflow: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Sanka MCP Server. Nothing to install.

What risk level is preview_workflow? +

preview_workflow is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit preview_workflow? +

Yes. Add a rate_limit block to the preview_workflow rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block preview_workflow completely? +

Set action: deny in the PolicyLayer policy for preview_workflow. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides preview_workflow? +

preview_workflow is provided by the Sanka MCP Server MCP server (sankahq/sanka-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.