Skip to main content
Glama

hue_export_and_download

Export SQL query results from Hue to HDFS and download files to your local system for data analysis or storage.

Instructions

Execute an INSERT OVERWRITE DIRECTORY query and download the results.

This tool is for queries that write output to HDFS (like INSERT OVERWRITE DIRECTORY),
then downloads the resulting files to the local filesystem.

Args:
    statement: SQL statement with INSERT OVERWRITE DIRECTORY
    hdfs_directory: The HDFS directory where results are written
    local_directory: Local directory to download files to (default: '.')
    dialect: SQL dialect - 'hive', 'sparksql', or 'impala' (default: 'hive')
    file_pattern: Optional regex pattern to filter files to download
    timeout: Maximum wait time in seconds (default: 300)

Returns:
    OperationResult with list of downloaded files in message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statementYes
hdfs_directoryYes
local_directoryNo.
dialectNohive
file_patternNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRelevant path for the operation
messageYesStatus message
successYesWhether the operation succeeded
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: executes a specific type of SQL query (INSERT OVERWRITE DIRECTORY), writes to HDFS, downloads to local filesystem, and has a timeout default. However, it doesn't mention important aspects like whether the operation is destructive (OVERWRITE implies it might be), authentication requirements, error handling, or rate limits. The description adds value but leaves significant gaps.

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 perfectly structured: a clear purpose statement upfront, followed by context, then a well-organized parameter list with explanations and defaults, and finally the return value. Every sentence earns its place with no redundancy. The information is front-loaded and efficiently presented.

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

Completeness4/5

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

Given 6 parameters with 0% schema coverage and no annotations, the description does an excellent job explaining parameters and stating the return type. However, for a tool that executes queries and downloads files, it lacks information about error conditions, file formats, what happens if the directory already exists, or security implications. The presence of an output schema helps, but behavioral context could be more complete.

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

Parameters4/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 compensate. It provides meaningful explanations for all 6 parameters beyond their titles: statement is 'SQL statement with INSERT OVERWRITE DIRECTORY', hdfs_directory is 'The HDFS directory where results are written', local_directory has default '.', dialect options are listed, file_pattern is 'Optional regex pattern to filter files', and timeout is 'Maximum wait time in seconds'. This adds substantial semantic value over the bare schema.

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 specific action: 'Execute an INSERT OVERWRITE DIRECTORY query and download the results.' It distinguishes from siblings like hue_execute_query (general query execution) and hue_download_directory (download without query execution) by combining both operations. The verb+resource combination is precise and unambiguous.

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: 'This tool is for queries that write output to HDFS (like INSERT OVERWRITE DIRECTORY), then downloads the resulting files.' This implicitly distinguishes it from siblings that don't execute queries or don't download. However, it doesn't explicitly state when NOT to use it or name specific alternatives like hue_run_query_to_csv for different output formats.

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