Skip to main content
Glama
sonisoft-cnanda

now-sdk-ext-mcp

Test Flow (Flow Designer)

test_flow
Destructive

Test a ServiceNow Flow Designer flow in its draft state without publishing. Invoke the Test API to validate trigger outputs and iterate quickly.

Instructions

Test a ServiceNow Flow Designer flow without requiring it to be published. This is the PRIMARY tool to use when building and iterating on a flow — it invokes the same API as the 'Test' button in Flow Designer, running the flow in its current saved (draft) state.

Unlike execute_flow (which requires a published flow and uses sn_fd.FlowAPI), test_flow works on unpublished drafts via the ProcessFlow REST API (POST /api/now/processflow/flow/{id}/test).

Provide the flow's sys_id or scoped name in flow_id, and supply trigger output variable values in output_map. For record-triggered flows this is typically { "current": "", "table_name": "" }. Check the flow's trigger configuration in Flow Designer to determine the correct variable names.

The tool returns a context ID on success — use get_flow_context_status to poll the execution, then get_flow_outputs or get_flow_error once complete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoScope sys_id for the transaction scope query parameter. If omitted, the scope is auto-resolved from the flow definition.
flow_idYesFlow sys_id (32-char hex) or scoped name (e.g., "x_myapp.my_flow"). The flow does not need to be published.
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.
output_mapYesMaps trigger output variable names to concrete test values. Keys are the variable names defined in the flow's trigger configuration in Flow Designer. For record-triggered flows: { "current": "<record_sys_id>", "table_name": "<table>" }. Open the flow in Flow Designer and inspect the trigger to see the available variable names.
run_on_threadNoWhether to run the test synchronously on the current thread. Default: true.
Behavior4/5

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

The description discloses key behavioral traits beyond the annotations: it runs the flow in its current saved (draft) state and uses the ProcessFlow REST API endpoint. It also notes that a context ID is returned for polling. While the destructiveHint annotation warns of possible side effects, the description doesn't explicitly elaborate on potential data modifications, but the draft-state emphasis and API detail add meaningful context.

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

Conciseness4/5

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

The description is a bit long but every sentence contributes: it states the core function, primary use case, comparison with execute_flow, API details, parameter guidance, and next steps. The logical flow is clear, and no filler is present. It could be slightly tightened, but it is well-structured and front-loaded with the most important information.

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 (testing flows), the description covers all essential aspects: what it does, when to use it, how to invoke it with parameter examples, what it returns (context ID), and what to do next. There is no output schema, but the description explicitly guides follow-up polling and retrieval, making it complete for an agent to use correctly.

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

Parameters4/5

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

Although the schema descriptions cover 100% of parameters, the tool description adds extra meaning by explaining output_map with a concrete example for record-triggered flows and detailing flow_id formats. It also hints at the scope auto-resolution behavior, which supplements the schema's brief description. This goes beyond simply restating parameter names.

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 purpose: 'Test a ServiceNow Flow Designer flow without requiring it to be published.' It uses a specific verb ('test'), names the resource ('Flow Designer flow'), and distinguishes itself from execute_flow by noting it works on unpublished drafts. This is a strong, specific statement.

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?

The description explicitly positions test_flow as 'the PRIMARY tool to use when building and iterating on a flow' and contrasts it with execute_flow, which requires a published flow. It also recommends follow-up tools (get_flow_context_status, get_flow_outputs, get_flow_error) and provides example input for record-triggered flows, giving clear when-to-use and how-to-proceed guidance.

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