Skip to main content
Glama
sonisoft-cnanda

now-sdk-ext-mcp

Execute Subflow

execute_subflow
Destructive

Execute a ServiceNow Flow Designer subflow by scoped name. Provide inputs as key-value pairs and choose foreground mode for outputs or background mode for approval steps.

Instructions

Execute a ServiceNow Flow Designer subflow by scoped name. Subflows are reusable building blocks in Flow Designer — this is the primary tool for testing subflows during development.

In foreground mode (default), the call blocks until the subflow completes and returns outputs directly. In background mode, it returns a context ID for polling with get_flow_context_status.

Pass inputs as key-value pairs matching the subflow's input variables.

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").
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnly=false. The description adds valuable behavioral detail: foreground blocks until completion and returns outputs, background returns a context ID for polling, and quick mode skips execution detail records. It also clarifies that timeout only applies to foreground. This goes beyond annotations without contradicting them.

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 four sentences, front-loaded with the core purpose and then expanding into mode behavior and input passing. Every sentence provides necessary context with no fluff. It's efficiently structured and easy to scan.

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

Completeness4/5

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

The tool has 7 parameters with no output schema, but the description explains the key behavioral concepts: foreground vs. background, timeout scoping, and quick mode. It also points to follow-up tools for polling and retrieval. Minor gaps exist (e.g., error handling), but there are dedicated sibling tools for that, and the description is sufficiently complete for a complex execution tool.

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?

Schema coverage is 100%, so all parameters have descriptions. The description adds a general note on passing inputs as key-value pairs, but this is already reflected in the inputs parameter schema. While the description doesn't rehash every parameter, it doesn't need to; the schema does the heavy lifting, so a baseline 3 is appropriate.

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 'Execute a ServiceNow Flow Designer subflow by scoped name' — a specific verb and resource. It differentiates from siblings by explicitly calling out subflows as 'reusable building blocks' and positions itself as 'the primary tool for testing subflows during development,' distinguishing it from execute_flow and execute_action.

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

Usage Guidelines4/5

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

The description provides clear usage context: foreground vs. background modes, with background explicitly recommended 'for flows with approval/wait steps.' It also references get_flow_context_status for polling, but it doesn't explicitly name alternatives like execute_flow or execute_action or state when not to use this tool. This is strong guidance but lacks explicit exclusions.

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