Skip to main content
Glama

Cortex Run Agent

cortex_run_agent

Run a Snowflake Cortex Agent via DATA_AGENT_RUN to execute agent requests, optionally create a thread, and return results; agent tools may write data.

Instructions

Run a Cortex Agent with SNOWFLAKE.CORTEX.DATA_AGENT_RUN. Agent tools may write. https://docs.snowflake.com/en/sql-reference/functions/data_agent_run-snowflake-cortex

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": {
      "agent_name": "<agent_name>",
      "request": "<request>"
    },
    "name": "cortex_run_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYes
versionNo
databaseNoQuote names that aren't all uppercase, exactly as list tools return them.
agent_nameYesQuote 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.
create_thread_if_not_presentNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.0

TDQS

B3.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, but the description adds the critical caveat "Agent tools may write" — i.e., this call can cause side effects beyond what destructiveHint=false suggests. That is genuine value beyond the structured data; it stops short of saying whether writes are committed or what authorization the agent's tools require.

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

Conciseness4/5

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

Three short, front-loaded fragments with no filler; the operation, the write caveat, and a docs link in one line. The terseness is efficient rather than padded, though the doc URL is the only place deeper detail lives.

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

Completeness2/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 no explanation, but for a 6-parameter, nested-object, side-effecting tool the definition is thin: the required `request` object is undocumented, threading behavior via create_thread_if_not_present is unexplained, and there is no routing guidance against sibling Cortex tools.

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

Parameters2/5

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

Schema coverage is 50% and the description adds no parameter meaning at all. The required `request` object is free-form (additionalProperties: true) with no description anywhere, and `version`, `create_thread_if_not_present`, and the request payload shape are left entirely to the agent's guess.

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

Purpose4/5

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

States a specific verb and resource ("Run a Cortex Agent") and names the exact underlying function SNOWFLAKE.CORTEX.DATA_AGENT_RUN, so the operation is unambiguous. It does not differentiate itself from siblings such as cortex_chat_completion or cortex_complete, which likely confuses an agent choosing among Cortex entry points.

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

Usage Guidelines2/5

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

There is no statement of when to use an agent run versus a chat/completion tool, no prerequisites (agent must already exist, thread handling), and no exclusions. The only cue is the implicit pairing with cortex_list_agents, which the agent must infer from sibling names rather than from this text.

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