Skip to main content
Glama

Set workflow agent

set_workflow_agent
DestructiveIdempotent

Assign an agent to a workflow. Use when workflows are paused or agentless; optionally verify base_version to avoid conflicts.

Instructions

Assign one of your agents to a workflow. Use this after delete_agent reports paused workflows, or when run_workflow returns workflow_agentless. If base_version is omitted, this tool reads the workflow's current version before it assigns the agent. A supplied stale base_version is rejected with the current version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe UUID of one of your agents to assign.
workflow_idYesThe workflow's UUID.
base_versionNoOptional workflow current_version to compare before assignment. Omit it to use the current version.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesA short confirmation of the assignment.
versionYesThe workflow current_version checked for this assignment.
agent_idYesThe account-owned agent assigned to the workflow.
workflow_idYesThe workflow whose agent changed.
agent_deleted_atYesAlways null after assigning an agent: the workflow is no longer marked agentless.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.16.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is partly covered. The description adds meaningful concurrency behavior: omitting base_version triggers a read of the current version, and a stale version is rejected with the current version returned. It does not clarify what the destructive aspect is (e.g., whether an existing agent is replaced), so it falls short of a 5.

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?

Four short sentences, zero filler, with the primary action front-loaded and the conditional triggers and version behavior following in order of relevance.

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?

Output schema and rich annotations carry the return-value and safety burden, and the description supplies triggers plus version semantics. The one gap is not stating the effect on any currently assigned agent, which matters for a destructive mutation.

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 is 3, but the description goes beyond the schema by explaining base_version's optimistic-concurrency semantics: omission means read-then-assign, and a stale value is rejected with the current version. That is real added meaning for the least obvious parameter.

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?

States a specific verb and resource: 'Assign one of your agents to a workflow.' Clear enough to distinguish from siblings like create_workflow or run_workflow, though it does not explicitly contrast itself against a competing assignment tool.

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 explicit triggers: 'Use this after delete_agent reports paused workflows, or when run_workflow returns workflow_agentless.' It names the exact sibling tools and the conditions that route the agent here, leaving little to inference.

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