Skip to main content
Glama

hue_execute_query

Execute SQL queries on Hadoop Hue to retrieve data using Hive, SparkSQL, or Impala dialects with configurable timeout and batch size.

Instructions

Execute a SQL query on Hue and return the results.

This tool executes a SQL statement, waits for completion, and fetches all results.
Use this for SELECT queries where you want to retrieve data.

Args:
    statement: The SQL statement to execute (e.g., "SELECT * FROM table LIMIT 100")
    dialect: SQL dialect to use - 'hive', 'sparksql', or 'impala' (default: 'hive')
    timeout: Maximum time to wait for query completion in seconds (default: 300)
    batch_size: Number of rows to fetch per batch for pagination (default: 1000)

Returns:
    QueryResult with headers, rows, and row_count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statementYes
dialectNohive
timeoutNo
batch_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesQuery result rows as nested lists
headersYesColumn headers from the query result
row_countYesTotal number of rows returned
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: executing a SQL statement, waiting for completion, fetching all results, and handling pagination via batch_size. It also implies potential timeouts and resource usage, though it could add more on error handling or permissions.

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?

The description is well-structured and front-loaded, starting with the core purpose, followed by usage guidance, and then detailed parameter explanations. Every sentence adds value without redundancy, making it efficient and easy to scan for an AI agent.

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?

Given the tool's complexity (4 parameters, no annotations, but with an output schema), the description is complete enough. It covers purpose, usage, parameters, and return values ('QueryResult with headers, rows, and row_count'), and the output schema eliminates the need to detail return formats further, ensuring the agent has all necessary context.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose, provides examples (e.g., SQL statement format), lists dialect options, and clarifies defaults and units (seconds for timeout, rows for batch_size). This fully compensates for the schema's lack of descriptions.

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 clearly states the tool's purpose with a specific verb ('execute a SQL query'), resource ('on Hue'), and outcome ('return the results'). It distinguishes from siblings by focusing on direct SQL execution rather than file operations or directory checks, making it immediately identifiable for its intended use.

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?

The description provides clear context by specifying 'Use this for SELECT queries where you want to retrieve data,' which helps differentiate it from potential write operations. However, it does not explicitly mention when not to use it or name alternatives among siblings, such as 'hue_run_query_to_csv' for CSV output, leaving some ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SpanishST/hueclientrest-mpc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server