Skip to main content
Glama

Add Copy Activity to Pipeline

add_copy_activity_to_pipeline

Add a data copy operation to an existing Microsoft Fabric pipeline to transfer data from source databases to a Lakehouse destination.

Instructions

Add a Copy Activity to an existing Fabric pipeline.

Retrieves an existing pipeline, adds a Copy Activity to it, and updates the pipeline definition. The Copy Activity will be appended to any existing activities in the pipeline.

Use this tool when:

  • You have an existing pipeline and want to add a new Copy Activity

  • You're building complex pipelines with multiple data copy operations

  • You want to incrementally build a pipeline

Parameters: workspace_name: The display name of the workspace containing the pipeline. pipeline_name: Name of the existing pipeline to update. source_type: Type of source (e.g., "AzurePostgreSqlSource", "AzureSqlSource", "SqlServerSource"). source_connection_id: Fabric workspace connection ID for source database. source_table_schema: Schema name of the source table (e.g., "public", "dbo"). source_table_name: Name of the source table (e.g., "movie"). destination_lakehouse_id: Workspace artifact ID of the destination Lakehouse. destination_connection_id: Fabric workspace connection ID for destination Lakehouse. destination_table_name: Name for the destination table in Lakehouse. activity_name: Optional custom name for the activity (default: auto-generated). source_access_mode: Source access mode ("direct" or "sql"). Default is "direct". source_sql_query: Optional SQL query for sql access mode. table_action_option: Table action option (default: "Append", options: "Append", "Overwrite"). apply_v_order: Apply V-Order optimization (default: True). timeout: Activity timeout (default: "0.12:00:00"). retry: Number of retry attempts (default: 0). retry_interval_seconds: Retry interval in seconds (default: 30).

Returns: Dictionary with status, pipeline_id, pipeline_name, activity_name, workspace_name, and message.

Example: ```python # First, get the lakehouse and connection IDs lakehouses = list_items(workspace_name="Analytics", item_type="Lakehouse") lakehouse_id = lakehouses["items"][0]["id"] lakehouse_conn_id = "a216973e-47d7-4224-bb56-2c053bac6831"

# Add a Copy Activity to an existing pipeline
result = add_copy_activity_to_pipeline(
    workspace_name="Analytics Workspace",
    pipeline_name="My_Existing_Pipeline",
    source_type="AzurePostgreSqlSource",
    source_connection_id="12345678-1234-1234-1234-123456789abc",
    source_table_schema="public",
    source_table_name="orders",
    destination_lakehouse_id=lakehouse_id,
    destination_connection_id=lakehouse_conn_id,
    destination_table_name="orders",
    activity_name="CopyOrdersData",
    table_action_option="Overwrite"
)

# Add another Copy Activity to the same pipeline
result = add_copy_activity_to_pipeline(
    workspace_name="Analytics Workspace",
    pipeline_name="My_Existing_Pipeline",
    source_type="AzurePostgreSqlSource",
    source_connection_id="12345678-1234-1234-1234-123456789abc",
    source_table_schema="public",
    source_table_name="customers",
    destination_lakehouse_id=lakehouse_id,
    destination_connection_id=lakehouse_conn_id,
    destination_table_name="customers",
    activity_name="CopyCustomersData"
)

# SQL fallback mode (use when direct Lakehouse copy fails with
# "datasource type Lakehouse is invalid" error):
result = add_copy_activity_to_pipeline(
    workspace_name="Analytics Workspace",
    pipeline_name="My_Existing_Pipeline",
    source_type="LakehouseTableSource",
    source_connection_id=sql_endpoint_conn_id,  # SQL analytics endpoint connection
    source_table_schema="dbo",
    source_table_name="fact_sale",
    destination_lakehouse_id=lakehouse_id,
    destination_connection_id=lakehouse_conn_id,
    destination_table_name="fact_sale_copy",
    source_access_mode="sql",
    source_sql_query="SELECT * FROM dbo.fact_sale"  # optional
)
```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_nameYes
pipeline_nameYes
source_typeYes
source_connection_idYes
source_table_schemaYes
source_table_nameYes
destination_lakehouse_idYes
destination_connection_idYes
destination_table_nameYes
activity_nameNo
source_access_modeNodirect
source_sql_queryNo
table_action_optionNoAppend
apply_v_orderNo
timeoutNo0.12:00:00
retryNo
retry_interval_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behaviors: it retrieves and updates an existing pipeline, appends activities, includes default values for parameters, and describes return values. However, it lacks details on permissions, error handling, or rate limits, which are important for a mutation tool.

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 well-structured with a clear purpose statement, usage guidelines, parameter details, return values, and examples, but it is lengthy due to the extensive parameter list and examples. Every section adds value, but it could be more front-loaded; the examples are helpful but contribute to verbosity.

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

Completeness5/5

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

Given the complexity (17 parameters, mutation tool, no annotations) and the presence of an output schema, the description is highly complete. It covers purpose, usage, parameters, returns, and provides practical examples, making it sufficient for an agent to understand and use the tool effectively without gaps.

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

Parameters5/5

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

Given 0% schema description coverage, the description compensates fully by listing all 17 parameters with clear explanations, examples, and default values, adding significant meaning beyond the bare schema. It clarifies parameter roles, options, and practical usage, which is essential for the agent to invoke the tool correctly.

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 the tool's purpose with specific verbs ('Add a Copy Activity to an existing Fabric pipeline') and distinguishes it from siblings by specifying it's for 'Copy Activity' operations, unlike other pipeline tools like 'add_dataflow_activity_to_pipeline' or 'add_notebook_activity_to_pipeline'.

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

Usage Guidelines5/5

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

The description provides explicit usage guidelines with a bulleted list ('Use this tool when:') that includes specific scenarios (e.g., adding to existing pipelines, building complex pipelines, incremental building) and distinguishes it from alternatives by focusing on Copy Activities, though it doesn't explicitly name when not to use it or list all sibling alternatives.

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/bablulawrence/ms-fabric-mcp-server'

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