run_pipeline is the only MCP tool that changes anything: it queues a sync of one pipeline. To let an agent use it safely, give the agent a credential with the run scope only when it should start syncs, let it call the tool with no dates for a routine refresh or with both dates for a backfill, and have it follow the queued run with get_run instead of calling run_pipeline again. Only one run per pipeline can be queued or running at a time, so a repeated call is refused rather than doubled up.
Decide whether the agent may start runs
Starting a run needs the run scope; every other tool needs only read. Every key has read, and it gets run only if you tick "May start runs" when you create it on the API page, so give a read-only key to an assistant that should only answer questions about your data. An OAuth connection asks for both scopes when the client requests none, and the consent page lists "Start runs of your pipelines" when run is included.
A credential without the scope does not get an HTTP error. The tool result comes back marked as an error that says this credential cannot start runs; create a key with the run scope, which the agent can pass on to you. See using an API key with the MCP server for how keys are made.
Tell the agent which pipeline
The tool takes one required argument, pipeline_id. Have the agent get it from list_pipelines, which also shows each pipeline's source, destination and last run status, and have it confirm the pipeline's name with you before it starts a run. An id from another workspace gets the same not-found error as an id that does not exist.
No dates, or both dates
Leave out start and end for a routine refresh. The run then pulls the same trailing window as the scheduled daily sync: the last few days, which the platform may still be restating, ending today in the pipeline's timezone. How far back that reaches depends on the network, and never goes past your plan's history: 7 days for the demo connector, and, when those connectors are available, 31 days for Google Ads and 29 for Meta. The trailing window page explains why.
Give both dates, as YYYY-MM-DD, to backfill a range. Giving only one is refused with give both start and end, or neither for the trailing window. A backfill must pass the same checks as one started from the dashboard:
- the range covers at most 366 days, or the run is refused with
a sync can cover at most 366 days; - the end is today (in UTC) or earlier, or it is refused with
end must not be in the future; - the start is within your plan's history, counted back from today in the pipeline's timezone.
The backfill page lists every rule and its message. For more history than one range allows, have the agent split it into ranges one after another and wait for each run to end before starting the next.
Why calling it twice is safe, and why it is not idempotent
The MCP schema reference defines idempotentHint as meaning that repeat calls with the same arguments have no further effect. etlmcp marks run_pipeline as not idempotent: each accepted call queues a new run, and a run started after the last one ended does the work again. It is also marked as not read-only and not destructive. The same reference calls every annotation a hint that may not describe the tool faithfully, and tells clients not to base decisions on annotations from a server they do not trust, so treat them as labels, not guarantees.
What keeps a retrying agent from piling up syncs is that a pipeline can have only one run queued or running. A second call while the first is still going is refused with a sync is already running for this pipeline; check it with get_run.
Two more limits can refuse a run before it is queued:
- Runs started by hand, from the dashboard, the REST API or MCP, share a cap per organization. When the cap is reached, the next is refused with
10 syncs are already queued or running: wait for one(the number is your plan's cap, shown here for Free; see pricing). Scheduled syncs do not count toward it. - A pipeline paused because the plan was lowered is refused with
this pipeline is paused by the plan's limits, and a run whose source needs reconnecting, or is no longer accessible, is refused too.
Follow the run, do not restart it
run_pipeline returns the queued run, with its id, status and date range. Have the agent pass that id to get_run to see whether the run is queued, running, succeeded, partly succeeded or failed, how many rows it read and delivered, and the error when it failed. A failure that can pass is retried by etlmcp up to 3 attempts in all, so the agent does not need to start the run again; see retries and run statuses.
Poll sparingly: every request to the MCP server counts toward the credential's limit of 120 requests a minute, shared with the REST API.
What a second run does to your destination
Running the same dates again is harmless where the destination replaces them:
- PostgreSQL: each run replaces its date range in your table.
- CSV: each run makes its own file, and a retried run replaces its earlier file.
- Webhook: each run posts its rows again, in batches, and the body carries no run id. Your receiver sees the same rows twice unless it replaces rows by date and key. Before you let an agent backfill into a webhook, make sure the receiver handles repeats.