[
  {
    "description": "Send/manage channel messages. Supports actions: send.",
    "inputSchema": {
      "properties": {
        "accountId": {
          "type": "string"
        },
        "action": {
          "description": "Select one action. For action=\"send\", provide message or another send payload; fields for other actions do not count as send content.",
          "enum": ["send"],
          "type": "string"
        },
        "asDocument": {
          "description": "Alias for forceDocument.",
          "type": "boolean"
        },
        "asVoice": {
          "type": "boolean"
        },
        "attachments": {
          "description": "Attachments; each uses media.",
          "items": {
            "properties": {
              "media": {
                "type": "string"
              },
              "mimeType": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "enum": ["image", "audio", "video", "file"],
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "buffer": {
          "description": "Base64/data-URL attachment.",
          "type": "string"
        },
        "caption": {
          "type": "string"
        },
        "channel": {
          "type": "string"
        },
        "contentType": {
          "type": "string"
        },
        "dryRun": {
          "type": "boolean"
        },
        "effect": {
          "description": "Alias for effectId.",
          "type": "string"
        },
        "effectId": {
          "description": "sendWithEffect id/name.",
          "type": "string"
        },
        "filename": {
          "type": "string"
        },
        "forceDocument": {
          "description": "Send media as document; no compression.",
          "type": "boolean"
        },
        "gatewayToken": {
          "type": "string"
        },
        "gatewayUrl": {
          "type": "string"
        },
        "gifPlayback": {
          "type": "boolean"
        },
        "media": {
          "description": "Media URL/path. data: use buffer.",
          "type": "string"
        },
        "message": {
          "description": "Text for action=\"send\". A send needs message or another send payload such as media, attachments, or presentation.",
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "quoteText": {
          "description": "Telegram reply quote text.",
          "type": "string"
        },
        "replyTo": {
          "type": "string"
        },
        "silent": {
          "type": "boolean"
        },
        "target": {
          "description": "Recipient/channel: E.164 for WhatsApp/Signal, Telegram chat id/@username, Discord/Slack/Mattermost <channelId|user:ID|channel:ID>, or iMessage handle/chat_id",
          "type": "string"
        },
        "targets": {
          "items": {
            "description": "Recipient/channel targets (same format as --target); accepts ids or names when the directory is available.",
            "type": "string"
          },
          "type": "array"
        },
        "threadId": {
          "type": "string"
        },
        "timeoutMs": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": ["action"],
      "type": "object"
    },
    "name": "message",
    "type": "function"
  },
  {
    "description": "List ids allowed for `sessions_spawn(runtime:\"subagent\")`.",
    "inputSchema": {
      "additionalProperties": false,
      "properties": {},
      "required": [],
      "type": "object"
    },
    "name": "agents_list",
    "type": "function"
  },
  {
    "description": "Spawn clean child; default `runtime=\"subagent\"`. `mode=\"run\"` one-shot background. `visible=true`: persistent dashboard session; subagent only; omit `mode` (no `mode=\"run\"`), `thread`, `thinking`, `lightContext`, `attachments`, `attachAs`; inherited tool allow/denylist blocks it at spawn with no config override. Session listing/addressing obeys `tools.sessions.visibility` (`tree` default: current + own spawn subtree). Inherits parent workspace. Native task arrives as first `[Subagent Task]`. Native transcript needed: `context=\"fork\"`; else omit/isolated. Use fresh child for sidecar/parallel batch reads, multi-step search, data collection; avoid quick lookup/single read unless policy prefers. After spawn, do non-overlap work while run result returns.",
    "inputSchema": {
      "properties": {
        "agentId": {
          "type": "string"
        },
        "attachAs": {
          "description": "Attachment mount hint; unavailable with visible=true.",
          "properties": {
            "mountPath": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "attachments": {
          "description": "Inline snapshots; unavailable with visible=true.",
          "items": {
            "properties": {
              "content": {
                "type": "string"
              },
              "encoding": {
                "enum": ["utf8", "base64"],
                "type": "string"
              },
              "mimeType": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": ["name", "content"],
            "type": "object"
          },
          "maxItems": 50,
          "type": "array"
        },
        "cleanup": {
          "description": "Hidden session cleanup; visible=true always keeps the session.",
          "enum": ["delete", "keep"],
          "type": "string"
        },
        "context": {
          "description": "Native: omit/isolated clean; fork only needing requester transcript; visible fork requires same agent.",
          "enum": ["isolated", "fork"],
          "type": "string"
        },
        "cwd": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "lightContext": {
          "description": "Light bootstrap; subagent only; unavailable with visible=true.",
          "type": "boolean"
        },
        "mode": {
          "description": "\"run\" one-shot. Omit with visible=true; visible sessions are persistent.",
          "enum": ["run"],
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "runtime": {
          "description": "Runtime; visible=true requires \"subagent\".",
          "enum": ["subagent"],
          "type": "string"
        },
        "sandbox": {
          "enum": ["inherit", "require"],
          "type": "string"
        },
        "task": {
          "type": "string"
        },
        "taskName": {
          "description": "Stable later-target alias; starts lowercase letter; then lowercase/digit/_/-.",
          "type": "string"
        },
        "thinking": {
          "description": "Thinking override; unavailable with visible=true.",
          "type": "string"
        },
        "visible": {
          "description": "Persistent UI session; subagent only; omit mode/thread/thinking/lightContext/attachments/attachAs; unavailable with inherited tool allow/denylist.",
          "type": "boolean"
        },
        "worktree": {
          "description": "Visible session worktree",
          "type": "boolean"
        },
        "worktreeBaseRef": {
          "description": "Worktree base ref",
          "type": "string"
        },
        "worktreeName": {
          "description": "Worktree name",
          "type": "string"
        }
      },
      "required": ["task"],
      "type": "object"
    },
    "name": "sessions_spawn",
    "type": "function"
  },
  {
    "description": "End turn after subagent spawn; results arrive next message.",
    "inputSchema": {
      "properties": {
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "sessions_yield",
    "type": "function"
  },
  {
    "description": "",
    "name": "openclaw",
    "tools": [
      {
        "deferLoading": true,
        "description": "Paired nodes: status/list with active-computer presence; pass node to describe/control. Pairing, notify, camera/photos/screen/location/notifications, executable lookup (which + bins), generic invoke. Files: file_fetch.",
        "inputSchema": {
          "properties": {
            "action": {
              "enum": [
                "status",
                "describe",
                "pending",
                "approve",
                "reject",
                "notify",
                "camera_snap",
                "camera_list",
                "camera_clip",
                "photos_latest",
                "screen_record",
                "screen_snapshot",
                "location_get",
                "notifications_list",
                "notifications_action",
                "device_status",
                "device_info",
                "device_permissions",
                "device_health",
                "which",
                "invoke"
              ],
              "type": "string"
            },
            "bins": {
              "description": "which: executable names to resolve on the selected node.",
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array"
            },
            "body": {
              "type": "string"
            },
            "delayMs": {
              "minimum": 0,
              "type": "integer"
            },
            "delivery": {
              "enum": ["system", "overlay", "auto"],
              "type": "string"
            },
            "desiredAccuracy": {
              "enum": ["coarse", "balanced", "precise"],
              "type": "string"
            },
            "deviceId": {
              "type": "string"
            },
            "duration": {
              "type": "string"
            },
            "durationMs": {
              "maximum": 300000,
              "minimum": 1,
              "type": "integer"
            },
            "facing": {
              "description": "camera_snap: front/back/both; camera_clip: front/back only.",
              "enum": ["front", "back", "both"],
              "type": "string"
            },
            "fps": {
              "exclusiveMinimum": 0,
              "type": "number"
            },
            "gatewayToken": {
              "type": "string"
            },
            "gatewayUrl": {
              "type": "string"
            },
            "includeAudio": {
              "type": "boolean"
            },
            "invokeCommand": {
              "type": "string"
            },
            "invokeParamsJson": {
              "type": "string"
            },
            "invokeTimeoutMs": {
              "minimum": 1,
              "type": "integer"
            },
            "limit": {
              "maximum": 20,
              "minimum": 1,
              "type": "integer"
            },
            "locationTimeoutMs": {
              "minimum": 1,
              "type": "integer"
            },
            "maxAgeMs": {
              "minimum": 0,
              "type": "integer"
            },
            "maxWidth": {
              "minimum": 1,
              "type": "integer"
            },
            "node": {
              "description": "Node ID, name, or IP. Required for describe and node-targeted actions; use status to discover nodes.",
              "type": "string"
            },
            "notificationAction": {
              "enum": ["open", "dismiss", "reply"],
              "type": "string"
            },
            "notificationKey": {
              "type": "string"
            },
            "notificationReplyText": {
              "type": "string"
            },
            "outPath": {
              "type": "string"
            },
            "priority": {
              "enum": ["passive", "active", "timeSensitive"],
              "type": "string"
            },
            "quality": {
              "maximum": 1,
              "minimum": 0,
              "type": "number"
            },
            "requestId": {
              "type": "string"
            },
            "screenIndex": {
              "minimum": 0,
              "type": "integer"
            },
            "sound": {
              "type": "string"
            },
            "timeoutMs": {
              "minimum": 1,
              "type": "integer"
            },
            "title": {
              "type": "string"
            }
          },
          "required": ["action"],
          "type": "object"
        },
        "name": "nodes",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Gateway schedules/wakes: reminders, later checks/follow-ups, recurring work. Never exec sleep/process-poll as timer. Main job => heartbeat system event; isolated => background task in `openclaw tasks`.\n\nACTIONS:\n- status scheduler; list compact summaries (includeDisabled, session agentId auto-filter; get for full); get jobId\n- add job; update jobId+patch; remove jobId\n- run jobId (due only; runMode=\"force\" now); runs jobId history; next_check in (current paced job only)\n- wake text (+ optional mode). Default caller lane; top-level sessionKey/agentId selects another caller-owned lane.\n\nADD JOB:\n{ \"name\":\"...\", \"schedule\":{...}, \"pacing\":{ \"min\":\"15m\", \"max\":\"4h\" }, \"trigger\":{ \"script\":\"...\", \"once\":false }, \"payload\":{...}, \"delivery\":{...}, \"sessionTarget\":\"main|isolated|current|session:<id>\", \"enabled\":true }\nRequired: schedule,payload. enabled default true. trigger only every/cron.\n\nTARGET/PAYLOAD:\n- main => systemEvent {kind:\"systemEvent\",text:\"...\"} or script; systemEvent defaults main.\n- isolated/current/session:<id> => agentTurn {kind:\"agentTurn\",message:\"...\",model?,thinking?,timeoutSeconds?}; agentTurn defaults isolated. timeoutSeconds=0 means none.\n- script {kind:\"script\",script:\"...\",timeoutSeconds?,toolBudget?} supports main or isolated only and requires cron.triggers.enabled.\n- current binds caller session at creation. session:<id> is persistent. Prefer isolated unless user explicitly wants current binding.\n\nSCHEDULE:\n- at: {kind:\"at\",at:\"ISO-8601\"}; timezone-less = UTC.\n- every: {kind:\"every\",everyMs:<ms>,anchorMs?}.\n- cron: {kind:\"cron\",expr:\"...\",tz?:\"IANA\"}. Expr is requested local wall time; never pre-convert to UTC. Missing tz = Gateway host local, not UTC. Shanghai 18:00: {kind:\"cron\",expr:\"0 18 * * *\",tz:\"Asia/Shanghai\"}.\n\nTRIGGER SCRIPT:\n- Requires cron.triggers.enabled; if off, explain and never model-poll fallback.\n- Headless owner allowlist; quiet check has no model. Prior trigger.state is frozen JSON. Return/json({fire:boolean,message?:string,state?:JSONValue}); create new state, never mutate prior.\n- fire:false saves state only; no payload/history. fire:true runs payload and appends message; fired state saves only after payload success.\n- Fire on every actionable state, including failures/timeouts; success-only watchers go silent when broken, which looks healthy. Dedupe by comparing trigger.state and returning new state, never memory.\n- Keep scripts read-only; actions belong in payload. message must be self-contained: it is the fired run's entire context.\n- Silent watcher: top-level delivery.mode=\"none\". Omitted delivery on isolated agentTurn announces and missing route may fail.\n- once:true disables after first successful fire. Per check: 30s, 5 tool calls, 16KB state.\n- Hidden Code Mode tools: await tools.call(\"exec\", {command:\"...\"}); unknown id => search/describe.\n\nDELIVERY top-level: {mode:\"none|announce|webhook\",channel?,to?,threadId?,bestEffort?}\n- Isolated agentTurn omitted delivery => announce. announce only isolated/current/session; channel/to optional; threadId chat topic. Specific chat: set channel/to; no messaging tool inside run.\n- webhook posts finished-run event to URL in to.\n\nRestricted isolated runs may only self status/list, current get/runs/remove, and next_check for their own paced job. wake mode: next-heartbeat default | now. jobId canonical; id compat. contextMessages 0-10 adds prior messages.",
        "inputSchema": {
          "additionalProperties": true,
          "properties": {
            "action": {
              "enum": [
                "status",
                "list",
                "get",
                "add",
                "update",
                "remove",
                "run",
                "runs",
                "next_check",
                "wake"
              ],
              "type": "string"
            },
            "agentId": {
              "description": "List filter for `action: \"list\"`; wake target override for `action: \"wake\"` (defaults to the calling agent when omitted on wake)",
              "type": "string"
            },
            "contextMessages": {
              "maximum": 10,
              "minimum": 0,
              "type": "integer"
            },
            "gatewayToken": {
              "type": "string"
            },
            "gatewayUrl": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "in": {
              "description": "Relative duration for action=\"next_check\" (for example, \"15m\")",
              "type": "string"
            },
            "includeDisabled": {
              "type": "boolean"
            },
            "job": {
              "additionalProperties": true,
              "properties": {
                "agentId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Agent id, or null to keep it unset"
                },
                "declarationKey": {
                  "description": "Idempotent declaration key.",
                  "maxLength": 200,
                  "minLength": 1,
                  "type": "string"
                },
                "deleteAfterRun": {
                  "description": "Delete after first run",
                  "type": "boolean"
                },
                "delivery": {
                  "additionalProperties": true,
                  "properties": {
                    "accountId": {
                      "description": "Delivery account",
                      "type": "string"
                    },
                    "bestEffort": {
                      "type": "boolean"
                    },
                    "channel": {
                      "description": "Delivery channel",
                      "type": "string"
                    },
                    "failureDestination": {
                      "additionalProperties": true,
                      "properties": {
                        "accountId": {
                          "description": "Failure delivery account",
                          "type": "string"
                        },
                        "channel": {
                          "description": "Failure delivery channel",
                          "type": "string"
                        },
                        "mode": {
                          "anyOf": [
                            {
                              "const": "announce",
                              "type": "string"
                            },
                            {
                              "const": "webhook",
                              "type": "string"
                            }
                          ]
                        },
                        "to": {
                          "description": "Failure delivery target",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "mode": {
                      "description": "Delivery mode",
                      "enum": ["none", "announce", "webhook"],
                      "type": "string"
                    },
                    "threadId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ],
                      "description": "Thread/topic id"
                    },
                    "to": {
                      "description": "Delivery target",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "description": {
                  "description": "Human description",
                  "type": "string"
                },
                "displayName": {
                  "description": "Human-readable declarative job label",
                  "maxLength": 200,
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "failureAlert": {
                  "additionalProperties": true,
                  "description": "Failure alert; false disables.",
                  "properties": {
                    "accountId": {
                      "type": "string"
                    },
                    "after": {
                      "description": "Failures before alert",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "channel": {
                      "description": "Alert channel",
                      "type": "string"
                    },
                    "cooldownMs": {
                      "description": "Alert cooldown ms",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "includeSkipped": {
                      "description": "Count skipped runs.",
                      "type": "boolean"
                    },
                    "mode": {
                      "enum": ["announce", "webhook"],
                      "type": "string"
                    },
                    "to": {
                      "description": "Alert target",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "name": {
                  "description": "Job name",
                  "type": "string"
                },
                "owner": {
                  "additionalProperties": false,
                  "properties": {
                    "agentId": {
                      "type": "string"
                    },
                    "sessionKey": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "pacing": {
                  "additionalProperties": false,
                  "description": "Dynamic-cadence bounds; at least one of min or max is required",
                  "properties": {
                    "max": {
                      "description": "Maximum dynamic delay",
                      "type": "string"
                    },
                    "min": {
                      "description": "Minimum dynamic delay",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "payload": {
                  "additionalProperties": true,
                  "properties": {
                    "allowUnsafeExternalContent": {
                      "type": "boolean"
                    },
                    "fallbacks": {
                      "description": "Fallback models",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "description": "Payload kind",
                      "enum": ["systemEvent", "agentTurn", "script"],
                      "type": "string"
                    },
                    "lightContext": {
                      "type": "boolean"
                    },
                    "message": {
                      "description": "agentTurn prompt",
                      "type": "string"
                    },
                    "model": {
                      "description": "Model override",
                      "type": "string"
                    },
                    "script": {
                      "description": "Headless code-mode script",
                      "type": "string"
                    },
                    "text": {
                      "description": "systemEvent text",
                      "type": "string"
                    },
                    "thinking": {
                      "description": "Thinking override",
                      "type": "string"
                    },
                    "timeoutSeconds": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "toolBudget": {
                      "description": "Maximum script tool calls",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "toolsAllow": {
                      "description": "Allowed tools",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "schedule": {
                  "additionalProperties": true,
                  "properties": {
                    "anchorMs": {
                      "description": "Start anchor ms (kind=every)",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "at": {
                      "description": "ISO-8601 time (kind=at)",
                      "type": "string"
                    },
                    "batchMs": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "command": {
                      "description": "Supervised source argv (kind=stream; requires cron.triggers.enabled)",
                      "items": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cwd": {
                      "description": "Working directory (kind=stream)",
                      "type": "string"
                    },
                    "everyMs": {
                      "description": "Interval ms (kind=every)",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "expr": {
                      "description": "Cron wall-time expr; never UTC-convert. Missing tz=Gateway local. Example \"0 18 * * *\", \"Asia/Shanghai\".",
                      "type": "string"
                    },
                    "kind": {
                      "description": "Schedule kind",
                      "enum": ["at", "every", "cron"],
                      "type": "string"
                    },
                    "match": {
                      "description": "Regex source (stream match mode)",
                      "type": "string"
                    },
                    "maxBatchBytes": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "mode": {
                      "enum": ["line", "match"],
                      "type": "string"
                    },
                    "staggerMs": {
                      "description": "Jitter ms (kind=cron)",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "tz": {
                      "description": "IANA timezone for wall-clock fields; missing=Gateway host local timezone. Example \"Asia/Shanghai\".",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "sessionKey": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Explicit session key, or null to clear it"
                },
                "sessionTarget": {
                  "description": "main | isolated | current | session:<id>",
                  "type": "string"
                },
                "trigger": {
                  "additionalProperties": false,
                  "properties": {
                    "once": {
                      "type": "boolean"
                    },
                    "script": {
                      "maxLength": 65536,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": ["script"],
                  "type": "object"
                },
                "wakeMode": {
                  "description": "Wake timing",
                  "enum": ["now", "next-heartbeat"],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "jobId": {
              "type": "string"
            },
            "mode": {
              "enum": ["now", "next-heartbeat"],
              "type": "string"
            },
            "patch": {
              "additionalProperties": true,
              "properties": {
                "agentId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Agent id, or null to clear it"
                },
                "deleteAfterRun": {
                  "type": "boolean"
                },
                "delivery": {
                  "additionalProperties": true,
                  "properties": {
                    "accountId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Delivery account, or null to clear"
                    },
                    "bestEffort": {
                      "type": "boolean"
                    },
                    "channel": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Delivery channel, or null to clear"
                    },
                    "failureDestination": {
                      "anyOf": [
                        {
                          "additionalProperties": true,
                          "properties": {
                            "accountId": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Failure delivery account, or null to clear"
                            },
                            "channel": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Failure delivery channel, or null to clear"
                            },
                            "mode": {
                              "anyOf": [
                                {
                                  "const": "announce",
                                  "type": "string"
                                },
                                {
                                  "const": "webhook",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "to": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Failure delivery target, or null to clear"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Failure destination; null clears."
                    },
                    "mode": {
                      "description": "Delivery mode",
                      "enum": ["none", "announce", "webhook"],
                      "type": "string"
                    },
                    "threadId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Thread/topic id"
                    },
                    "to": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Delivery target, or null to clear"
                    }
                  },
                  "type": "object"
                },
                "description": {
                  "type": "string"
                },
                "displayName": {
                  "anyOf": [
                    {
                      "maxLength": 200,
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Human-readable label; null clears it"
                },
                "enabled": {
                  "type": "boolean"
                },
                "failureAlert": {
                  "additionalProperties": true,
                  "description": "Failure alert; false disables.",
                  "properties": {
                    "accountId": {
                      "type": "string"
                    },
                    "after": {
                      "description": "Failures before alert",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "channel": {
                      "description": "Alert channel",
                      "type": "string"
                    },
                    "cooldownMs": {
                      "description": "Alert cooldown ms",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "includeSkipped": {
                      "description": "Count skipped runs.",
                      "type": "boolean"
                    },
                    "mode": {
                      "enum": ["announce", "webhook"],
                      "type": "string"
                    },
                    "to": {
                      "description": "Alert target",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "name": {
                  "description": "Job name",
                  "type": "string"
                },
                "pacing": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "description": "Dynamic-cadence bounds; at least one of min or max is required",
                      "properties": {
                        "max": {
                          "description": "Maximum dynamic delay",
                          "type": "string"
                        },
                        "min": {
                          "description": "Minimum dynamic delay",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payload": {
                  "additionalProperties": true,
                  "properties": {
                    "allowUnsafeExternalContent": {
                      "type": "boolean"
                    },
                    "fallbacks": {
                      "anyOf": [
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Fallback models, or null to clear"
                    },
                    "kind": {
                      "description": "Payload kind",
                      "enum": ["systemEvent", "agentTurn", "script"],
                      "type": "string"
                    },
                    "lightContext": {
                      "type": "boolean"
                    },
                    "message": {
                      "description": "agentTurn prompt",
                      "type": "string"
                    },
                    "model": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Model override, or null to clear"
                    },
                    "script": {
                      "description": "Headless code-mode script",
                      "type": "string"
                    },
                    "text": {
                      "description": "systemEvent text",
                      "type": "string"
                    },
                    "thinking": {
                      "description": "Thinking override",
                      "type": "string"
                    },
                    "timeoutSeconds": {
                      "minimum": 0,
                      "type": "number"
                    },
                    "toolBudget": {
                      "description": "Maximum script tool calls",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "toolsAllow": {
                      "anyOf": [
                        {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Allowed tool ids, or null to clear"
                    }
                  },
                  "type": "object"
                },
                "schedule": {
                  "additionalProperties": true,
                  "properties": {
                    "anchorMs": {
                      "description": "Start anchor ms (kind=every)",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "at": {
                      "description": "ISO-8601 time (kind=at)",
                      "type": "string"
                    },
                    "batchMs": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "command": {
                      "description": "Supervised source argv (kind=stream; requires cron.triggers.enabled)",
                      "items": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "cwd": {
                      "description": "Working directory (kind=stream)",
                      "type": "string"
                    },
                    "everyMs": {
                      "description": "Interval ms (kind=every)",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "expr": {
                      "description": "Cron wall-time expr; never UTC-convert. Missing tz=Gateway local. Example \"0 18 * * *\", \"Asia/Shanghai\".",
                      "type": "string"
                    },
                    "kind": {
                      "description": "Schedule kind",
                      "enum": ["at", "every", "cron"],
                      "type": "string"
                    },
                    "match": {
                      "description": "Regex source (stream match mode)",
                      "type": "string"
                    },
                    "maxBatchBytes": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "mode": {
                      "enum": ["line", "match"],
                      "type": "string"
                    },
                    "staggerMs": {
                      "description": "Jitter ms (kind=cron)",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "tz": {
                      "description": "IANA timezone for wall-clock fields; missing=Gateway host local timezone. Example \"Asia/Shanghai\".",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "sessionKey": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Explicit session key, or null to clear it"
                },
                "sessionTarget": {
                  "description": "Session target",
                  "type": "string"
                },
                "trigger": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "once": {
                          "type": "boolean"
                        },
                        "script": {
                          "maxLength": 65536,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": ["script"],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "wakeMode": {
                  "enum": ["now", "next-heartbeat"],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "runMode": {
              "description": "Run mode for action=\"run\": omitted defaults to \"due\"; use \"force\" to trigger now.",
              "enum": ["due", "force"],
              "type": "string"
            },
            "sessionKey": {
              "description": "Wake target override for `action: \"wake\"`: route the event to another session owned by the calling agent. Defaults to the resolved calling-session key when omitted.",
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "timeoutMs": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": ["action"],
          "type": "object"
        },
        "name": "cron",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Only explicit voice/speech/TTS intent or active TTS config; never ordinary text reply. Audio auto-delivered. After success follow reply instructions; no duplicate text/audio.",
        "inputSchema": {
          "properties": {
            "channel": {
              "description": "Channel id; output-format hint.",
              "type": "string"
            },
            "text": {
              "description": "Text to speak.",
              "type": "string"
            },
            "timeoutMs": {
              "description": "Provider timeout ms.",
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": ["text"],
          "type": "object"
        },
        "name": "tts",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Read gateway config + schema. Writes/restart: use openclaw tool.",
        "inputSchema": {
          "properties": {
            "action": {
              "enum": ["config.get", "config.schema.lookup"],
              "type": "string"
            },
            "gatewayToken": {
              "type": "string"
            },
            "gatewayUrl": {
              "type": "string"
            },
            "path": {
              "type": "string"
            },
            "timeoutMs": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": ["action"],
          "type": "object"
        },
        "name": "gateway",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "List visible sessions; filter kind/label/agentId/search/activity/archive. Use before history/send target selection.",
        "inputSchema": {
          "properties": {
            "activeMinutes": {
              "minimum": 1,
              "type": "integer"
            },
            "agentId": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "archived": {
              "type": "boolean"
            },
            "includeDerivedTitles": {
              "type": "boolean"
            },
            "includeLastMessage": {
              "type": "boolean"
            },
            "kinds": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "label": {
              "minLength": 1,
              "type": "string"
            },
            "limit": {
              "minimum": 1,
              "type": "integer"
            },
            "messageLimit": {
              "minimum": 0,
              "type": "integer"
            },
            "search": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        },
        "name": "sessions_list",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Read sanitized visible-session history. Before reply/debug/resume. Supports limit, offset, search-result sessionId/messageId anchors, and tool messages.",
        "inputSchema": {
          "properties": {
            "includeTools": {
              "type": "boolean"
            },
            "limit": {
              "minimum": 1,
              "type": "integer"
            },
            "messageId": {
              "minLength": 1,
              "type": "string"
            },
            "offset": {
              "minimum": 0,
              "type": "integer"
            },
            "sessionId": {
              "minLength": 1,
              "type": "string"
            },
            "sessionKey": {
              "type": "string"
            }
          },
          "required": ["sessionKey"],
          "type": "object"
        },
        "name": "sessions_history",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Search your own past sessions for matching user and assistant text. Follow up with sessions_history using a returned sessionKey, sessionId, and messageId for neighboring context.",
        "inputSchema": {
          "properties": {
            "limit": {
              "maximum": 25,
              "minimum": 1,
              "type": "integer"
            },
            "query": {
              "maxLength": 4096,
              "type": "string"
            },
            "sessionKey": {
              "type": "string"
            }
          },
          "required": ["query"],
          "type": "object"
        },
        "name": "sessions_search",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Run a visible session on this Gateway by sessionKey/label, or a configured local agent by agentId; sessionKey wins redundant label. A session identifies model context, not an external address; its reply may still announce through established delivery context. For an exact external destination, use `conversations_list` plus `conversations_send`/`conversations_turn`, or `message` with an explicit channel and target. Thread chats rejected: target parent channel. Missing configured-agent main created. Waits for reply when available. watch:true: notice arrives when others later change target session.",
        "inputSchema": {
          "properties": {
            "agentId": {
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "label": {
              "maxLength": 512,
              "minLength": 1,
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "sessionKey": {
              "type": "string"
            },
            "timeoutSeconds": {
              "minimum": 0,
              "type": "integer"
            },
            "watch": {
              "type": "boolean"
            }
          },
          "required": ["message"],
          "type": "object"
        },
        "name": "sessions_send",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Background work: subagents, media gen, cron runs. list/cancel.",
        "inputSchema": {
          "properties": {
            "action": {
              "enum": ["list", "cancel"],
              "type": "string"
            },
            "recentMinutes": {
              "minimum": 1,
              "type": "integer"
            },
            "taskId": {
              "description": "Task id",
              "type": "string"
            }
          },
          "type": "object"
        },
        "name": "subagents",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Show visible-session model/usage/time/cost/tasks. `sessionKey=\"current\"` for current; UI labels are not keys. `model` overrides; `model=default` resets. Use for active model/session questions.",
        "inputSchema": {
          "properties": {
            "changesSince": {
              "minimum": 0,
              "type": "integer"
            },
            "model": {
              "type": "string"
            },
            "sessionKey": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "name": "session_status",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Search current web; normalized provider results.",
        "inputSchema": {
          "properties": {
            "count": {
              "description": "Result count.",
              "maximum": 10,
              "minimum": 1,
              "type": "number"
            },
            "country": {
              "description": "2-letter country code.",
              "type": "string"
            },
            "date_after": {
              "description": "Published after YYYY-MM-DD.",
              "type": "string"
            },
            "date_before": {
              "description": "Published before YYYY-MM-DD.",
              "type": "string"
            },
            "domain_filter": {
              "description": "Perplexity domain filter.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "freshness": {
              "description": "Time filter: day/week/month/year.",
              "type": "string"
            },
            "language": {
              "description": "ISO 639-1 language.",
              "type": "string"
            },
            "max_tokens": {
              "description": "Perplexity total token budget.",
              "maximum": 1000000,
              "minimum": 1,
              "type": "number"
            },
            "max_tokens_per_page": {
              "description": "Perplexity tokens per page.",
              "minimum": 1,
              "type": "number"
            },
            "query": {
              "description": "Search query.",
              "type": "string"
            },
            "search_lang": {
              "description": "Brave result language.",
              "type": "string"
            },
            "ui_lang": {
              "description": "Brave UI locale.",
              "type": "string"
            }
          },
          "required": ["query"],
          "type": "object"
        },
        "name": "web_search",
        "type": "function"
      },
      {
        "deferLoading": true,
        "description": "Fetch URL; extract readable markdown/text. Lightweight; no browser automation.",
        "inputSchema": {
          "properties": {
            "extractMode": {
              "default": "markdown",
              "description": "Extract as markdown/text.",
              "enum": ["markdown", "text"],
              "type": "string"
            },
            "maxChars": {
              "description": "Max chars returned; truncates.",
              "minimum": 100,
              "type": "integer"
            },
            "url": {
              "description": "HTTP(S) URL.",
              "type": "string"
            }
          },
          "required": ["url"],
          "type": "object"
        },
        "name": "web_fetch",
        "type": "function"
      }
    ],
    "type": "namespace"
  }
]
