Skip to main content
Glama

get_variable

Retrieve the value of a specific variable from Apache Airflow clusters to access configuration data or parameters for workflow management.

Instructions

[Tool Role]: Gets the value of a specific variable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variable_keyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler implementation for the 'get_variable' tool. This async function fetches the Airflow variable value via the API endpoint /variables/{variable_key} using the shared airflow_request function and returns the JSON response.
    @mcp.tool()
    async def get_variable(variable_key: str) -> Dict[str, Any]:
        """[Tool Role]: Gets the value of a specific variable."""
        resp = await airflow_request("GET", f"/variables/{variable_key}")
        resp.raise_for_status()
        return resp.json()
  • Registration of the get_variable tool (via register_common_tools call) for Airflow API v1 compatibility.
    common_tools.register_common_tools(mcp)
  • Registration of the get_variable tool (via register_common_tools call) for Airflow API v2 compatibility.
    common_tools.register_common_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It discloses the basic behavior of retrieving a variable value but lacks details on permissions, error handling (e.g., if the variable doesn't exist), or response format. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence with zero waste. It is front-loaded and appropriately sized for a simple tool, making it easy to parse without unnecessary elaboration.

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 low complexity (1 parameter) and the presence of an output schema, the description is minimally adequate. However, with no annotations and incomplete behavioral context, it lacks details on error cases or usage scenarios, leaving room for improvement despite the output schema handling return values.

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?

With 0% schema description coverage and 1 parameter, the description adds essential meaning by clarifying that 'variable_key' refers to a specific variable to retrieve. It compensates well for the schema gap, though it could specify key format or examples for higher clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Gets the value of a specific variable,' which is clear but vague. It uses a specific verb ('Gets') and resource ('variable'), but does not distinguish from siblings like 'list_variables' or 'get_config,' leaving ambiguity about scope and differentiation.

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 guidance is provided on when to use this tool versus alternatives. It does not mention siblings such as 'list_variables' for browsing or 'get_config' for configuration values, nor does it specify prerequisites like needing a known variable key, leaving usage context implied but undefined.

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/call518/MCP-Airflow-API'

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