Skip to main content
Glama
now-sdk-ext-mcp

now-sdk-ext-mcp

Get Workflow

get_workflow
Read-only

Retrieve a legacy workflow version's definition as JSON, including activities, exits, variable values, transitions, stages, and editor status.

Instructions

Read one legacy workflow version's definition as JSON: its activities with their exits (and variable values), transitions, stages and editor status. For a readable view use outline_workflow.

Input Schema

NameRequiredDescriptionDefault
versionNoWhich version: current (default: your draft if you have one, else the published one), published, or draft. Ignored when workflow is a version sys_id.
instanceNoThe ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (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.
workflowYesThe workflow's name or sys_id, or a workflow version sys_id.
include_variablesNoInclude each activity's variable values (scripts included). Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful behavioral context by saying the output is raw JSON and what it contains (variable values including scripts), though it says nothing about response size or limits for large workflows.

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?

Two tight sentences, both front-loaded with the core purpose first and the sibling routing second. Nothing is redundant or padded.

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?

With no output schema, the description carries the burden of describing the return payload, and it does so by naming the constituent parts. It leaves out any note on payload size or nesting depth, a minor gap for a definition-dump tool with four parameters.

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 version, instance, workflow, and include_variables are all documented in the schema. The description's mention of "one ... version" and "(and variable values)" restates rather than extends the schema's own explanation of version and include_variables, so baseline 3 applies.

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 uses a specific verb ("Read") on a specific resource ("one legacy workflow version's definition") and enumerates the returned structure: activities with exits, transitions, stages, and editor status. The word "legacy" and the pointer to outline_workflow distinguish it from related siblings without needing to open a schema.

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?

It explicitly routes the agent to outline_workflow when a readable view is wanted, which is a concrete alternative with a selecting condition. It does not, however, address when to prefer get_flow_definition for non-legacy flows, nor any exclusions for version selection.

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

Deploy Server

Other Tools