Skip to main content
Glama

Tasks Create Task

tasks_create_task

Creates 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

NameRequiredDescriptionDefault
databaseNoQuote names that aren't all uppercase, exactly as list tools return them.
scheduleNo
task_nameYesQuote names that aren't all uppercase, exactly as list tools return them.
warehouseNoQuote names that aren't all uppercase, exactly as list tools return them.
schema_nameNoQuote names that aren't all uppercase, exactly as list tools return them.
if_not_existsNo
sql_statementYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv3.0.0
    • addedInput schema / properties / database / description
      Added value: +"Quote names that aren't all uppercase, exactly as list tools return them."
    • addedInput schema / properties / schema_name / description
      Added value: +"Quote names that aren't all uppercase, exactly as list tools return them."
    • addedInput schema / properties / task_name / description
      Added value: +"Quote names that aren't all uppercase, exactly as list tools return them."
    • addedInput schema / properties / warehouse / description
      Added value: +"Quote names that aren't all uppercase, exactly as list tools return them."
  2. Addedv2.0.4

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already disclose non-read-only, non-idempotent, open-world, non-destructive behavior, so the bar is lower. The description adds useful context — schedule is omitted from CREATE TASK when unset, and the resume precondition — but says nothing about the default if_not_exists=true behavior, what happens if the task already exists, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is well front-loaded, but the middle sentences about child tasks, finalizers, and WHEN triggers describe behavior this tool explicitly cannot perform, so they are educational filler rather than selection-relevant content. The key constraint (only SCHEDULE is settable) arrives late in the paragraph.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. However, for a mutation tool with 7 parameters, the definition omits the defaulted if_not_exists behavior and the warehouse parameter's role, leaving an agent to infer create-or-fail versus create-or-noop semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 57%, so the schema handles most parameters including the quoting convention. The description meaningfully enriches the schedule parameter (optional, omitted from CREATE TASK when unset, and its role in enabling resume), but leaves if_not_exists, warehouse, database, and schema_name to the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ("Create a task") and immediately bounds the scope: this tool sets only an optional SCHEDULE, not AFTER, FINALIZE, or WHEN. It also contrasts behavior with the sibling operations tasks_execute_task ("EXECUTE TASK runs a standalone or root task once") and the resume path, so an agent can separate creation from execution and resumption.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear conditions for use (creating a schedule-only task) and an explicit exclusion (it does not set AFTER, FINALIZE, or WHEN). It also flags a downstream prerequisite — resuming fails unless the task has a SCHEDULE/AFTER/FINALIZE/WHEN — which steers scheduling decisions. It stops short of naming the alternative tool an agent should call when a non-SCHEDULE trigger is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools