Skip to main content
Glama

Cortex Analyst Query

cortex_analyst_query
Read-onlyIdempotent

Answers analytical questions by using AI_COMPLETE, optionally adding a semantic model path to the prompt so agents can query Snowflake data with model context.

Instructions

Answer an analytical question via AI_COMPLETE. Optionally prefixes the prompt with semantic_model_path. Does not call Cortex Analyst REST (POST /api/v2/cortex/analyst/message).

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": {
      "question": "<question>"
    },
    "name": "cortex_analyst_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
questionYes
semantic_model_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.4

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), so the bar is lower. The description does add genuinely useful behavioral context by revealing that answers come from AI_COMPLETE rather than the semantic-model-backed Cortex Analyst API, which sets accuracy expectations. It omits auth/permission requirements and any cost or latency implications of an LLM call.

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 sentences, front-loaded with the core action, with no filler. The raw REST URL is slightly technical clutter but does earn its place by preempting a wrong assumption about the tool's backend.

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 side effects. What remains missing for a wrapper-style analytical tool is guidance on when this is the right choice, what the semantic model path looks like, and what happens to answer quality without it.

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 description coverage is 0%, so the description must carry the load for two parameters. It explains the effect of semantic_model_path (prefixing the prompt) and implies that question is a natural-language analytical question, but it never states the expected format of the path (e.g. fully qualified model name) or that omitting it yields ungrounded answers.

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?

The description gives a specific verb and resource (answer an analytical question) and names the underlying mechanism (AI_COMPLETE) plus the optional semantic model prefix. It also disambiguates from the Cortex Analyst REST endpoint, which the tool name would otherwise suggest. It stops short of distinguishing itself from the sibling cortex_complete, which is the nearest functional neighbor.

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 explicit when-to-use guidance and no comparison to alternatives such as cortex_complete or cortex_extract_answer. The only routing information is negative ('does not call Cortex Analyst REST'), which clarifies what the tool is not but never states the conditions under which an agent should pick it.

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