Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

get_variable

Retrieve configuration values from Apache Airflow deployments by specifying a key, enabling AI assistants to access and use Airflow variables for workflow automation.

Instructions

Get a variable by key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes

Implementation Reference

  • The main handler function for the 'get_variable' tool, which retrieves an Airflow variable by key using the VariableApi and returns its dict as text content.
    async def get_variable(key: str) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        response = variable_api.get_variable(variable_key=key)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The function that returns the list of tool registrations, including the specific tuple for 'get_variable'.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]:
        """Return list of (function, name, description, is_read_only) tuples for registration."""
        return [
            (list_variables, "list_variables", "List all variables", True),
            (create_variable, "create_variable", "Create a variable", False),
            (get_variable, "get_variable", "Get a variable by key", True),
            (update_variable, "update_variable", "Update a variable by key", False),
            (delete_variable, "delete_variable", "Delete a variable by key", False),
        ]
  • src/main.py:90-92 (registration)
    Loop that registers each tool from the variable module (and others) by calling app.add_tool() with the function, name, and description.
    for func, name, description, *_ in functions:
        app.add_tool(func, name=name, description=description)
  • src/main.py:36-36 (registration)
    Mapping of APIType.VARIABLE to the get_variable_functions which provides the tool list including 'get_variable'.
    APIType.VARIABLE: get_variable_functions,
  • src/main.py:18-18 (registration)
    Import of the function provider for variable tools in main.py.
    from src.airflow.variable import get_all_functions as get_variable_functions
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets' a variable, implying a read-only operation, but doesn't disclose whether authentication is needed, what happens if the key doesn't exist, rate limits, or the format of the returned value. The description is minimal and leaves critical behavioral aspects unspecified.

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 extremely concise at just four words, front-loaded with the core action. There's zero wasted language, though this conciseness comes at the cost of completeness. Every word earns its place by specifying the action and primary parameter.

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

Completeness2/5

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

Given no annotations, no output schema, and 0% schema description coverage for a single-parameter tool, the description is incomplete. It doesn't explain what a 'variable' is in this system, what format the returned value takes, error conditions, or how this tool fits within the broader variable management context alongside siblings like create_variable and delete_variable.

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

Parameters2/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 mentions 'by key' which corresponds to the single parameter 'key', but provides no additional meaning about what constitutes a valid key, key format, examples, or constraints. This leaves the parameter poorly documented despite the low schema coverage.

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 'Get a variable by key' clearly states the action (get) and resource (variable), but it's vague about what 'variable' means in this context. It distinguishes from siblings like 'create_variable' and 'delete_variable' by indicating retrieval rather than modification, but doesn't specify what type of variable or system it belongs to.

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 like 'get_value', 'list_variables', or 'get_config'. The description implies it's for retrieving a specific variable by key, but doesn't clarify prerequisites, error conditions, or when other retrieval tools might be more appropriate.

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/nikhil-ganage/mcp-server-airflow-token'

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