Update Routine
Use this to change a Routine's `interval`, or enable/disable it.
MCP name: update_routine
Tool contract
{
"annotations": {
"destructiveHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Update Routine"
},
"description": "Use this to change a Routine's `interval`, or enable/disable it. Re-enable is `{enabled: true}` — there is no separate re-enable action. Re-enabling also resets the consecutive-failure counter.",
"execution": {
"taskSupport": "forbidden"
},
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"enabled": {
"description": "`true` re-enables the Routine; `false` disables it (owner-disabled)",
"type": "boolean"
},
"interval": {
"description": "New schedule interval",
"enum": [
"hourly",
"daily",
"weekly"
],
"type": "string"
},
"routine_id": {
"description": "The Routine id (`routine_<uuid>` form) to update",
"minLength": 1,
"type": "string"
}
},
"required": [
"routine_id"
],
"type": "object"
},
"name": "update_routine",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"ok": {
"const": true,
"description": "Indicates success. Errors arrive as content with isError:true.",
"type": "boolean"
},
"routine": {
"additionalProperties": false,
"properties": {
"app_id": {
"description": "UUID of the app this Routine runs on.",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"type": "string"
},
"consecutive_failures": {
"description": "Consecutive failed ticks since the last success. Resets to 0 on success; the Routine auto-disables at 5.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"disabled_reason": {
"anyOf": [
{
"enum": [
"owner",
"auto"
],
"type": "string"
},
{
"type": "null"
}
],
"description": "Why the Routine is disabled: `owner` (manually) or `auto` (5 consecutive failures). `null` when enabled."
},
"enabled": {
"description": "`false` when the Routine is disabled (owner-disabled or auto-disabled).",
"type": "boolean"
},
"id": {
"description": "Public Routine id, `routine_<uuid>` form. Use this with update_routine/delete_routine.",
"type": "string"
},
"interval": {
"description": "How often the Routine runs.",
"enum": [
"hourly",
"daily",
"weekly"
],
"type": "string"
},
"last_error": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"kind",
"message"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "Classified failure detail from the most recent failed tick, reusing the sandbox executor's failure classification, truncated with the stack always dropped. `null` on success or if never run."
},
"last_outcome": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Result of the most recent tick (`success` or `failure`). `null` if this Routine has never run."
},
"last_run_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ISO-8601 timestamp of the most recent tick. `null` if this Routine has never run."
},
"next_run_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ISO-8601 timestamp of the next scheduled run. `null` while the Routine is disabled — the underlying schedule is preserved and reappears here once re-enabled, with no recomputation."
},
"op": {
"description": "The target op this Routine invokes with empty input.",
"type": "string"
}
},
"required": [
"id",
"app_id",
"op",
"interval",
"enabled",
"disabled_reason",
"next_run_at",
"last_run_at",
"last_outcome",
"last_error",
"consecutive_failures"
],
"type": "object"
}
},
"required": [
"ok",
"routine"
],
"type": "object"
}
}