Skip to main content
Glama

Ask Genie

ask_genie
Read-only

Query a Databricks Genie space in natural language to get Genie's generated answer, SQL, and result rows; poll using conversation and message IDs while pending.

Instructions

Ask a natural-language question in a Genie space and return Genie's answer.

Starts a new conversation (or a follow-up when conversation_id is given), waits up to wait_seconds, and returns: the model-generated text answer, the generated SQL with its description, the rows produced by running that SQL (capped), status and ids. If Genie is still working, returns status 'pending' with conversation_id/message_id - call again with those ids (and no question) to poll. The answer and SQL are MODEL-GENERATED, not authoritative data.

Safety classification: EXECUTION+READ_ONLY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_rowsNoMax result rows to return per query (capped by the server SQL row limit).
questionNoNatural-language question. Omit when polling an existing message_id.
space_idYesGenie space id.
message_idNoPoll mode: with conversation_id, fetch status/result of a previous question.
wait_secondsNoHow long to wait for Genie to finish (default 60s, capped by server max wait).
conversation_idNoContinue this conversation (follow-up question), or poll a message in it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
pageNo
planNo
toolYes
actionNo
safetyNo
statusNosuccess
summaryYes
warningsNo
next_stepsNoSuggested follow-up calls.
request_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint, destructiveHint=false, openWorldHint), and the description adds genuinely new behavior: the wait_seconds bound, the 'pending' status and polling loop, and the caveat that answer/SQL are MODEL-GENERATED and not authoritative. The 'EXECUTION+READ_ONLY' label is consistent with the read-only annotation.

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?

Front-loaded with the core action and return, then workflow, then a caveat. Multi-line but every sentence carries information (return shape, poll mechanism, model-generated warning); nothing is filler.

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

Completeness5/5

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

With an output schema present the description needn't restate return values, yet it still summarizes them and explains the pending/poll lifecycle, which is the main risk of misuse. Nothing needed to call this correctly is missing.

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 100%, so the schema already documents space_id, question, message_id, conversation_id, wait_seconds, and max_rows. The description reinforces the polling semantics (omit question, reuse ids) but adds little parameter-level syntax beyond the schema. Baseline 3 applies.

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 first sentence names a specific verb and resource ('Ask a natural-language question in a Genie space') and states the return. It is distinguishable from execute_sql and the manage_* siblings by scoping to Genie spaces and NL questions.

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 conditional usage: start vs follow-up with conversation_id, and explicitly says to poll by calling again with the returned ids and no question. It does not name sibling alternatives (e.g. execute_sql) for when a raw SQL path is preferable, so it stops short of a 5.

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