MCP tools
The Pingdex MCP server exposes 13 tools. Every tool requires an API key with one scope, and works on the account that owns the key. See Connect a client for authentication.
| Tool | Scope | Purpose |
|---|---|---|
list_campaigns |
campaigns:manage |
List campaigns. |
get_campaign |
campaigns:manage |
Get one campaign. |
create_campaign |
campaigns:manage |
Create a campaign. |
update_campaign |
campaigns:manage |
Replace a campaign’s settings. |
list_providers |
providers:manage |
List providers. |
get_provider |
providers:manage |
Get one provider. |
create_provider |
providers:manage |
Create a provider. |
update_provider |
providers:manage |
Replace a provider. |
validate_provider |
providers:manage |
Check a provider configuration without saving or sending. |
submit_lead |
leads:ingest |
Submit a lead to a campaign. |
list_leads |
leads:read |
List leads with filters and cursor pagination. |
get_lead |
leads:read |
Get one lead summary. |
list_lead_attempts |
leads:read |
List the delivery attempts for a lead. |
Conventions
Section titled “Conventions”- Structured results. Tools return their output as structured content (
result.structuredContentin JSON-RPC). - Errors. A failure, such as a missing scope, a validation error or a record that is not found, is returned as a tool error with a message, for example
Missing required scope [providers:manage].orCampaign not found. - Read-only tools.
list_campaigns,get_campaign,list_providers,get_provider,validate_provider,list_leads,get_leadandlist_lead_attemptsare annotated as read-only.update_provideris annotated as idempotent. - Account scoping. Records from other accounts are never returned. Asking for one is reported as not found.
- Names and field rules match the HTTP API. Campaign fields follow Create a campaign and provider integrations follow the integration specification.
Campaign tools
Section titled “Campaign tools”All campaign tools require campaigns:manage.
Campaign object
Section titled “Campaign object”get_campaign, create_campaign and update_campaign return a campaign object. list_campaigns returns a list of them.
| Field | Type | Description |
|---|---|---|
id |
string | Campaign UUID. |
name |
string | Display name. |
description |
string or null | Optional description. |
enabled |
boolean | Whether the campaign accepts leads. |
routing_strategy |
string | highest_bid or priority. |
schema |
array | Lead fields. Each has name, type and required. |
providers |
array | Assigned providers in priority order. Each has id, name, quotes, enabled and priority. |
list_campaigns
Section titled “list_campaigns”List the campaigns for the account, ordered by name, with their schema fields and assigned providers.
Inputs: none.
Output:
| Field | Type | Description |
|---|---|---|
campaigns |
array | Campaign objects. |
get_campaign
Section titled “get_campaign”Get one campaign, including its schema and assigned providers.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The campaign UUID. |
Output: a campaign object. Returns Campaign not found. if there is no such campaign in the account.
create_campaign
Section titled “create_campaign”Create a campaign. Assign providers that use the same delivery mode as the routing strategy. The order of provider_ids is the priority order.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Display name. Maximum 255 characters. |
routing_strategy |
string | Yes | highest_bid or priority. highest_bid requires quote-capable providers. priority requires commit-only providers. |
description |
string | No | Maximum 2000 characters. |
enabled |
boolean | No | Whether the campaign accepts leads. Defaults to false. |
schema |
array | No | Up to 100 lead fields. Each item has name, type (string, integer, number or boolean) and required. Names are unique, up to 64 characters, and start with a letter or underscore followed by letters, digits or underscores. |
provider_ids |
array of strings | No | Provider UUIDs in priority order. The first id is priority 1. Each provider can appear once. |
Output: the created campaign object.
See Lead schema and Routing and eligibility.
update_campaign
Section titled “update_campaign”Update a campaign. This is a full replacement of the campaign’s settings, so send every field you want to keep. provider_ids replaces the assignment list and sets the priority order.
Inputs: id (string, required, the campaign UUID), plus every input of create_campaign. name and routing_strategy are still required.
Output: the updated campaign object. Returns Campaign not found. if there is no such campaign in the account.
Provider tools
Section titled “Provider tools”All provider tools require providers:manage.
Provider object
Section titled “Provider object”get_provider, create_provider and update_provider return a provider object. list_providers returns a list of them. This is the safe view of a provider. It never includes header values or secret values.
| Field | Type | Description |
|---|---|---|
id |
string | Provider UUID. |
name |
string | Display name. |
enabled |
boolean | Whether the provider is enabled. |
integration |
object or null | The native integration object with its ordered legs. |
has_headers |
boolean | true if any leg has stored headers. |
header_leg_names |
array of strings | Names of the legs that have stored headers, sorted. |
secret_names |
array of strings | Names of the stored secrets, sorted. |
Provider write inputs
Section titled “Provider write inputs”create_provider, update_provider and validate_provider share the same inputs. update_provider and validate_provider also take an id.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Display name. Maximum 255 characters. |
integration |
object | Yes | The native integration object, with an ordered legs list. See the integration specification. |
enabled |
boolean | No | Whether the provider is enabled. Defaults to false. |
headers |
object | No | HTTP headers per leg, keyed by leg name. For example { "post": { "Authorization": "Bearer ..." } }. Values are write-only. |
clear_header_legs |
array of strings | No | Leg names whose stored headers should be removed. |
secrets |
object | No | Named secrets to store, as { "name": "value" }. Values are write-only. |
clear_secret_names |
array of strings | No | Secret names to remove. |
The integration must compile. If it does not, the tool returns an error that names the failing path and reason, for example legs.0.request.fields: empty. Common causes are listed in Integration specification.
Headers and secrets you send are merged into what is already stored. Stored values that you do not mention are kept, and clear_header_legs and clear_secret_names remove values. You cannot write and clear the same leg’s headers, or the same secret, in one call. Removing a leg from the integration also removes the headers stored against it.
On update, leg names cannot be renamed. Sending the same number of legs with different names is rejected. Remove a leg and add a new one instead. An update is also rejected if the new integration is incompatible with the routing strategy of a campaign the provider is assigned to.
list_providers
Section titled “list_providers”List the providers for the account, ordered by name.
Inputs: none.
Output:
| Field | Type | Description |
|---|---|---|
providers |
array | Provider objects. |
get_provider
Section titled “get_provider”Get one provider.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The provider UUID. |
Output: a provider object. Returns Provider not found. if there is no such provider in the account.
create_provider
Section titled “create_provider”Create a provider using the same native integration structure as the JSON API.
Inputs: the provider write inputs.
Output: the created provider object.
update_provider
Section titled “update_provider”Replace a provider with a full integration document. Send the complete name, integration and enabled values, not just the parts that changed.
Inputs: id (string, required, the provider UUID), plus the provider write inputs.
Output: the updated provider object. Returns Provider not found. if there is no such provider in the account.
validate_provider
Section titled “validate_provider”Check that a provider configuration is valid, without saving it.
Inputs: the provider write inputs, plus an optional id. When you pass id, Pingdex validates your draft against that provider’s stored headers and secrets, so you can test a change without resending credentials. The stored provider is not changed.
Output:
| Field | Type | Description |
|---|---|---|
valid |
boolean | true when the configuration compiles. |
If the configuration is not valid, the tool returns an error with the compiler message instead of valid: false.
Lead tools
Section titled “Lead tools”submit_lead
Section titled “submit_lead”Submit a lead into one enabled campaign. Requires leads:ingest.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
campaign_id |
string | Yes | UUID of an enabled campaign in the account. A disabled campaign is rejected. |
payload |
object | Yes | The lead payload. Must be a JSON object, not a list. |
external_id |
string | No | Your own identifier for the lead. Maximum 255 characters. It does not deduplicate. |
idempotency_key |
string | No | Maximum 255 characters, and non-empty when present. Works like the HTTP Idempotency-Key header. |
Output:
| Field | Type | Description |
|---|---|---|
id |
string | The lead UUID. |
status |
string | The lead status after ingestion, normally received. |
Pass idempotency_key in the tool arguments, not as a header. The same key with the same campaign_id, external_id and payload returns the same lead and creates no duplicate. The same key with a different request returns the error Idempotency key was reused with a different request. The campaign id is part of the fingerprint. See Idempotency.
Submission is asynchronous. The result confirms that Pingdex received the lead, not that a buyer accepted it. Use get_lead and list_lead_attempts to follow it. See Lifecycle and statuses.
Lead summary object
Section titled “Lead summary object”get_lead returns a lead summary. list_leads returns a list of them. Summaries never include the payload.
| Field | Type | Description |
|---|---|---|
id |
string | Lead UUID. |
external_id |
string or null | Your identifier, if you set one. |
status |
string | received, processing, delivered, failed or indeterminate. |
commercial_status |
string or null | accepted, rejected or unknown, once known. |
sale_amount |
string or null | The sale amount, if known. |
received_at |
string | When Pingdex received the lead. |
selected_provider |
string or null | Name of the selected provider. |
selected_provider_id |
string or null | UUID of the selected provider. |
reporting_currency |
string | The account’s reporting currency. |
latest_attempt |
object or null | The most recent attempt, with provider_name, leg_name, leg_role, status and duration_ms. |
campaign_id |
string or null | Campaign UUID. |
campaign_name |
string or null | Campaign name. |
list_leads
Section titled “list_leads”List leads for the account, newest first, with cursor pagination. Requires leads:read.
Inputs: all optional.
| Field | Type | Description |
|---|---|---|
campaign_id |
string | Filter by campaign UUID. |
status |
string | Filter by lead status. |
commercial_status |
string | Filter by commercial status. |
external_id |
string | Exact external_id match. |
received_from |
string | Inclusive lower bound on received_at, as an ISO 8601 date or datetime. |
received_to |
string | Inclusive upper bound on received_at. A date with no time includes the whole day. |
per_page |
integer | Page size from 1 to 100. Defaults to 50. |
cursor |
string | The opaque next_cursor from a previous response. |
Output:
| Field | Type | Description |
|---|---|---|
data |
array | Lead summary objects. |
next_cursor |
string or null | Cursor for the next page. Present when has_more is true. |
per_page |
integer | The page size used. |
has_more |
boolean | Whether another page exists. |
An invalid status, commercial_status, date or cursor is returned as a validation error.
get_lead
Section titled “get_lead”Get one lead summary. Requires leads:read.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The lead UUID. |
Output: a lead summary object. Returns Lead not found. if there is no such lead in the account.
list_lead_attempts
Section titled “list_lead_attempts”List the delivery attempts for one lead, oldest first. Requires leads:read.
Inputs:
| Field | Type | Required | Description |
|---|---|---|---|
lead_id |
string | Yes | The lead UUID. |
Output:
| Field | Type | Description |
|---|---|---|
attempts |
array | Attempt objects, oldest first. |
Each attempt object has:
| Field | Type | Description |
|---|---|---|
id |
string | Attempt UUID. |
provider_id |
string | Provider UUID. |
provider_name |
string | Provider name. |
leg_name |
string | The integration leg that made the request. |
leg_role |
string | quote or commit. |
status |
string | The attempt status. |
commercial_status |
string or null | The commercial outcome of the attempt, if known. |
bid_amount |
string or null | The bid returned by a quote leg. |
sale_amount |
string or null | The sale amount returned by a commit leg. |
response_status |
integer or null | The HTTP status returned by the buyer. |
error_code |
string or null | A Pingdex error code, if the attempt failed. |
selected |
boolean | Whether this attempt’s quote was selected. |
attempted_at |
string | When the attempt started. |
completed_at |
string or null | When the attempt finished. |
duration_ms |
integer or null | How long the attempt took, in milliseconds. |
Buyer transaction ids and rejection reasons are omitted. See Attempts for status and error code meanings.