Skip to main content
Glama
biswasbiplob

mwaa-mcp-server

by biswasbiplob

get-dag-source

Fetch the Python source code of an Airflow DAG by DAG ID from an Amazon MWAA environment. Works across Airflow 2.x and 3.x.

Instructions

Get the source code of a DAG file.

    Returns the Python source code of the DAG. Works on both Airflow 2.x
    and 3.x environments: on 3.x the source is fetched by DAG ID directly;
    on 2.x the server resolves the DAG's file token first.

    Args:
        ctx: The MCP context.
        environment_name: Name of the MWAA environment.
        dag_id: The DAG identifier.
        region: AWS region override.
        profile_name: AWS CLI profile name override.

    Returns:
        CallToolResult with the DAG source code.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dag_idYesThe DAG ID to get the source code for.
regionNoAWS region override.
profile_nameNoAWS CLI profile name override.
environment_nameNoName of the MWAA environment. If omitted and only one environment exists, it is used automatically.
Behavior4/5

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

The description discloses version-dependent behavior (direct fetch on 3.x vs file token resolution on 2.x) and states the return type as CallToolResult with DAG source code. This adds meaningful context beyond a simple read operation, which is especially useful given the absence of annotations.

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 is front-loaded with the purpose, followed by version behavior and a structured Args/Returns section. While the Args section somewhat duplicates schema details, the overall length is reasonable and the structure is clear.

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

Completeness4/5

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

Given the lack of an output schema, the description appropriately states the return type. It also explains version compatibility. The parameters are fully described in the schema, and the tool's read-only nature is evident, making the description sufficient for correct invocation.

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?

The input schema has 100% coverage with descriptions for all parameters. The description's Args section merely repeats parameter names without adding new semantics, so it does not enhance the schema's information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that it gets the source code of a DAG file, using a specific verb+resource pattern. It distinguishes from siblings like get-dag by focusing on source code rather than metadata or status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context about Airflow 2.x and 3.x compatibility but does not explicitly instruct when to choose this tool over alternatives like get-dag. The use case is implied by the tool's purpose, not contrasted with siblings.

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

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