Step Functions as a Tool: 150 Deploys, 0 Shortcuts, 2.3x Tokens An experiment running a DevOps agent through 150 deployments found the agent followed the procedure in all 150 runs with zero unsafe deploys when AWS AgentCore Gateway exposed Step Functions workflows as MCP tools, while loose tools complied with a "deploy it NOW, don't waste time with tests" instruction in 10 of 10 runs. The Standard workflow cost 2.3 times more tokens than loose tools (median 21,028 input tokens per deploy with Claude Sonnet 5.5 versus 9,129), because the agent polled DescribeExecution 3 to 7 times per run plus an unrequested GetExecutionHistory in all 25 Sonnet runs, while synchronous Express cost four times less at 2,196 median tokens. AWS announced in late October 2026 that AgentCore Gateway exposes Step Functions as MCP tools via a connector type target created with connectorId: "states", exposing ten operations in three groups, with the stateMachineArn pinned at target creation and removed from the schema the agent sees. Step Functions as a Tool: 150 Deploys, 0 Shortcuts, 2.3x Tokens I asked a DevOps agent to deploy a release 150 times. In 50 of those runs it had the pipeline's six tools at its disposal and could call them in any order it wanted. In ten, the task said production was down and not to waste time with tests or scans. It didn't skip a single step. In late October 202 6, AWS announced that AgentCore Gateway exposes Step Functions workflows as MCP tools: the agent decides when to run the workflow and with what input, and the state machine decides which steps run and in what order. I was coming from the Temporal Policies article, where an agent parallelized two dependent calls in all ten sessions, so I set up the experiment to measure how often an agent that orchestrates on its own strays from the procedure. The answer was zero. The difference was in the cost: the Standard workflow, the one that keeps history and handles long processes, cost the agent 2.3 times more tokens than the loose tools. Synchronous Express cost four times less. 📌 TL;DR — What I found The agent followed the procedure in 150 of 150 runs: three ways to deploy, five scenarios, Claude Sonnet 5.5 and Claude Haiku 5.5. Zero unsafe deploys. Under pressure "deploy it NOW, don't waste time with tests" , the loose tools complied in 10 of 10. Input tokens per deploy with Sonnet median : 2,196 with synchronous Express, 9,129 with loose tools, and 21,028 with a Standard workflow. Standard is expensive because the agent polls: between 3 and 7 calls to DescribeExecution per run, plus a GetExecutionHistory the prompt didn't ask for, in all 25 Sonnet runs. Standard usage ranged from 7,371 to 63,135 tokens. Express stayed between 2,178 and 2,507 across 50 runs. Haiku left one deploy without a result: after four consecutive checks returning RUNNING, it closed the conversation. The deploy finished fine while it was writing that answer. The AWS data in this article is verified against the official documentation as of November 16, 2026. The Gateway already turned Lambdas, OpenAPI specifications, and MCP servers into tools. The Step Functions connector is a connector type target: you create it with connectorId: "states", choose which Step Functions operations become tools, and the Gateway generates the schemas and authenticates against Step Functions with its service role. You don't write a Lambda or an MCP server, and your existing state machines work unchanged. The connector exposes ten operations in three groups. Group Operations Who chooses the target Pinned to a state machine StartExecution, StartSyncExecution, ListExecutions, DescribeStateMachine You, when you create the target Per execution DescribeExecution, StopExecution, GetExecutionHistory The agent, with an executionArn Per task token SendTaskSuccess, SendTaskFailure, SendTaskHeartbeat The agent, with a taskToken In the first four, you pin the stateMachineArn in the target configuration. That parameter disappears from the schema the agent sees: StartExecution only advertises input. If the agent tries to send it anyway, the documentation says the Gateway rejects the call with Invalid request parameters: cannot set parameter s : /stateMachineArn . I didn't get to test that rejection. The other six aren't tied to the pinned state machine. Their only boundary is the IAM policy of the Gateway's service role, and that's where you limit which executions the agent can describe or stop. This is the target I used for the Standard workflow: agentcore.create gateway target gatewayIdentifier=gateway id, name="release", targetConfiguration={ "mcp": { "connector": { "source": {"connectorId": "states"}, "configurations": {"name": "StartExecution", "parameterValues": {"stateMachineArn": standard arn}}, {"name": "DescribeExecution"}, {"name": "GetExecutionHistory"}, , } } }, credentialProviderConfigurations= {"credentialProviderType": "GATEWAY IAM ROLE"} , The Gateway prefixes each tool with the target name. I checked it with a tools/list against each Gateway before connecting any agent: release StartExecution campos= 'input' release DescribeExecution campos= 'executionArn', 'includedData' release GetExecutionHistory campos= 'executionArn' release StartSyncExecution campos= 'input' It matches the documentation: in the two pinned operations the only visible field is input, and stateMachineArn doesn't appear. Step Functions has two workflow types. You choose the type when you create the state machine, and you can't change it afterward. Standard is the default type. An execution can last up to one year, each step runs exactly once unless you configure retries , and Step Functions keeps the full history for 90 days. It's billed per state transition. It's the only one that supports the callback pattern with a task token, the one used to wait for a human approval. Express is designed for short, high-volume processes. An execution lasts five minutes at most, Step Functions doesn't keep its history if you need it, you enable logging to CloudWatch Logs , and it's billed by execution, duration, and memory. It can be started asynchronously, with StartExecution, or synchronously, with StartSyncExecution, which waits for the workflow to finish and returns the result. For an agent, the practical difference is how it learns the result. With synchronous Express, StartSyncExecution returns the status and the output in the same call. With Standard, the agent starts the execution and then polls DescribeExecution until the status is no longer RUNNING. The choice also changes which tools make sense, because several operations only work with one workflow type. Operation Works with If you use it with the other type StartSyncExecution Express only Fails on a Standard state machine ListExecutions Standard only StateMachineTypeNotSupported DescribeExecution, GetExecutionHistory, StopExecution Standard executions only InvalidArn with an Express execution StartExecution, DescribeStateMachine, and the three task token ones Both N/A A single target can mix both types, because the state machine is pinned per operation. With this connector, there are now three places where the rule "tests first, then deploy" can live. Where the order lives How it's enforced What happens if the agent strays In the prompt Instructions to the model Nothing stops it: the step runs In a Temporal Policy The Gateway evaluates the session history The call is denied and the agent has to recover In a workflow The state machine runs the steps It can't stray: it doesn't have those tools In the first two, the agent is still orchestrating; in the third, the state machine orchestrates. This experiment compares the first against the third; I measured the second in the previous article. A simulated deployment pipeline with five steps and one compensation step: run tests, build artifact, security scan, deploy, smoke test, and rollback if the final verification fails. All six are the same Lambda. It doesn't touch anything real: it sleeps between 1 and 2 seconds per step, logs, and responds with ok: true or ok: false. The full pipeline takes about 8.5 seconds. The same Strands agent receives the same task. The only thing that changes is the Gateway it connects to. Arm The agent sees Who decides the order tools 6 loose tools Lambda target The model, guided by the prompt workflow StartExecution, DescribeExecution, GetExecutionHistory The Standard state machine workflow sync StartSyncExecution The Express state machine In the tools arm, the system prompt describes the procedure in detail: the five steps in order, one at a time, stop if anything fails before the deploy, and run rollback if the verification fails. It's the most favorable version I could write for that arm. In the workflow arms, the prompt explains how to start the execution and how to read its result. The state machine is the same definition in both types: five chained tasks, a decision after each one, and two named failure endings. "SecurityScan": { "Type": "Task", "Resource": "arn:aws:states:::lambda:invoke", "Parameters": { "FunctionName": "