Skip to main content
Glama
yangkyeongmo

MCP Server for Apache Airflow

by yangkyeongmo

get_log

Retrieve task execution logs from Apache Airflow by specifying DAG ID, task ID, run ID, and try number for monitoring and debugging workflows.

Instructions

Get the log from a task instance by DAG ID, task ID, DAG run ID and task try number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYes
task_idYes
dag_run_idYes
task_try_numberYes

Implementation Reference

  • The handler function implementing the 'get_log' tool logic, which retrieves task instance logs via the Airflow TaskInstanceApi and returns them as text content.
    async def get_log(
        dag_id: str, task_id: str, dag_run_id: str, task_try_number: int
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        response = task_instance_api.get_log(
            dag_id=dag_id,
            dag_run_id=dag_run_id,
            task_id=task_id,
            task_try_number=task_try_number,
        )
        return [types.TextContent(type="text", text=str(response.to_dict()))]
  • The registration entry for the 'get_log' tool within the get_all_functions() list used for tool registration.
        get_log,
        "get_log",
        "Get the log from a task instance by DAG ID, task ID, DAG run ID and task try number",
        True,
    ),
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose whether this is a read-only operation, what format/log level the log returns, potential size limits, authentication requirements, or error behavior. The description is minimal and lacks behavioral context.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose and required parameters. It's front-loaded with the core operation and wastes no words, making it easy to parse despite its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 required parameters, 0% schema coverage, no annotations, and no output schema, the description is insufficient. It doesn't explain what the log contains, its format, size considerations, or error scenarios. The agent lacks critical context to use this tool effectively.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but only lists parameter names without explaining their meaning or relationships. It doesn't clarify what DAG ID, task ID, DAG run ID, or task try number represent, how to obtain them, or their expected formats, leaving significant gaps.

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 description clearly states the verb 'Get' and the resource 'log from a task instance', specifying it retrieves log content. It distinguishes from siblings like get_event_log or get_task_instance by focusing specifically on task execution logs, though it doesn't explicitly contrast them.

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 get_event_log or get_task_instance. It lists required parameters but offers no context about prerequisites, error conditions, or appropriate use cases beyond the basic operation.

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

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