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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the return type ('Dictionary containing task instance details'), it lacks critical behavioral context such as read-only safety, error handling (404 vs 500), authentication requirements, or what specific details are included in the response.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description uses a structured Args/Returns format that is clear and front-loaded with the purpose statement. While this docstring style is slightly verbose for MCP conventions (repeating parameter names already in the schema), each section earns its place and there is no redundant prose.

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 0% schema coverage and lack of annotations, the description provides the bare minimum for a 4-parameter retrieval tool. It acknowledges the output format but misses critical contextual information such as entity relationships, error scenarios, or architectural context (that this queries Amazon MWAA specifically).

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

Parameters3/5

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

With 0% schema description coverage, the description provides minimal compensation: it identifies 'environment_name' as the MWAA environment but offers tautological descriptions for the other three parameters ('The DAG ID', etc.). It fails to explain the relationship between DAG runs and task instances or clarify that these IDs likely need to be obtained from prior API calls.

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 opening sentence clearly states 'Get details about a specific task instance,' providing a specific verb and resource. It implicitly distinguishes from the sibling tool 'list_task_instances' by emphasizing 'specific,' though it doesn't explicitly clarify when to use this versus 'get_task_logs' or other retrieval tools.

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 like 'list_task_instances' or 'get_task_logs'. It fails to mention prerequisite steps (e.g., needing to obtain dag_run_id from elsewhere) or error conditions when the task instance doesn't exist.

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

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