Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

update_task_instance

Update the state of a specific task instance in Apache Airflow using DAG ID, DAG run ID, and task ID for precise workflow management.

Instructions

Update a task instance by DAG ID, DAG run ID, and task ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
dag_run_idYes
stateNo
task_idYes

Implementation Reference

  • The main handler function for the 'update_task_instance' tool. It updates the state of a specific task instance using the Airflow TaskInstanceApi.patch_task_instance method.
    async def update_task_instance( dag_id: str, dag_run_id: str, task_id: str, state: Optional[str] = None ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: update_request = {} if state is not None: update_request["state"] = state response = task_instance_api.patch_task_instance( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, update_mask=list(update_request.keys()), task_instance_request=update_request, ) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The registration tuple for the 'update_task_instance' tool within the get_all_functions() list, including the function reference, name, description, and mutability flag.
    ( update_task_instance, "update_task_instance", "Update a task instance by DAG ID, DAG run ID, and task ID", False, ),

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/yangkyeongmo/mcp-server-apache-airflow'

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