Duplicate a Porter report with new source accounts
duplicate_reportDuplicate a report into a byte-identical copy, optionally re-pointed at new source accounts and a new client.
THE way to make "this same report, for account/client X": one call, no
build, no download. get_report first shows the source's
account_slots and params, which is all a copy needs.
The SOURCE must already have a published version — what gets copied is its last
successful edit_report upload. A report created but never uploaded is listed
ACTIVE with a placeholder url and holds nothing, so duplicating it is rejected
instead of producing an empty copy.
report_id also accepts the report's URL (report.portermetrics.com/<id>) —
handy when the user pastes a link. You can duplicate YOUR reports and any report
that is public by link or shared with you (role, domain or company share).
Two ways to re-point (pass at most ONE):
account_map— re-point specific SLOTS by their label, keeping every other account unchanged.{"main": "<account_id>"}swaps only the account labeledmainand leaves the rest (e.g. a shared "benchmark" account) as-is. This is the way to "change some accounts, keep others". Requires the source report's accounts to be labeled.accounts_used— REPLACE the whole account set (each entry just theaccount_idfromlist_accounts— the ref is expanded automatically; add a{"account_id": ..., "label": "main"}shape to also (re)assign slot labels).
params patches the source's params for the copy — the values the report
reads with useReportParams (client name, logo, campaign, budgets): name
only what changes ({"client": {"name": "Acme"}}), null deletes a
key, the rest is kept. Whether they take effect is get_report's
reads_params: true → they do (even when the source stored none);
false → the brand is compiled in (or it is a spec report: republish the
copy's spec instead); null → unknown, pass them and check the copy with
preview_report. Never decline to duplicate: the accounts re-point
either way. When the brand cannot follow, hand the copy over, say so, and
offer the one-time fix in report-copy-for-another-account. name is
the copy's name (default "Copy of …").
Omit both account options to clone verbatim (same accounts) — that works only on reports you OWN.
Duplicating someone else's (public/shared) report REQUIRES re-pointing at accounts
that are YOURS: pass accounts_used, or an account_map covering every slot.
The copy is owned by you, named name (or "Copy of …"), and starts PRIVATE —
it never inherits the original's audience.
The new accounts should cover the same connectors the report uses; any connector
left uncovered comes back in warnings (those charts render an empty "select an
account" state). Saved blends are NOT carried over when the accounts change.
Returns the new report_id, url, connectors_used and optional
warnings/diagnostics in seconds: the copy answers as soon as it exists
and its charts are checked against its accounts in the background
(diagnostics.audit_status is deferred; get_report's health shows the
outcome). Hand the url over right away; run preview_report only when the
user wants the render verified now.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"report_id": "<report_id>"
},
"name": "duplicate_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| params | No | ||
| report_id | Yes | ||
| account_map | No | ||
| accounts_used | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||