Skip to main content
Glama

Duplicate a Porter report with new source accounts

duplicate_report

Duplicate 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 labeled main and 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 the account_id from list_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

NameRequiredDescriptionDefault
nameNo
paramsNo
report_idYes
account_mapNo
accounts_usedNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, and the description adds substantial context beyond them: the copy is owned by the caller and starts PRIVATE without inheriting the original's audience, uncovered connectors surface in warnings as empty 'select an account' charts, saved blends are not carried over when accounts change, and diagnostics.audit_status is deferred so charts are audited in the background. It also discloses authorization scope (own reports plus public-by-link/shared-with-you reports).

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 purpose and the two mutually exclusive options are front-loaded, and the bulleted structure separates re-pointing, params, ownership and return behavior cleanly. It is nonetheless long and repeats itself in places ('Never decline to duplicate: the accounts re-point either way' restates the accounts rule), so a few sentences could be trimmed without losing meaning.

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?

Despite the output schema existing, the definition still names the returned fields (report_id, url, connectors_used, warnings/diagnostics) and tells the agent to hand the url over immediately. For a five-parameter mutation tool with an unusual ownership/permission model, nothing an agent needs to call it correctly or explain the result to a user is missing.

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?

Schema coverage is 0%, so the description carries the full burden and does so for all five parameters: report_id also accepts a pasted report URL, account_map re-points individual labeled slots while preserving others, accounts_used replaces the entire set with automatic ref expansion and optional label assignment, params is a patch where null deletes a key and unmentioned keys are kept, and name defaults to 'Copy of …'. It even explains the conditional effectiveness of params via get_report's reads_params (true/false/null).

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 definition leads with a specific verb and resource ('Duplicate a report into a byte-identical copy') and immediately qualifies the variation ('optionally re-pointed at new source accounts and a new client'). It goes further and positions itself against the build-from-scratch path with 'THE way to make "this same report, for account/client X": one call, no build, no download', so an agent can tell what this tool is for without consulting siblings.

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?

It states the precondition explicitly (the source must have a published version, i.e. a successful edit_report upload, or the call is rejected), points at get_report to discover account_slots/params first, and gives mutual exclusion between the two re-pointing options ('pass at most ONE'). It also distinguishes the clone-verbatim case (own reports only) from the re-point-required case (public/shared reports) and routes to preview_report only when the render must be verified now.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources