Skip to main content
Glama

list_users

Retrieve all users from Apache Airflow clusters using the v1 API with pagination support for limit and offset parameters.

Instructions

[Tool Role]: Lists all users in the Airflow system (v1 API only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function for the 'list_users' tool. Defined with @mcp.tool() decorator for automatic registration in MCP. Fetches Airflow users list via v1 API '/users' endpoint with pagination (limit/offset). Returns error message for v2 API compatibility.
    async def list_users(limit: int = 20, offset: int = 0) -> Dict[str, Any]:
        """[Tool Role]: Lists all users in the Airflow system (v1 API only)."""
        from ..functions import get_api_version
        
        api_version = get_api_version()
        if api_version == "v2":
            return {"error": "User management is not available in Airflow 3.x (API v2)", "available_in": "v1 only"}
        
        params = []
        params.append(f"limit={limit}")
        if offset > 0:
            params.append(f"offset={offset}")
        
        query_string = "&".join(params) if params else ""
        endpoint = f"/users?{query_string}" if query_string else "/users"
        
        resp = await airflow_request("GET", endpoint)
        resp.raise_for_status()
        return resp.json()
  • Registration point for v1 API variant: calls register_common_tools(mcp) which executes the @mcp.tool() decorators including list_users.
    common_tools.register_common_tools(mcp)
  • Registration point for v2 API variant: calls register_common_tools(mcp) which executes the @mcp.tool() decorators including list_users (which will error in v2 as intended).
    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 the full burden of behavioral disclosure. It mentions the API version ('v1 API only'), which is helpful context, but fails to describe critical behaviors: it doesn't indicate whether this is a read-only operation (implied by 'list' but not explicit), whether it requires authentication, how pagination works (despite limit/offset parameters), or what the output contains. For a list tool with zero annotation coverage, this is a significant gap.

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 wasted words. It front-loads the core purpose ('Lists all users') and adds only essential context ('in the Airflow system (v1 API only)'). Every part earns its place, making it highly concise and well-structured.

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 (a simple list operation) and the presence of an output schema (which handles return values), the description is minimally adequate. However, it lacks parameter explanations and behavioral details (e.g., pagination, auth needs), which are important for a tool with parameters and no annotations. It meets the bare minimum but has clear gaps.

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 schema provides no parameter descriptions. The tool description adds no information about the two parameters (limit and offset), their purposes, or how they affect the listing. It doesn't even mention that parameters exist. With low coverage and no compensation in the description, this falls below the baseline of 3.

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

Purpose4/5

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

The description clearly states the verb ('Lists') and resource ('all users in the Airflow system'), making the purpose unambiguous. It also specifies the API version constraint ('v1 API only'), which is useful context. However, it doesn't explicitly differentiate from sibling tools like 'get_user' (which presumably retrieves a single user), so it falls short of a perfect score.

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. It doesn't mention sibling tools like 'get_user' (for single user retrieval) or 'list_roles' (for related resources), nor does it indicate prerequisites, constraints beyond the API version, or typical use cases. The agent must infer usage from the tool name alone.

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