Skip to main content
Glama
sonisoft-cnanda

now-sdk-ext-mcp

Execute Flow

execute_flow
Destructive

Run a published ServiceNow Flow Designer flow by its scoped name. Use foreground mode for synchronous outputs, or background mode for flows with approval or wait steps, returning a context ID to poll for status.

Instructions

Execute a published ServiceNow Flow Designer flow by scoped name. Runs the flow using sn_fd.FlowAPI via a background script.

In foreground mode (default), the call blocks until the flow completes and returns outputs directly. In background mode, it returns immediately with a context ID that you can poll with get_flow_context_status.

IMPORTANT: Flows with approval or wait steps MUST use background mode — foreground mode will fail if the flow enters a waiting state.

NOTE: This tool requires the flow to be published. If you are iterating and building a flow that may not be published yet, use test_flow instead — it tests the flow in its current draft state, exactly as the 'Test' button in Flow Designer does.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoExecution mode. "foreground" (default) runs synchronously and returns outputs when complete. "background" returns immediately with a context ID — use get_flow_context_status to poll, then get_flow_outputs or get_flow_error to retrieve results. Use background for flows with approval/wait steps.
quickNoSkip creation of execution detail records for better performance. Default false. Use true in CI/CD or when you don't need step-level detail.
scopeNoScope context for script execution. Can be a scope name (e.g., "x_myapp_custom") or sys_id. Use when the flow is in a scoped app.
inputsNoInput name-value pairs to pass to the flow/subflow/action. Keys are the input variable names defined in Flow Designer.
timeoutNoTimeout in milliseconds for the execution. Only applies to foreground mode. Default is the ServiceNow server default (~30s).
instanceNoThe ServiceNow instance auth alias to use. This is the alias configured via `now-sdk auth --add` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable.
scoped_nameYesScoped name of the flow/subflow/action to execute (e.g., "global.my_flow", "x_myapp_custom.create_incident_subflow").
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses critical behavior beyond what annotations provide: foreground mode blocks until completion, background mode returns a context ID for polling, and foreground mode will fail on flows with waiting states. It also warns that flows must be published. These are non-obvious operational constraints that significantly aid correct invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear opening sentence, distinct paragraphs for mode behavior, and highlighted IMPORTANT/NOTE sections. Every sentence serves a purpose—purpose, mode semantics, and alternatives—without redundancy. It's appropriately sized for a complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, dual execution modes, no output schema), the description covers all key operational aspects: how to run, polling mechanism, prerequisites, and alternative tools. It addresses the main pitfalls (wait states, unpublished flows) and sufficiently orients an agent for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% parameter coverage with detailed descriptions (e.g., mode, quick, scope, inputs, timeout, instance, scoped_name). The tool description adds context about modes but does not materially enhance parameter meaning beyond what the schema already explains. Baseline 3 applies because the schema carries the burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: "Execute a published ServiceNow Flow Designer flow by scoped name." It uses a specific verb ('execute'), identifies the resource, and provides implementation detail (sn_fd.FlowAPI). It distinguishes itself from siblings by referencing test_flow and get_flow_context_status, making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is given for when to use this tool vs alternatives: flows with approval/wait steps MUST use background mode, and for unpublished flows, the description says to use test_flow instead. This directly addresses selection criteria and prevents misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/sonisoft-cnanda/now-sdk-ext-mcp'

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