Skip to content
Charming Docs
Esc
navigateopen⌘Jpreview
On this page

List Routines

Use this to see the caller's Routines across their apps.

MCP name: list_routines

Tool contract

{
  "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "List Routines"
  },
  "description": "Use this to see the caller's Routines across their apps.",
  "execution": {
    "taskSupport": "forbidden"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {},
    "type": "object"
  },
  "name": "list_routines",
  "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"
      },
      "routines": {
        "description": "The caller's Routines across their apps.",
        "items": {
          "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"
        },
        "type": "array"
      }
    },
    "required": [
      "ok",
      "routines"
    ],
    "type": "object"
  }
}

Was this page helpful?