{
  "version": 1,
  "tools": [
    {
      "name": "schedule_create",
      "description": "Create a scheduled automation. Always provide a concise description of what the schedule does and why. For recurring: provide expression (cron/RRULE). For one-time: provide fire_at (ISO 8601 timestamp). ONLY use this when the user explicitly wants something to run on a schedule (e.g. \"every day at 9am\", \"remind me tomorrow at 3pm\", \"weekly on Mondays\").",
      "category": "schedule",
      "risk": "medium",
      "input_schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "A human-readable name for the scheduled task"
          },
          "description": {
            "type": "string",
            "description": "Required concise authored description of what it does and why. Keep this distinct from the timing/cadence."
          },
          "syntax": {
            "type": "string",
            "enum": ["cron", "rrule"],
            "description": "Schedule syntax type for recurring schedules. Auto-detected if omitted. Ignored when fire_at is provided."
          },
          "expression": {
            "type": "string",
            "description": "Schedule expression (cron or RRULE) for recurring schedules. Not needed when fire_at is provided."
          },
          "fire_at": {
            "type": "string",
            "description": "ISO 8601 timestamp for a one-time schedule (e.g. \"2025-06-15T09:00:00Z\"). Must be in the future. When provided, expression/syntax are ignored."
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone (e.g. \"America/Los_Angeles\"). Defaults to your configured/detected timezone; the assistant's own clock only if unknown."
          },
          "message": {
            "type": "string",
            "description": "The message to send to the assistant when the schedule triggers. Required for execute and notify modes."
          },
          "script": {
            "type": "string",
            "description": "The shell command to run when the schedule triggers. Required for script mode. Runs in the workspace directory with a sanitized environment."
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the job is enabled immediately. Defaults to true."
          },
          "mode": {
            "type": "string",
            "enum": ["notify", "execute", "script", "workflow"],
            "description": "Whether to notify the user, execute autonomously via LLM, run a shell command directly (script), or run a saved workflow (workflow). Defaults to \"execute\"."
          },
          "workflow_name": {
            "type": "string",
            "description": "Name of a saved workflow to run when the schedule triggers. Required for workflow mode."
          },
          "workflow_args": {
            "type": "object",
            "description": "Arguments object passed to the saved workflow as `args`. Optional; only used in workflow mode."
          },
          "capabilities": {
            "type": "object",
            "description": "Workflow mode only. Per-run capability grant (the single consent point) persisted with the schedule and applied to each triggered run. Leaves get a read-only baseline by default. Declaring any side-effecting tool or host function requires a fresh approval at creation.",
            "properties": {
              "tools": {
                "type": "array",
                "items": { "type": "string" },
                "description": "Side-effecting tool names granted to leaves on top of the read-only baseline."
              },
              "hostFunctions": {
                "type": "array",
                "items": { "type": "string" },
                "description": "Host-function names the run may invoke."
              },
              "persona": {
                "type": "boolean",
                "description": "Grant leaves access to persona (identity + memory) context."
              }
            }
          },
          "routing_intent": {
            "type": "string",
            "enum": ["single_channel", "multi_channel", "all_channels"],
            "description": "How to route the triggered message across channels. Defaults to \"all_channels\"."
          },
          "routing_hints": {
            "type": "object",
            "description": "Additional routing metadata (e.g. preferred channel identifiers)"
          },
          "quiet": {
            "type": "boolean",
            "description": "When true, suppress completion notifications for this schedule. The job still runs and produces output, but no notification or conversation message is sent on completion. Useful for high-frequency recurring jobs that report findings separately. Defaults to false."
          },
          "reuse_conversation": {
            "type": "boolean",
            "description": "When true, reuse the same conversation across recurring schedule runs instead of creating a new one each time. Defaults to true for recurring schedules, false for one-shot. Set to false explicitly if each run should start fresh."
          },
          "max_retries": {
            "type": "integer",
            "description": "Maximum number of retries after the initial execution fails. Defaults to 3."
          },
          "retry_backoff_ms": {
            "type": "integer",
            "description": "Base backoff delay in milliseconds between retries. Exponential backoff is applied. Defaults to 60000."
          },
          "timeout_ms": {
            "type": "integer",
            "description": "For script mode: maximum time in milliseconds the shell command may run before it is killed. Defaults to 60000 (60s). Allowed range: 1000 to 1800000."
          },
          "inference_profile": {
            "type": "string",
            "description": "Inference profile (a key from llm.profiles) the schedule's LLM-executed runs should use, e.g. to run a heavy task on a cheaper model. When omitted, the schedule is pinned to the user's current default profile so its model does not change later. Must name a configured profile. Workflow-mode schedules resolve a model per workflow step, so the pin does not govern their runs."
          },
          "group": {
            "type": "string",
            "description": "Sidebar group (name or id) that conversations created by this schedule's runs are filed into, instead of the default Scheduled section. Must reference an existing group. Create one first with conversation_group_create (conversation-groups skill) if needed."
          }
        },
        "required": ["name", "description"]
      },
      "executor": "tools/schedule-create.ts",
      "execution_target": "host"
    },
    {
      "name": "schedule_list",
      "description": "List scheduled automations (recurring cron/RRULE schedules and one-time scheduled events), or show details and recent runs for a specific one.",
      "category": "schedule",
      "risk": "low",
      "input_schema": {
        "type": "object",
        "properties": {
          "enabled_only": {
            "type": "boolean",
            "description": "When true, only show enabled jobs. Defaults to false."
          },
          "job_id": {
            "type": "string",
            "description": "If provided, show detailed info and recent runs for this specific job."
          }
        },
        "required": []
      },
      "executor": "tools/schedule-list.ts",
      "execution_target": "host"
    },
    {
      "name": "schedule_update",
      "description": "Update an existing scheduled automation (expression, syntax, message, name, description, enabled state, mode, or routing)",
      "category": "schedule",
      "risk": "medium",
      "input_schema": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "description": "The ID of the schedule to update"
          },
          "name": {
            "type": "string",
            "description": "New name for the job"
          },
          "description": {
            "type": "string",
            "description": "New concise authored description of what the schedule does and why. Keep this distinct from the timing/cadence."
          },
          "syntax": {
            "type": "string",
            "enum": ["cron", "rrule"],
            "description": "Schedule syntax type. Auto-detected if omitted."
          },
          "expression": {
            "type": "string",
            "description": "New schedule expression (cron or RRULE)"
          },
          "timezone": {
            "type": "string",
            "description": "New IANA timezone"
          },
          "message": {
            "type": "string",
            "description": "New message to send when triggered (for execute/notify modes)"
          },
          "script": {
            "type": "string",
            "description": "New shell command to run when triggered (for script mode)"
          },
          "enabled": {
            "type": "boolean",
            "description": "Enable or disable the job"
          },
          "mode": {
            "type": "string",
            "enum": ["notify", "execute", "script", "workflow"],
            "description": "Whether to notify the user, execute autonomously via LLM, run a shell command directly (script), or run a saved workflow (workflow)"
          },
          "workflow_name": {
            "type": "string",
            "description": "Name of a saved workflow to run when the schedule triggers. Required when the schedule's resulting mode is workflow."
          },
          "workflow_args": {
            "type": "object",
            "description": "Arguments object passed to the saved workflow as `args`. Only used in workflow mode."
          },
          "routing_intent": {
            "type": "string",
            "enum": ["single_channel", "multi_channel", "all_channels"],
            "description": "How to route the triggered message across channels"
          },
          "routing_hints": {
            "type": "object",
            "description": "Additional routing metadata (e.g. preferred channel identifiers)"
          },
          "quiet": {
            "type": "boolean",
            "description": "When true, suppress completion notifications for this schedule. Useful for high-frequency jobs that report findings separately."
          },
          "reuse_conversation": {
            "type": "boolean",
            "description": "When true, reuse the same conversation across recurring schedule runs instead of creating a new one each time. Defaults to true for recurring schedules. Set to false explicitly if each run should start fresh."
          },
          "max_retries": {
            "type": "integer",
            "description": "Maximum number of retries after the initial execution fails. Defaults to 3."
          },
          "retry_backoff_ms": {
            "type": "integer",
            "description": "Base backoff delay in milliseconds between retries. Exponential backoff is applied. Defaults to 60000."
          },
          "timeout_ms": {
            "type": ["integer", "null"],
            "description": "For script mode: maximum time in milliseconds the shell command may run before it is killed (default 60000, range 1000 to 1800000). Pass null to clear a custom timeout and revert to the default."
          },
          "inference_profile": {
            "type": ["string", "null"],
            "description": "Inference profile (a key from llm.profiles) the schedule's LLM-executed runs should use. Pass null to re-pin the schedule to the user's current default profile. Must name a configured profile. Workflow-mode schedules resolve a model per workflow step, so the pin does not govern their runs."
          },
          "group": {
            "type": ["string", "null"],
            "description": "Sidebar group (name or id) that conversations created by future runs are filed into. Pass null to revert to the default Scheduled section. Existing conversations stay where they are; move them with conversation_move_to_group if asked."
          }
        },
        "required": ["job_id"]
      },
      "executor": "tools/schedule-update.ts",
      "execution_target": "host"
    },
    {
      "name": "schedule_delete",
      "description": "Delete a scheduled automation and all its run history",
      "category": "schedule",
      "risk": "high",
      "input_schema": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "description": "The ID of the schedule to delete"
          }
        },
        "required": ["job_id"]
      },
      "executor": "tools/schedule-delete.ts",
      "execution_target": "host"
    }
  ]
}
