Skip to main content
Glama
nikhil-ganage

MCP Server Airflow Token

create_variable

Create and store variables in Apache Airflow for use in workflows, enabling configuration management and secure data handling across deployments.

Instructions

Create a variable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueYes
descriptionNo

Implementation Reference

  • The asynchronous function implementing the create_variable tool. It creates a new Airflow variable using the VariableApi by posting a request with key, value, and optional description.
    async def create_variable(
        key: str, value: str, description: Optional[str] = None
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        variable_request = {
            "key": key,
            "value": value,
        }
        if description is not None:
            variable_request["description"] = description
    
        response = variable_api.post_variables(variable_request=variable_request)
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Module-level function that defines and returns the list of variable-related tools, including the create_variable tool, for registration into the main MCP server.
    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:80-91 (registration)
    The code in the main function that retrieves the list of functions (including create_variable via get_variable_functions) and registers them as MCP tools using app.add_tool.
    get_function = APITYPE_TO_FUNCTIONS[APIType(api)]
    try:
        functions = get_function()
    except NotImplementedError:
        continue
    
    # Filter functions for read-only mode if requested
    if read_only:
        functions = filter_functions_for_read_only(functions)
    
    for func, name, description, *_ in functions:
        app.add_tool(func, name=name, description=description)
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. 'Create a variable' implies a write operation but offers no details on permissions required, whether creation is idempotent, error conditions, or what happens on success/failure. It lacks critical context like rate limits, side effects, or response format, leaving the agent with insufficient information to use the tool safely and effectively.

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 three words, making it front-loaded and free of unnecessary information. However, this conciseness comes at the cost of being under-specified, though that is evaluated in other dimensions rather than penalizing brevity here.

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

Completeness1/5

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

Given the tool's complexity (a write operation with 3 parameters), lack of annotations, 0% schema description coverage, and no output schema, the description is completely inadequate. It does not compensate for missing structured data, failing to explain purpose, usage, behavior, parameters, or expected outcomes, making it insufficient for effective tool invocation.

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

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 3 parameters with 0% description coverage, meaning none are documented in the schema. The description 'Create a variable' provides no information about parameters, failing to explain what 'key', 'value', or 'description' represent, their formats, constraints, or relationships. This leaves all parameters semantically undefined, which is inadequate for a tool with multiple inputs.

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

Purpose2/5

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

The description 'Create a variable' is a tautology that merely restates the tool name without adding any meaningful context. It specifies the verb 'create' and the resource 'variable', but provides no details about what kind of variable, in what system, or for what purpose. This fails to distinguish it from sibling tools like 'update_variable' or 'delete_variable' beyond the basic action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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. It does not mention any prerequisites, context for creation, or comparisons to sibling tools like 'update_variable', 'delete_variable', or 'get_variable'. Without such information, an agent cannot make informed decisions about tool selection.

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