TrustData
API and agents

CLI reference

Every trustdata command, its flags, and whether it reads or writes.

TrustData from the terminal. Every tool the TrustData MCP server exposes is a command here: trustdata <resource> <verb> [flags]. Run trustdata actions for the catalog with each action's effect and the scope it needs.

Output is a table on a terminal and JSON on a pipe. --output overrides that. Errors are JSON on stderr with exit 1 general, 2 auth, 3 validation, 4 confirmation required, 5 rate-limited. A write runs only with --confirm. The CLI never prompts.

Auth: TRUSTDATA_TOKEN, else the profile written by trustdata login --token.

Install and first steps: Quickstart.

Global flags

FlagMeaning
--confirmrun a write or destructive action. Without it the action is described and exit code 4 is returned
--fields <fields>keep only these keys in each row
--no-default-propertydo not fill property_id from TRUSTDATA_PROPERTY or the profile, so an optional property_id stays organisation-wide
--non-interactiveaccepted for parity with other CLIs. trustdata never prompts
--output <output>json|table|csv|ndjson (default: table on a terminal, json on a pipe)
--profile <profile>profile from the config file (default: TRUSTDATA_PROFILE, then the active profile)
--retry <retry>retry a rate-limited call after its Retry-After, and a transport error on an idempotent tool, up to this many times
--timeout <timeout>give up on the request after this long

Commands

Effect is read, write or destructive — the same classification the MCP server advertises. A write or destructive command runs only with --confirm. Without it, a command that has a --dry-run flag asks the server for its plan and returns it with exit 4.

actions

Actions

trustdata actions list — read

Every tool this server exposes, with its effect and the scope it needs.

  • --include-schema — default true
  • --mine — only the actions this token can call

alerts

Alerts

trustdata alerts list — read

Active, acknowledged, or resolved alerts for the caller's organization.

  • --end-date <end-date>
  • --limit <limit> — default 50
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date>
  • --status <status> — one of: active, acknowledged, resolved, any · default active

trustdata alerts update — destructive

Set an alert's status.

  • --alert-id <alert-id> (required) — uuid
  • --status <status> (required) — one of: acknowledged, resolved

anomalies

Anomalies

trustdata anomalies list — read

Investigation rows: anomaly triage status, verdict, diagnosis.

  • --end-date <end-date> (required) — date
  • --limit <limit> — default 50
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date
  • --status <status>
  • --verdict <verdict>

attribution

Attribution

trustdata attribution get — read

Multi-touch attribution: per-entity credit, journeys and Sankey data.

  • --all — follow next_offset and return every page as one result
  • --date-by <date-by>
  • --dimension <dimension> — one of: channel, campaign, adgroup, ad, keyword · default channel
  • --end-date <end-date> (required) — date
  • --limit <limit> — default 100
  • --max-journeys <max-journeys> — default 50
  • --max-rows <max-rows> — with --all, stop after this many rows and say so in meta.stopped_by
  • --model <model> — one of: first_click, last_click, last_non_direct, linear, position, time_decay, shapley, custom · default shapley
  • --offset <offset> — default 0
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

attribution-ids

Attribution ids

trustdata attribution-ids list — read

Enumerate AttributionIDs (tracking stream UUIDs) per property.

  • --organization-id <organization-id>
  • --property-id <property-id>

trustdata call

Call any tool by its MCP name, with raw JSON arguments.

  • --params <params> — the tool's arguments as one JSON object, or @file.json, or - for stdin

change-events

Change events

trustdata change-events create — write

Report a change you made, so TrustData can measure what it did.

  • --changed-at <changed-at> (required) — date
  • --description <description>
  • --event-type <event-type> (required) — one of: content_rewrite, schema_add, new_page, link_outreach, code_deploy, gtm_publish, manual, other
  • --external-id <external-id>
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --recommendation-id <recommendation-id>
  • --source <source> — default mcp_agent
  • --target-units <target-units>
  • --title <title> (required)
  • --unit-kind <unit-kind> — one of: prompt, keyword, url
  • --url <url>

trustdata change-events list — read

Changes on the timeline — reported, and auto-detected — with their verdicts.

  • --all — follow next_offset and return every page as one result
  • --end-date <end-date> (required) — date
  • --event-type <event-type>
  • --limit <limit> — default 100
  • --max-rows <max-rows> — with --all, stop after this many rows and say so in meta.stopped_by
  • --offset <offset> — default 0
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

citation-gaps

Citation gaps

trustdata citation-gaps list — read

Domains cited by LLMs that don't link back to the brand.

  • --days <days> — default 30
  • --limit <limit> — default 20
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

competitors

Competitors

trustdata competitors list — read

Enumerate tracked competitors (CompetitorSlug).

  • --organization-id <organization-id>
  • --property-id <property-id>

context

Context

trustdata context get — read

What the business has told TrustData about itself, for a property or one of its tracking streams.

  • --attribution-id <attribution-id>
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

custom-fields

Custom fields

trustdata custom-fields add — write

Register a param as a custom dimension or metric, so reports can use it.

  • --aggregation <aggregation> — one of: sum, avg, max · default sum
  • --declared-non-pii — default false
  • --dry-run — default false
  • --key <key> (required)
  • --kind <kind> — one of: dimension, metric · default dimension
  • --label <label> (required)
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --scope <scope> — one of: event, item · default event
  • --unit <unit> — one of: count, currency, duration · default count

trustdata custom-fields list — read

List the custom dimensions and metrics registered on a property.

  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

trustdata custom-fields remove — destructive

Remove a custom dimension or metric from a property and free its slot.

  • --dry-run — default false
  • --key <key> (required)
  • --kind <kind> — one of: dimension, metric · default dimension
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --scope <scope> — one of: event, item · default event

data-sources

Data sources

trustdata data-sources call — read

Call the API of one connected Google Ads, Search Console, Google Analytics or Meta Ads data source.

  • --body <body> — JSON
  • --data-source-id <data-source-id> (required) — uuid
  • --method <method> (required)
  • --params <params> — JSON
  • --path <path> (required)

trustdata data-sources describe-warehouse — read

Describe the tables of one connected BigQuery warehouse.

  • --data-source-id <data-source-id> (required) — uuid

trustdata data-sources list — read

Enumerate the ad-platform data sources (Google, Facebook, TikTok Ads, …).

  • --organization-id <organization-id>
  • --property-id <property-id>

trustdata data-sources query-warehouse — read

Run one SELECT against a connected BigQuery warehouse.

  • --data-source-id <data-source-id> (required) — uuid
  • --sql <sql> (required)

dossiers

Dossiers

trustdata dossiers add — write

Keep an analysis in a dossier, so it outlives the conversation.

  • --blocks <blocks> (required) — JSON
  • --dossier-id <dossier-id>
  • --idempotency-key <idempotency-key> (required)
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --title <title>
  • --version <version>

trustdata dossiers read — read

Read a dossier back, to continue an analysis or see what is already in it.

  • --dossier-id <dossier-id>
  • --offset <offset> — default 0
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

fields

Fields

trustdata fields list — read

List the metrics and dimensions you can use, and which ones fit together.

  • --all — follow next_offset and return every page as one result
  • --category <category>
  • --dataset <dataset>
  • --dimensions <dimensions>
  • --kind <kind> — one of: metric, dimension
  • --limit <limit> — default 100
  • --max-rows <max-rows> — with --all, stop after this many rows and say so in meta.stopped_by
  • --metrics <metrics>
  • --offset <offset> — default 0
  • --search <search>
  • --show <show> — one of: all, compatible, incompatible · default all

funnel

Funnel

trustdata funnel run — read

Funnel steps in order, with the drop-off between them.

  • --dimensions <dimensions>
  • --end-date <end-date> (required) — date
  • --limit <limit> — default 100
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

geo

Geo

trustdata geo get — read

Country breakdown for the date range.

  • --end-date <end-date> (required) — date
  • --limit <limit> — default 100
  • --metric <metric> — default conversions
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

geo-visibility

Geo visibility

trustdata geo-visibility get — read

AI search (GEO) visibility: KPIs, keyword gaps and share of voice.

  • --days <days> — default 30
  • --gap-limit <gap-limit> — default 20
  • --include-gaps — default true
  • --include-share-of-voice — default true
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

investigations

Investigations

trustdata investigations ask — write

Ask a question about an investigation, answered from the evidence it already gathered. The tool re-queries nothing, so it declines a question the evidence does not cover rather than estimate an answer. For fresh data, use ask_investigation_followup.

  • --investigation-id <investigation-id> (required)
  • --organization-id <organization-id>
  • --question <question> (required)

trustdata investigations ask-followup — write

Request an extra data check on an investigation. Runs in the background against the live data. The result appears as a new check in get_investigation. Read-only requests only: the tool rejects anything that would change something.

  • --investigation-id <investigation-id> (required)
  • --organization-id <organization-id>
  • --request-text <request-text> (required)

trustdata investigations get — read

One investigation in full: diagnosis, every check that ran, and the evidence behind each. Use list_anomalies to find the id.

  • --investigation-id <investigation-id> (required)
  • --organization-id <organization-id>

trustdata investigations submit-verdict — destructive

Report whether a diagnosis was right: correct, partial or wrong. Verdicts train the diagnosis rulebook, so a correction is worth as much as a confirmation. Works only while the investigation is pending review.

  • --investigation-id <investigation-id> (required)
  • --notes <notes>
  • --organization-id <organization-id>
  • --verdict <verdict> (required)

trustdata login

Store an API token in a profile and make it the active one.

  • --profile <profile> — profile name to write
  • --property <property> — default property_id for every tool that takes one (TRUSTDATA_PROPERTY overrides it)
  • --token <token> (required) — the API token (td_live_...)
  • --url <url> — MCP endpoint for this profile (default https://mcp.trustdata.tech/mcp/)

ltv

Ltv

trustdata ltv get — read

Cumulative LTV curves and per-channel breakdown.

  • --cohort-type <cohort-type> — one of: weekly, monthly · default weekly
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --start-date <start-date> (required) — date

metrics

Metrics

trustdata metrics query — read

Aggregated marketing metrics for a date range, broken down by ONE dimension.

  • --all — follow next_offset and return every page as one result
  • --date-by <date-by>
  • --dimensions <dimensions>
  • --end-date <end-date> (required) — date
  • --limit <limit> — default 100
  • --max-rows <max-rows> — with --all, stop after this many rows and say so in meta.stopped_by
  • --metrics <metrics>
  • --offset <offset> — default 0
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --spec <spec> — JSON
  • --start-date <start-date> (required) — date

prompts

Prompts

trustdata prompts list — read

Enumerate BrandPrompts tracked for GEO probes.

  • --only-active — default true
  • --organization-id <organization-id>
  • --property-id <property-id>

properties

Properties

trustdata properties list — read

Enumerate AttributionProperties the caller's organization can see.

query-types

Query types

trustdata query-types instructions — read

Read this before you compose a report or report a change.

trustdata query-types list — read

Deprecated: prefer list_fields.

recommendations

Recommendations

trustdata recommendations create — write

Create a new recommendation sourced from the calling agent.

  • --action <action> (required)
  • --category <category> (required) — one of: content, prompts, off_page, on_page, social, news, general
  • --change-note <change-note>
  • --change-type <change-type> — one of: content_rewrite, schema_add, new_page, link_outreach, other
  • --change-url <change-url>
  • --channel <channel> (required) — one of: seo, geo, sea, paid_social, display, cross_channel
  • --effort-level <effort-level> — one of: quick_win, medium, strategic · default medium
  • --engines <engines>
  • --hypothesis <hypothesis> (required)
  • --impact <impact>
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --target-prompt-ids <target-prompt-ids>
  • --target-url <target-url>
  • --title <title> (required)
  • --urgency <urgency> — one of: high, medium, low · default medium

trustdata recommendations dismiss — destructive

Dismiss a recommendation: the user decided not to act on it.

  • --note <note>
  • --reason <reason> — one of: wrong_evidence, already_done, not_priority, bad_fix, other
  • --recommendation-id <recommendation-id> (required) — uuid

trustdata recommendations list — read

AI-generated recommendations for a property, filtered by status.

  • --last-n-weeks <last-n-weeks> — default 12
  • --limit <limit> — default 50
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --status <status> — one of: open, dismissed, followed, concluded, all · default open
  • --verdict <verdict> — one of: winner, likely_winner, no_effect, regressed, inconclusive, cannot_judge, no_verdict

trustdata recommendations mark-done — destructive

Mark a recommendation as followed, with an optional change-ledger entry.

  • --change-date <change-date>
  • --change-note <change-note>
  • --change-type <change-type>
  • --change-url <change-url>
  • --recommendation-id <recommendation-id> (required) — uuid

trustdata recommendations show — read

Show the open recommendations as cards in the chat, three at a time.

  • --limit <limit> — default 50
  • --organization-id <organization-id>
  • --property-id <property-id>

report

Report

trustdata report chart — read

Show a report as a chart in the chat: the same read as run_report, drawn.

  • --chart-type <chart-type> (required) — one of: line, area, bar, pie, funnel
  • --compare — default false
  • --compare-mode <compare-mode> — one of: previous_period, previous_period_aligned, previous_year, previous_year_dow · default previous_period
  • --date-by <date-by>
  • --dimensions <dimensions>
  • --end-date <end-date> (required) — date
  • --filters <filters> — JSON
  • --limit <limit> — default 100
  • --metrics <metrics>
  • --order-by <order-by>
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

trustdata report run — read

Any metric by up to five dimensions over a date range, without picking a table.

  • --all — follow next_offset and return every page as one result
  • --chart-type <chart-type> — one of: table, line, area, bar, pie, funnel
  • --compare — default false
  • --compare-mode <compare-mode> — one of: previous_period, previous_period_aligned, previous_year, previous_year_dow · default previous_period
  • --dataset <dataset>
  • --date-by <date-by>
  • --dimensions <dimensions>
  • --end-date <end-date> (required) — date
  • --filters <filters> — JSON
  • --granularity <granularity>
  • --limit <limit> — default 100
  • --max-rows <max-rows> — with --all, stop after this many rows and say so in meta.stopped_by
  • --metrics <metrics>
  • --offset <offset> — default 0
  • --order-by <order-by>
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

retention

Retention

trustdata retention get — read

Cohort retention heatmap and per-channel comparison.

  • --cohort-type <cohort-type> — one of: weekly, monthly · default weekly
  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --start-date <start-date> (required) — date

search-terms

Search terms

trustdata search-terms list — read

List the search terms a property watches, or could watch.

  • --days <days> — default 30
  • --include-brand — default false
  • --page <page> — default 1
  • --page-size <page-size> — default 50
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --status <status> — one of: watching, suggested, auto, dismissed, all · default watching

trustdata search-terms unwatch — destructive

Stop watching a search term and free the readings it held.

  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --term <term> (required)

trustdata search-terms update-watch — destructive

Change a watched term's cadence, locations or devices.

  • --cadence-hours <cadence-hours>
  • --devices <devices>
  • --locations <locations> — JSON
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --term <term> (required)

trustdata search-terms watch — write

Watch one or more search terms, or report what watching them would cost.

  • --cadence-hours <cadence-hours> — default 24
  • --devices <devices>
  • --dry-run — default false
  • --locations <locations> — JSON
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default
  • --terms <terms> (required)

seo-keywords

Seo keywords

trustdata seo-keywords list — read

SEO keyword intelligence: Search Console rankings joined with search volume, keyword difficulty, first-party revenue, and the keyword's funnel stage, query archetype and persona ('' when unclassified). Filter min_position / max_position for quick wins (4-10), min_revenue_uplift for value, funnel_layer (D = TOFU, C = MOFU, U = BOFU: the KeywordClassification codes) or persona_slug (slugs from list_brand_prompts) for one stage or audience.

  • --days <days> — default 30
  • --funnel-layer <funnel-layer>
  • --limit <limit> — default 100
  • --max-position <max-position>
  • --min-position <min-position>
  • --min-revenue-uplift <min-revenue-uplift>
  • --organization-id <organization-id>
  • --persona-slug <persona-slug>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

signals

Signals

trustdata signals list — read

What happened lately: anomalies, alerts and logged changes in one feed.

  • --days <days> — default 30
  • --kind <kind> — one of: all, anomaly, alert, change_event · default all
  • --limit <limit> — default 50
  • --organization-id <organization-id>
  • --property-id <property-id>

strategy

Strategy

trustdata strategy get — read

The property's active strategy: its goal, and how the period is pacing.

  • --organization-id <organization-id>
  • --property-id <property-id> — uuid · required unless TRUSTDATA_PROPERTY or the profile sets a default

timeline

Timeline

trustdata timeline get — read

Date-aggregated series for one metric.

  • --date-by <date-by>
  • --end-date <end-date> (required) — date
  • --granularity <granularity> — one of: day, week, month · default day
  • --metric <metric> — default last_non_direct_conversions
  • --organization-id <organization-id>
  • --property-id <property-id>
  • --start-date <start-date> (required) — date

trustdata version — read

Print the version and platform. No network call.