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

now-sdk-ext-mcp

Get Flow Definition

get_flow_definition
Read-only

Reads design-time definitions of ServiceNow Flow Designer flows, subflows, and actions, including trigger, steps, logic, inputs, and outputs. Use to inspect what an artifact is, not what a run did.

Instructions

Read the design-time definition of a Flow Designer flow, subflow or action as Workflow Studio stores it: its trigger, steps, flow logic, inputs and outputs. What the artifact IS, not what a run of it did (for that, use get_flow_execution_details). Nothing is run, published or changed. The type is never inferred: a sys_id of another type fails with type_mismatch.

Input Schema

NameRequiredDescriptionDefault
typeNoWhat the sys_id is. Default flow.
viewNosummary (default): name, scope, state and counts, plus an action's steps. full: the complete definition as compact JSON (a long one is cut, and then is not valid JSON).
scopeNoThe application scope to read it in, when it is not global.
sys_idYesThe flow's or subflow's sys_hub_flow sys_id, or the action's sys_hub_action_type_definition 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.5.0

TDQS

A4.7/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 reinforces it with 'Nothing is run, published or changed'. It adds genuine behavioral context the annotations cannot express: type is never inferred and a mismatched sys_id fails with type_mismatch. It stops short of describing return shape beyond the field list, which keeps it at a 4.

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?

Three tight sentences, front-loaded with the core purpose, then the sibling exclusion, then the safety/error caveats. No repetition of the title or filler.

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?

With no output schema, the description still tells the agent what comes back (trigger, steps, flow logic, inputs, outputs) and covers the failure mode an agent is most likely to hit. Nothing needed to invoke it correctly is missing.

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?

Schema coverage is 100%, so the baseline would be 3, but the description earns extra credit by explaining the semantics of the `type` parameter: it is not inferred from the sys_id and a wrong value produces type_mismatch. That is meaning an agent cannot get from the enum alone.

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?

States a specific verb and resource ('Read the design-time definition of a Flow Designer flow, subflow or action') and enumerates what the definition contains (trigger, steps, flow logic, inputs, outputs). It explicitly distinguishes itself from the sibling get_flow_execution_details, so an agent can route correctly without opening either schema.

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?

Gives an explicit contrast: 'What the artifact IS, not what a run of it did (for that, use get_flow_execution_details)'. That is a named alternative plus the condition that selects it, which is the strongest form of routing guidance.

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