Skip to main content
Glama

create_cli_token

Generate a CLI token to execute Airflow commands in Amazon MWAA environments for workflow automation and management.

Instructions

Create a CLI token for executing Airflow CLI commands.

Args: name: The name of the MWAA environment

Returns: Dictionary containing the CLI token and webserver hostname

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The implementation of the 'create_cli_token' tool, which calls the MWAA client's create_cli_token method.
    async def create_cli_token(self, name: str) -> Dict[str, Any]:
        """Create a CLI token for the environment."""
        try:
            response = self.mwaa_client.create_cli_token(Name=name)
            return {
                "CliToken": response["CliToken"],
                "WebServerHostname": response["WebServerHostname"],
            }
    
        except (ClientError, BotoCoreError) as e:
            logger.error("Error creating CLI token for %s: %s", name, e)
            return {"error": str(e)}
  • The registration of the 'create_cli_token' tool in the MCP server.
    @mcp.tool(name="create_cli_token")
    async def create_cli_token(
        name: str,
    ) -> Dict[str, Any]:
        """Create a CLI token for executing Airflow CLI commands.
    
        Args:
            name: The name of the MWAA environment
    
        Returns:
            Dictionary containing the CLI token and webserver hostname
        """
        return await tools.create_cli_token(name)

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/paschmaria/mwaa-mcp-server'

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