Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

update_variable

Modify Airflow variables by key to adjust configuration values or descriptions in your data pipeline deployment.

Instructions

Update a variable by key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueNo
descriptionNo

Implementation Reference

  • The async handler function implementing the 'update_variable' tool. It patches an Airflow variable using the VariableApi based on provided key, value, and/or description.
    async def update_variable(
        key: str, value: Optional[str] = None, description: Optional[str] = None
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        update_request = {}
        if value is not None:
            update_request["value"] = value
        if description is not None:
            update_request["description"] = description
    
        response = variable_api.patch_variable(
            variable_key=key, update_mask=list(update_request.keys()), variable_request=update_request
        )
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registers the 'update_variable' tool (line 17) among other variable tools by returning a tuple (function, name, description, is_read_only) in get_all_functions().
    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)
    The generic MCP tool registration loop in main.py that calls app.add_tool for each tool from modules like variable.py, including 'update_variable' when APIType.VARIABLE is selected.
    for func, name, description, *_ in functions:
        app.add_tool(func, name=name, description=description)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention whether this requires specific permissions, if updates are reversible, what happens when updating non-existent variables, or any rate limits. The description is insufficient for a mutation tool with zero 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 extremely concise with just five words, front-loaded with the core action. There's zero wasted language, though this conciseness comes at the expense of completeness. Every word serves a purpose in stating the basic function.

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?

For a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is severely incomplete. It doesn't explain what happens during updates, what values are acceptable, error conditions, or return values. The minimal description fails to provide adequate context for safe and effective use.

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?

Schema description coverage is 0%, so the description must compensate but adds no parameter information beyond the tool name. It doesn't explain what 'key' identifies, what 'value' represents, or what 'description' is for. The three parameters remain largely undocumented, failing to compensate for the schema gap.

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 'Update a variable by key' clearly states the action (update) and target (variable), but it's vague about what 'update' entails and doesn't distinguish from sibling tools like 'create_variable' or 'delete_variable'. It provides basic purpose but lacks specificity about what fields can be updated.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_variable' or 'delete_variable', nor does it mention prerequisites such as the variable needing to exist first. There's no context about appropriate use cases or limitations.

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