Skip to main content
Glama

Cortex Extract Answer

cortex_extract_answer
Read-onlyIdempotent

Extract answers from source text using Snowflake AI_EXTRACT, returning a structured JSON object with response or error details for reliable downstream parsing.

Instructions

Extract answers from text via Snowflake AI_EXTRACT. Returns the AI_EXTRACT JSON object (response/error), not a legacy plain-string answer.

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

Input Schema

NameRequiredDescriptionDefault
questionYes
source_textYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.4

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds genuine value by noting that errors arrive inside the returned JSON object rather than as a separate failure channel, but says nothing about auth, quotas, or model/latency characteristics.

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

Conciseness5/5

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

Two sentences, front-loaded with the action and the engine, and the second sentence carries a non-obvious output-format caveat. No filler or repetition.

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 and annotations cover the safety profile, so the main remaining obligation is usage routing, which is absent. For a two-param extraction tool the definition is minimally sufficient but leaves the agent to guess between it and the other cortex_* tools.

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 would need to compensate, and it does not — it never mentions 'question' or 'source_text'. The parameter names are largely self-explanatory, which keeps this at a minimal-viable 3 rather than lower.

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 ('Extract answers from text') and identifies the underlying engine (Snowflake AI_EXTRACT), which lets an agent distinguish it from generic completion or summarization tools. It lacks an explicit contrast against the closest siblings such as cortex_complete, so it falls short of a 5.

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?

No statement of when to use this tool, when to prefer cortex_complete or cortex_summarize, or what prerequisites exist. The only routing signal is a cryptic aside about a 'legacy plain-string answer' without naming the alternative tool.

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