Skip to main content
Glama
aptro

Superset MCP Integration

by aptro

superset_sqllab_get_results

Retrieve results from a previously executed SQL query in Apache Superset using the query's result key.

Instructions

Get results of a previously executed SQL query

Makes a request to the /api/v1/sqllab/results/ endpoint to retrieve results for an asynchronous query using its result key.

Args: key: Result key to retrieve

Returns: A dictionary with query results including column information and data rows

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes

Implementation Reference

  • The handler function implementing the superset_sqllab_get_results tool. It makes an authenticated GET request to Superset's /api/v1/sqllab/results/ endpoint with the provided key parameter to fetch the results of a previously executed SQL query.
    @requires_auth
    @handle_api_errors
    async def superset_sqllab_get_results(ctx: Context, key: str) -> Dict[str, Any]:
        """
        Get results of a previously executed SQL query
    
        Makes a request to the /api/v1/sqllab/results/ endpoint to retrieve results
        for an asynchronous query using its result key.
    
        Args:
            key: Result key to retrieve
    
        Returns:
            A dictionary with query results including column information and data rows
        """
        return await make_api_request(
            ctx, "get", f"/api/v1/sqllab/results/", params={"key": key}
        )
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that this is a read operation (retrieving results) and mentions the API endpoint, but lacks details on authentication requirements, rate limits, error handling, or whether the results are cached/paginated. It adds some behavioral context but leaves gaps for a tool that fetches query results.

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 with the core purpose, followed by API details and parameter/return explanations. Every sentence adds value without redundancy, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (fetching query results), lack of annotations, and no output schema, the description is adequate but incomplete. It covers the purpose, usage context, and parameter semantics, but misses details on authentication, error cases, and the exact structure of the returned dictionary (though it hints at columns and rows).

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?

The schema description coverage is 0%, so the description must compensate. It clearly explains that the 'key' parameter is a 'Result key to retrieve' for an asynchronous query, adding essential meaning beyond the schema's basic string type. However, it doesn't specify the format or source of the key (e.g., from 'superset_sqllab_execute_query'), leaving some ambiguity.

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 ('Get results'), resource ('previously executed SQL query'), and mechanism ('using its result key'). It distinguishes itself from sibling tools like 'superset_sqllab_execute_query' (which executes queries) and 'superset_sqllab_export_query_results' (which exports results), making the purpose 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 for when to use this tool: after an asynchronous query has been executed and you have a result key. However, it doesn't explicitly mention when NOT to use it or name specific alternatives (e.g., 'superset_sqllab_execute_query' for initial execution), which prevents a perfect score.

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/aptro/superset-mcp'

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