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

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)

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