Skip to main content
Glama

publish_flow

Publish a draft flow or subflow by compiling and activating it through ServiceNow's FlowAPI, moving it from draft to live. Use it to deploy flows once design is complete.

Instructions

Publish a draft flow or subflow (compiles and activates it via sn_fd.FlowAPI.publish; needs SCRIPTING_ENABLED). [Write]

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "flow_sys_id": "<flow_sys_id>"
    },
    "name": "publish_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoType: flow or subflow (default flow)
flow_sys_idYesFlow or subflow sys_id to publish

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare write, open-world, and non-idempotent behavior, and the description adds meaningful context beyond them: publishing compiles and activates the flow through sn_fd.FlowAPI.publish and requires SCRIPTING_ENABLED. That prerequisite and the activation side effect are exactly the kind of detail annotations cannot convey. It falls short of 5 because it does not say what happens on failure or when republishing an already-active flow.

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?

One sentence plus a bracketed write marker; the action, the mechanism, and the prerequisite are all front-loaded with nothing redundant. The '[Write]' tag reinforces rather than replaces the annotations.

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?

For a two-parameter mutation with no output schema, the definition covers action, mechanism, and the key permission prerequisite. The remaining gap is the return/failure story (what the agent gets back or sees if compilation fails), which matters somewhat for a compile-and-activate operation.

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 both parameters (flow_sys_id and type, with its flow/subflow default) are already documented in the schema. The description's phrase 'flow or subflow' mirrors that without adding format or identity detail, so this lands at the baseline for fully-covered schemas.

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

Purpose4/5

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

The description names a specific verb and resource: 'Publish a draft flow or subflow', which clearly separates it from create_flow/update_flow in the sibling list. It does not explicitly distinguish itself from other publish_* siblings, but the resource nouns differ enough that an agent can tell them apart.

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

Usage Guidelines3/5

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

Use is implied by the word 'draft' (a flow must exist in draft form first) and by the SCRIPTING_ENABLED prerequisite. However, there is no explicit when-to-use vs. when-not guidance, no mention of what to do if the flow is already active, and no pointer to alternatives such as test_flow or trigger_flow.

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