<!-- The markdown copy of https://oppalerts.com/docs/mcp/campaigns_dashboard . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [MCP](https://oppalerts.com/docs/mcp/) / campaigns_dashboard

# campaigns_dashboard

`POST https://mcp.oppalerts.com/mcp tool: campaigns_dashboard`

Campaign dashboard data: the opportunities counted each day on each index, the PageRank of every organization host month by month, and the index links found over time.

## What it does

The tool reads the dashboard of one campaign. `campaign` is required. The answer has three parts:

- `opportunities`: the active opportunities of the campaign, with the number found each day in the News Index (`news`) and in the Prospect Index (`prospects`). Each count includes status flags. `news_partial` and `prospects_partial` are `true` when more than 15,000 pages matched the saved opportunity on that day: that count then comes from only part of the matches, and the real number can be higher. `news_not_counted` and `prospects_not_counted` are `true` when that count stopped with an error, for example when the search took more than 10 seconds: the count is then 0, but no count was taken. `news_not_counted_yet` and `prospects_not_counted_yet` are `true` when no count is stored for that index on that day: the count is then 0. A day with no stored count on both indexes is not in `counts`. `dates` lists the days of the counts.
- `counts_rebuild`: the state of rebuilding the missing and outdated daily counts, which [campaigns_rebuild_counts](https://oppalerts.com/docs/mcp/campaigns_rebuild_counts) starts. One daily count is one saved opportunity on one index on one day, for the active saved opportunities and the 14 days of the last daily run. `state` is `none`, `waiting`, `running`, or `stopped` (the last count stopped because of an error; campaigns_rebuild_counts starts it again). `started_at` is the time when counting was requested or began, empty when `state` is `none`. `counts_written` is the number of daily counts that are stored, `counts_expected` is the number that a complete set has, and `counts_missing` is the number that is not stored. `organizations_changed_at` is the time when the organizations changed after the counts were taken, empty when the counts match the organizations. `counts_to_recount` is the number of stored daily counts of a brand search that were taken before that time, 0 when `organizations_changed_at` is empty.
- `pr`: the PageRank of each organization host, month by month, as `domain`, `host`, and `www`. `pr_available` is `false` when the PageRank could not be read. The other parts are still returned.
- `links`: the links found over time to each organization, for `news` and for `prospects`. Each day has `links_to_date`, the links found up to that day, and `links_that_day`, the links found that day.

This tool has its own daily count, and it needs a campaign of your account. It is not an index search, so it is not part of the shared count of the `news_` and `prospects_` tools. [account_calls_left](https://oppalerts.com/docs/mcp/account_calls_left) shows the calls that are left today.

## Connect

```bash
claude mcp add --transport http oppalerts https://mcp.oppalerts.com/mcp
```

The first call opens a browser window for the OppAlerts login. [Connect an AI Agent](https://oppalerts.com/docs/mcp/) has the details.

## Parameters

**`campaign`int, required, 1 to 4294967295**

The campaign id, from [campaigns_list](https://oppalerts.com/docs/mcp/campaigns_list). It must be a campaign of your account.

## Strict Rules

- A field that is not in the list above is refused. The result then has `isError` true, and its text starts with `bad_param`. The error names the field: "<field> is not a field of this tool." The old name of a renamed field is refused in the same way.
- A bad value is refused, and the error names the field. A bad value is a value of the wrong type, a number with a fraction for a whole-number field, a value out of its range, or a value that is not in its list. A required field that you do not send is refused too. The tool never changes a value that you send.
- An error about the format of a call, such as a refused field, names the field. Its message ends with one sentence: "Read the documentation at https://oppalerts.com/docs for the correct format." Every other error has only its own sentence.

## Example

### Call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "campaigns_dashboard",
    "arguments": {
      "campaign": 3
    }
  }
}
```

### Response

The full sample answer.

```json
{
  "dates": [
    "2026-08-29",
    "2026-08-30",
    "2026-08-31"
  ],
  "opportunities": [
    {
      "id": 12,
      "label": "Media kits naming boutique hotels",
      "counts": {
        "2026-08-30": {
          "news": 17,
          "news_partial": false,
          "news_not_counted": false,
          "news_not_counted_yet": false,
          "prospects": 4,
          "prospects_partial": false,
          "prospects_not_counted": false,
          "prospects_not_counted_yet": false
        },
        "2026-08-31": {
          "news": 9,
          "news_partial": false,
          "news_not_counted": false,
          "news_not_counted_yet": false,
          "prospects": 6,
          "prospects_partial": false,
          "prospects_not_counted": false,
          "prospects_not_counted_yet": false
        }
      }
    }
  ],
  "counts_rebuild": {
    "state": "running",
    "started_at": "2026-08-31T10:02:11Z",
    "counts_written": 18,
    "counts_expected": 28,
    "organizations_changed_at": "2026-08-30T21:40:03Z",
    "counts_missing": 10,
    "counts_to_recount": 0
  },
  "pr_available": true,
  "pr": {
    "example-hotels.com": {
      "2026-07": {
        "domain": 57,
        "host": 31,
        "www": 55
      },
      "2026-08": {
        "domain": 58,
        "host": 31,
        "www": 56
      }
    }
  },
  "links": {
    "news": {
      "example-hotels.com": {
        "2026-08-30": {
          "links_to_date": 412,
          "links_that_day": 3
        },
        "2026-08-31": {
          "links_to_date": 415,
          "links_that_day": 3
        }
      }
    },
    "prospects": {
      "example-hotels.com": {
        "2026-08-31": {
          "links_to_date": 8120,
          "links_that_day": 12
        }
      }
    }
  }
}
```

## Errors

An error returns as a tool result with `isError` true. Its text starts with the error code, except for `daily_limit`, whose text is only the sentence. The HTTP status shown for each code is its API status.

- `bad_param` (HTTP 400 in the API): a field is not a field of this tool, a required field is not sent, or a value has the wrong type or is out of its range. The error names the field.
- `no_campaign` (HTTP 404 in the API): the campaign is not a campaign of your account.
- `db_error` (HTTP 500 in the API): the data could not be read. The sentence says which data. Try again in a few minutes.
- `daily_limit` (HTTP 429 in the API): the account has used all its calls for this tool today. [account_calls_left](https://oppalerts.com/docs/mcp/account_calls_left) shows when the count resets.

This tool has its own daily count. A call through the API or MCP uses one call from this count. A web app page reading the same data does not count. It is not an index search, so it does not use the shared count of the `news_` and `prospects_` tools, and the error `one_at_a_time` does not apply to it.

## Same data in the API

```http
POST /v1/campaigns/dashboard HTTP/1.1
Host: api.oppalerts.com
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{"campaign": 3}
```

The API page is [POST /v1/campaigns/dashboard](https://oppalerts.com/docs/api/campaigns_dashboard).

## Related pages

- [POST /v1/campaigns/dashboard in the API](https://oppalerts.com/docs/api/campaigns_dashboard)
- [Edit Campaign in the web app: the Dashboard tab](https://oppalerts.com/docs/app/campaign/edit)
- [campaigns_list](https://oppalerts.com/docs/mcp/campaigns_list)
- [account_calls_left](https://oppalerts.com/docs/mcp/account_calls_left)
- [Use case: review client campaign progress](https://oppalerts.com/docs/how-to/review-client-campaign-progress)
