Skip to main content
Glama

Publish Workflow

workflow.publish
Destructive

Publish a workflow's draft as a new version and turn it on. Confirm with the user before calling it. When the draft has errors nothing is published and the workflow stays as it was: errors say what to fix. When the agent this app signs in as has Ask first on for this, the call waits for its manager's approval and returns status: "pending_approval"; nothing changes until they approve. Pass reason (and targetNotes per target) so the approver sees why.

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": {
      "workflowId": "<workflowId>"
    },
    "name": "workflow.publish"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoWhy you are doing this, in one sentence the approver reads if Ask first holds the call
workflowIdYes
targetNotesNoA short note per target, keyed by the id or Index you pass

Output Schema

NameRequiredDescriptionDefault
nameNo
errorsNoWhy it was not published; fix them with workflow.update
statusNoThe call waits for a person's approval; nothing has changed
messageNo
versionNo
approverNoWho decides it
isActiveNo
warningsNo
publishedNo
approvalIdNoThe approval the call waits on
workflowIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why you are doing this, in one sentence the approver reads if Ask first holds the call",
      +  "type": "string"
      +}
    • addedInput schema / properties / targetNotes
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "A short note per target, keyed by the id or Index you pass",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • addedOutput schema / properties / approvalId
      Added value: +{
      +  "description": "The approval the call waits on",
      +  "type": "string"
      +}
    • addedOutput schema / properties / approver
      Added value: +{
      +  "description": "Who decides it",
      +  "type": "string"
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "const": "pending_approval",
      +  "description": "The call waits for a person's approval; nothing has changed",
      +  "type": "string"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "workflowId",
      -  "name",
      -  "published",
      -  "errors",
      -  "warnings",
      -  "isActive"
      -]
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the annotations: it discloses the failure mode (errors block publication, the workflow stays as it was), the approval-hold path returning status "pending_approval" with no state change until approved, and that the call waits. Those are exactly the operational traits destructiveHint and openWorldHint cannot convey.

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?

Front-loads the action, then the confirmation rule, then the two branch behaviors, then the parameter advice. No filler sentences and no repetition of the annotations.

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 an output schema present, the description only needs to flag the non-obvious return branches, and it names both the errors case and the pending_approval case. An agent has everything required to call it safely and interpret the result.

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 67% and both described parameters already carry their meaning in the schema, so the sentence about passing reason and targetNotes largely restates it. It does tie the fields to the approval audience, which helps slightly, but adds no format or keying detail beyond the schema.

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 precise verb and resource plus the resulting state change: publish the draft as a new version and turn it on. That distinguishes it from workflow.unpublish, workflow.toggle, and the app/view publish siblings without any schema lookups.

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?

Gives an explicit pre-call rule (confirm with the user first) and an implied precondition (draft must be error-free). It does not name an alternative for the case where the agent merely wants to enable or disable an existing version, which is why it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources