Skip to main content
Glama

get_task_instance

Retrieve detailed information about a specific task instance in an Amazon MWAA environment by providing the environment name, DAG ID, run ID, and task ID for workflow monitoring and troubleshooting.

Instructions

Get details about a specific task instance.

Args: environment_name: Name of the MWAA environment dag_id: The DAG ID dag_run_id: The DAG run ID task_id: The task ID

Returns: Dictionary containing task instance details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environment_nameYes
dag_idYes
dag_run_idYes
task_idYes

Implementation Reference

  • The core handler for 'get_task_instance' that invokes the MWAA REST API.
    async def get_task_instance(
        self, environment_name: str, dag_id: str, dag_run_id: str, task_id: str
    ) -> Dict[str, Any]:
        """Get task instance details via Airflow API."""
        return self._invoke_airflow_api(
            environment_name,
            "GET",
            f"/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}",
        )
  • The MCP tool registration and entry point for 'get_task_instance'.
    @mcp.tool(name="get_task_instance")
    async def get_task_instance(
        environment_name: str,
        dag_id: str,
        dag_run_id: str,
        task_id: str,
    ) -> Dict[str, Any]:
        """Get details about a specific task instance.
    
        Args:
            environment_name: Name of the MWAA environment
            dag_id: The DAG ID
            dag_run_id: The DAG run ID
            task_id: The task ID
    
        Returns:
            Dictionary containing task instance details
        """
        return await tools.get_task_instance(environment_name, dag_id, dag_run_id, task_id)

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