Tasks Create Task
tasks_create_taskCreates a Snowflake task from a SQL statement with an optional schedule, enabling scheduled SQL execution without dependency, finalizer, or trigger configuration.
Instructions
Create a task. schedule is optional and is omitted from CREATE TASK when unset. EXECUTE TASK runs a standalone or root task once; it does not run a child task. A child runs after its predecessors (AFTER), a finalizer runs with FINALIZE, and a triggered task uses WHEN (for example SYSTEM$STREAM_HAS_DATA) with no schedule. This tool sets only an optional SCHEDULE; it does not set AFTER, FINALIZE, or WHEN. Resuming fails unless the task has a SCHEDULE, AFTER, FINALIZE, or WHEN trigger.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_name": "<task_name>",
"sql_statement": "<sql_statement>"
},
"name": "tasks_create_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Quote names that aren't all uppercase, exactly as list tools return them. | |
| schedule | No | ||
| task_name | Yes | Quote names that aren't all uppercase, exactly as list tools return them. | |
| warehouse | No | Quote names that aren't all uppercase, exactly as list tools return them. | |
| schema_name | No | Quote names that aren't all uppercase, exactly as list tools return them. | |
| if_not_exists | No | ||
| sql_statement | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||