MCP tool
complete_agent_step
Settle one pending non-execute step exactly once. A completed step may carry structured output; a failed step must carry an error and blocks the run. Execute steps reject this endpoint: they are atomically claimed and settled only by the governed AdBuyMCP route that performs the approved action.
Input
Pass fields from this schema as the tool arguments. Runtime ownership, product scope and readiness checks still apply.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"stepId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"status": {
"type": "string",
"enum": [
"completed",
"failed"
]
},
"output": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"error": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
},
"required": [
"stepId",
"status"
]
}REST mapping and authority
The tool wraps this REST endpoint. The mapping identifies path/query/body transformations and approval or idempotency headers.
{
"method": "POST",
"path": "/api/v1/agent/steps/{stepId}/complete",
"pathFields": [
"stepId"
],
"pathSchema": {
"type": "object",
"properties": {
"stepId": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"additionalProperties": false,
"required": [
"stepId"
]
},
"pathEncoding": "encodeURIComponent for each path field",
"governedAction": null,
"headers": {},
"bodySchema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"completed",
"failed"
]
},
"output": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"error": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
},
"additionalProperties": false,
"required": [
"status"
]
},
"responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
}Output
This is the registered MCP output envelope. Nested fields are only modeled where the schema explicitly defines them.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"step": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"step"
],
"additionalProperties": {}
}Safety annotations
{
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": true,
"openWorldHint": false
}Annotations help a client present the tool. The API independently enforces authorization and exact action approvals. Error and retry guidance →