create_chat_command
Create a chat slash-command for workspace chat, with optional cron-based scheduling and automatic delivery of results to email or Slack.
Instructions
Create a chat command (slash-command). Name must be alphanumeric, underscore, or hyphen only.
Skill: runwhen-skill://manage-commands (scoping, scheduling, sinks).
Commands are invoked in chat as /label.
To run a command on a schedule, set cron_schedule plus sink_configs,
run_as_user, and assistant_name. Results are delivered to each sink
(email or Slack) when the cron fires.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Command name (alphanumeric, underscore, or hyphen only). | |
| max_runs | No | Maximum scheduled runs before the schedule stops (omit for unlimited). | |
| scope_id | No | Scope ID (null for platform; workspace name for workspace). | |
| is_active | No | Whether the command is active. | |
| scope_type | Yes | One of platform, org, workspace, persona, user. | |
| description | No | Optional description for the command. | |
| run_as_user | No | Email of the user the scheduled session runs as. Required when cron_schedule is set. | |
| sink_configs | No | Delivery targets when cron_schedule is set. Each entry: {type: 'email'|'slack', mode: 'user'|'all-workspace-users'|'channel'|'webhook', target: '...'}. | |
| cron_schedule | No | Cron expression to run this command on a schedule (e.g. '0 8 * * 1-5'). When set, also provide sink_configs, run_as_user, and assistant_name. | |
| assistant_name | No | Persona for scheduled runs (workspace prefix optional). For persona-scoped commands, must match scope_id (full form after PAPI). For workspace-scoped commands, use the short name (persona_name for chat). | |
| workspace_name | Yes | The workspace to create the command in (e.g. 't-oncall'). | |
| command_content | Yes | Markdown content of the command. | |
| schedule_paused | No | When true, the cron does not fire (independent of is_active). | |
| auto_approve_readonly | No | When true, scheduled runs auto-approve read-only task execution (write tasks still require approval). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |