> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Discovery Agent Tools

> MCP tools to set up Discovery Agents, start searches, and review the prospects they find

## Overview

A Discovery Agent keeps searching the web for websites that could promote your product as affiliates. You brief it once with your website, product, audience, and search sources (keywords and competitors). It searches on its own and delivers matches for you to review. Approving a match starts the contact email search for it, the same as in the dashboard. The agent also suggests new competitors and topics and waits for your yes or no before it searches them. It does not contact anyone for you.

The Discovery Agent tools mirror the REST endpoints under `/v1/discovery`. Each tool section links to its REST page for the full response fields. All tools support `response_format` (`markdown` or `json`, default `markdown`). `responseFormat` is accepted as an alias. Markdown returns the same JSON payload inside a fenced `json` block, and `structuredContent` always holds the result.

> [!NOTE]
>
> Read tools need `read:discovery`. Tools that change data need `write:discovery`, which also grants `read:discovery`. There is no `delete:discovery` scope: deleting an agent needs `write:discovery`. Creating an agent, resuming an agent, and starting a run also need a plan that includes the Discovery Agent.

> [!NOTE]
>
> The Affiliate Finder tools are discontinued. Use these tools instead. See [Finder tools](https://docs.affonso.io/mcp/tools/finder.md).

List tools use `limit` (1 to 100, default 20) and `offset` (default 0), not `page`. Their `pagination` object reports `total`, `count`, `offset`, `limit`, `has_more`, and `next_offset` when another page exists.

## Available Tools

| Tool | Description | Permission |
| - | - | - |
| `affonso_get_discovery_setup_defaults` | Channels, exclusion groups, and source limits for a new agent | `read:discovery` |
| `affonso_get_discovery_email_searches` | Email searches included, used, and left this month | `read:discovery` |
| `affonso_get_discovery_domain` | Read the saved public profile of a root domain | `read:discovery` |
| `affonso_create_discovery_agent` | Create an agent and request its first search step | `write:discovery` |
| `affonso_list_discovery_agents` | List your team's agents | `read:discovery` |
| `affonso_get_discovery_agent` | Get one agent with its brief, sources, and latest run | `read:discovery` |
| `affonso_update_discovery_agent` | Change the brief, sources, or `auto_approve` | `write:discovery` |
| `affonso_delete_discovery_agent` | Delete an agent. Runs and matches are kept | `write:discovery` |
| `affonso_pause_discovery_agent` | Stop an agent from starting new runs | `write:discovery` |
| `affonso_resume_discovery_agent` | Turn a paused agent live again | `write:discovery` |
| `affonso_get_discovery_agent_overview` | State, blockers, match counts, and the last 8 runs | `read:discovery` |
| `affonso_get_discovery_agent_lookalikes` | Read the lookalike page URLs | `read:discovery` |
| `affonso_update_discovery_agent_lookalikes` | Replace the lookalike page URLs | `write:discovery` |
| `affonso_start_discovery_agent_run` | Ask the agent to search now | `write:discovery` |
| `affonso_list_discovery_agent_runs` | List search runs | `read:discovery` |
| `affonso_list_discovery_search_cursors` | See how far each search query has been read | `read:discovery` |
| `affonso_list_discovery_agent_matches` | List delivered prospects | `read:discovery` |
| `affonso_get_discovery_match` | Get one match with its review decision and contact status | `read:discovery` |
| `affonso_review_discovery_match` | Approve, reject, mark contacted, or mark won | `write:discovery` |
| `affonso_list_discovery_agent_directions` | List topics, competitors, and similar products to search | `read:discovery` |
| `affonso_decide_discovery_direction` | Accept or reject a suggested direction | `write:discovery` |
| `affonso_list_discovery_similar_products` | List similar products linked to the agent's directions | `read:discovery` |
| `affonso_list_discovery_hard_list` | List blocked domains and creators | `read:discovery` |
| `affonso_get_discovery_hard_list_item` | Get one blocked domain or creator | `read:discovery` |
| `affonso_list_discovery_exclusion_proposals` | List proposed exclusions | `read:discovery` |
| `affonso_get_discovery_exclusion_proposal` | Get one proposed exclusion | `read:discovery` |

## Workflow

1. **Create** the agent with `affonso_create_discovery_agent` from a manual brief: website, product, audience, and at least one keyword or competitor URL. It requests its first search step on its own.
2. **Start a run** with `affonso_start_discovery_agent_run` when you want it to search now. Check progress with `affonso_get_discovery_agent_overview`.
3. **List matches** with `affonso_list_discovery_agent_matches`, for example with `bucket` set to `new`.
4. **Review** each match with `affonso_review_discovery_match`. Approve to start the contact email search, or reject. There is no separate tool to start an email search for one prospect. Check how many email searches are left with `affonso_get_discovery_email_searches`.

```
Create a Discovery Agent for https://example.com that finds blogs about email marketing for small shops
Start a run for my Discovery Agent and show me the overview
Show the new matches for my Discovery Agent and approve the ones with the highest fit score
```

## Errors

Errors are returned as tool errors with the same message as the matching REST error, for example `Discovery agent not found` or `Discovery Agent needs an active plan`. A connection without the required scope gets a tool error naming the missing scope. Invalid arguments return a validation error.

***

## affonso\_get\_discovery\_setup\_defaults

Returns the channels, default language, exclusion groups, and the maximum keywords (25), competitors (25), and lookalike URLs (5) per agent. Same as [Get setup defaults](https://docs.affonso.io/api/endpoint/discovery/get-setup-defaults.md).

### Parameters

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_email\_searches

Returns the team's monthly limit (`data.included`) and remaining credits (`data.remaining`) for its plan, plus `data.used` for the current month. For the allowance on each plan, see [Discovery credits](https://affonso.io/help/affiliate-finder/discovery-credits). Same as [Get email searches](https://docs.affonso.io/api/endpoint/discovery/get-email-searches.md).

### Parameters

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_domain

Reads the saved public profile of a root domain. Does not crawl, refresh, or buy data. Same as [Get domain profile](https://docs.affonso.io/api/endpoint/discovery/get-domain-profile.md), except that a missing profile returns `data: null` instead of an error.

### Parameters

**domain** `string` *required*

Root domain, for example `example.com`. 3 to 253 characters.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_create\_discovery\_agent

Creates a Discovery Agent from a manual brief and requests its first search step. `website`, `product_brand`, `audience`, and at least one keyword or competitor URL are required. Lookalikes are not accepted here. Needs an active plan. Same as [Create an agent](https://docs.affonso.io/api/endpoint/discovery/create-agent.md).

Invalid or missing fields return a tool error whose JSON has the same `VALIDATION_ERROR` body and `details` as the REST endpoint. For example, a call with only `website` lists `product_brand` and `audience` as `Required` and both `keywords` and `competitors` as `Provide at least one keyword or competitor`. The MCP request itself still succeeds over HTTP, and the error is in the tool result.

### Parameters

**website** `string` *required*

Public `http` or `https` product website.

**name** `string`

Display name, 1 to 160 characters. Defaults to `Discovery agent`.

**product\_brand** `string` *required*

Product or brand the agent finds partners for, 1 to 200 characters.

**audience** `string` *required*

One-sentence description of the customers, 1 to 500 characters.

**language** `string` (default: en)

Two-letter ISO 639-1 language code.

**channel** `string` (default: websites)

Only `websites` is accepted.

**exclude\_groups** `string[]` (default: \[])

Up to 5 of `directories`, `marketplaces`, `social_networks`, `news`, `review_sites`.

**keywords** `string[]` (default: \[])

Up to 25 topics, each 1 to 200 characters. Send at least one keyword or one competitor.

**competitors** `string[]` (default: \[])

Up to 25 public competitor website URLs. Send at least one keyword or one competitor.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

Returns the new agent in `data`, with the same fields as [Get an agent](https://docs.affonso.io/api/endpoint/discovery/get-agent.md).

***

## affonso\_list\_discovery\_agents

Lists your team's agents, newest first. Deleted agents are not included. Same as [List agents](https://docs.affonso.io/api/endpoint/discovery/list-agents.md).

### Parameters

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_agent

Gets one agent with its brief, sources, `can_start`, `auto_approve`, scheduling state, and `latest_run`. Same as [Get an agent](https://docs.affonso.io/api/endpoint/discovery/get-agent.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_update\_discovery\_agent

Changes the brief, sources, or `auto_approve`. Send at least one field besides `agent_id`. `keywords` and `competitors` replace the saved lists. The agent must keep at least one keyword or competitor. Same as [Update an agent](https://docs.affonso.io/api/endpoint/discovery/update-agent.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**name** `string`

Display name, 1 to 160 characters.

**website** `string`

Public `http` or `https` product website.

**product\_brand** `string`

1 to 200 characters.

**audience** `string`

1 to 500 characters.

**language** `string`

Two-letter ISO 639-1 language code.

**channel** `string`

Only `websites` is accepted.

**exclude\_groups** `string[]`

Up to 5 exclusion groups. An empty list clears them.

**keywords** `string[]`

Replaces the saved keywords. Up to 25.

**competitors** `string[]`

Replaces the saved competitor URLs. Up to 25.

**auto\_approve** `boolean`

When `true`, newly delivered prospects are approved automatically and queued for contact enrichment.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_delete\_discovery\_agent

Deletes an agent. Sets `archived_at` and `paused_at` to the current time and `schedulable` to `false`. Runs and matches are kept. Deleting again returns the deleted agent. Marked as destructive. Same as [Delete an agent](https://docs.affonso.io/api/endpoint/discovery/delete-agent.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_pause\_discovery\_agent

Pauses an agent so no new runs start. A run in progress is left alone. Pausing again returns the current agent. Same as [Pause an agent](https://docs.affonso.io/api/endpoint/discovery/pause-agent.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_resume\_discovery\_agent

Turns a paused agent live again. Resuming again returns the current agent. Needs an active plan. Same as [Resume an agent](https://docs.affonso.io/api/endpoint/discovery/resume-agent.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_agent\_overview

Returns the overview the dashboard shows: `live` or `paused` state, `blockers` and `primary_blocker`, counts of delivered matches, and the last 8 runs. Read-only. Same as [Get agent overview](https://docs.affonso.io/api/endpoint/discovery/get-agent-overview.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_agent\_lookalikes

Returns `agent_id` and the saved `lookalikes` URL list. Lookalikes are separate from competitors. Same as [Get lookalikes](https://docs.affonso.io/api/endpoint/discovery/get-lookalikes.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_update\_discovery\_agent\_lookalikes

Replaces the lookalike page URLs. An empty list clears them. Same as [Update lookalikes](https://docs.affonso.io/api/endpoint/discovery/update-lookalikes.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**lookalikes** `string[]` *required*

Up to 5 public `http` or `https` URLs.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_start\_discovery\_agent\_run

Asks the agent to search now. The agent decides what to search. Fails when the agent is paused or has no keyword or competitor. Needs an active plan. Returns the started or running step in `data`. Unlike REST, the tool does not tell you whether a new step started. Same as [Start a run](https://docs.affonso.io/api/endpoint/discovery/start-run.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**depth** `integer` (default: 10)

Ignored. If sent, it must be an integer from 1 to 100.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_agent\_runs

Lists search runs, newest first. Same as [List runs](https://docs.affonso.io/api/endpoint/discovery/list-runs.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_search\_cursors

Shows how far each search query has been read (`fetched_up_to_rank`). Read-only. Does not start a search. Same as [List search cursors](https://docs.affonso.io/api/endpoint/discovery/list-search-cursors.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**source\_type** `string`

`topic`, `competitor`, or `lookalike`.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_agent\_matches

Lists delivered prospects, newest first. Each item has `id`, `prospect_domain`, `prospect_name`, `fit_score`, `review_decision`, `status`, `contact_status`, `delivery_state`, and `created_at`. A `null` review decision means not reviewed. Same as [List matches](https://docs.affonso.io/api/endpoint/discovery/list-matches.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**review\_decision** `string`

`none`, `accepted`, or `rejected`.

**bucket** `string`

`new`, `approved`, `rejected`, `contacted`, or `won`.

**delivery\_state** `string` (default: delivered)

Deprecated. Every value (`pending_email`, `delivered`, `all`) returns delivered matches only.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_match

Gets one delivered match with `status`, `review_decision`, review timestamps, `fit_score`, and `contact_status` (`enriching`, `ready`, `not_found`, or `null`). Same as [Get a match](https://docs.affonso.io/api/endpoint/discovery/get-match.md).

### Parameters

**match\_id** `string` *required*

Match ID from `affonso_list_discovery_agent_matches`.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_review\_discovery\_match

Approves, rejects, marks contacted, or marks won on one match. Approve starts the contact email search once, the same as in the dashboard. Sending the same action again succeeds. An action that is not allowed in the current status returns an error. Same as [Review a match](https://docs.affonso.io/api/endpoint/discovery/review-match.md), which lists the allowed transitions.

### Parameters

**match\_id** `string` *required*

Match ID from `affonso_list_discovery_agent_matches`.

**action** `string`

`approve`, `reject`, `mark_contacted`, or `mark_won`.

**review\_decision** `string`

Older alternative to `action`: `accepted` approves, `rejected` rejects. Send `action` or `review_decision`. If you send both, they must agree.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_agent\_directions

Lists the topics, competitors, and similar products the agent searches or plans to search. Read-only. Use `origin` `weekly_approval` with `status` `pending` to find suggestions waiting for your decision. Same as [List directions](https://docs.affonso.io/api/endpoint/discovery/list-directions.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**kind** `string`

`topic`, `competitor`, or `similar_product`.

**status** `string`

`pending`, `searched`, or `exhausted`.

**origin** `string`

`agent_source`, `confirmed_fit`, `shared_similar_product`, `review_accepted_cluster`, or `weekly_approval`.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_decide\_discovery\_direction

Accepts or rejects one suggested competitor or topic. `accept` lets the agent search it. `reject` closes it for good. Returns the updated direction. Same as [Decide on a direction](https://docs.affonso.io/api/endpoint/discovery/decide-direction.md).

### Parameters

**agent\_id** `string` *required*

Agent ID that owns the suggestion.

**direction\_id** `string` *required*

Direction ID from `affonso_list_discovery_agent_directions`.

**decision** `string` *required*

`accept` or `reject`.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_similar\_products

Lists similar products from the shared catalog that are linked to the agent's directions. Read-only. Same as [List similar products](https://docs.affonso.io/api/endpoint/discovery/list-similar-products.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_hard\_list

Lists the domains and creators blocked for the agent. Read-only. Same as [List hard list](https://docs.affonso.io/api/endpoint/discovery/list-hard-list.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**subject\_kind** `string`

`domain` or `creator`.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_hard\_list\_item

Gets one blocked domain or creator. Same as [Get hard-list item](https://docs.affonso.io/api/endpoint/discovery/get-hard-list-item.md).

### Parameters

**hard\_list\_id** `string` *required*

Hard-list item ID from `affonso_list_discovery_hard_list`.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_list\_discovery\_exclusion\_proposals

Lists the weekly exclusion proposals for the agent. Read-only. Does not accept or dismiss them. Same as [List exclusion proposals](https://docs.affonso.io/api/endpoint/discovery/list-exclusion-proposals.md).

### Parameters

**agent\_id** `string` *required*

Agent ID.

**kind** `string`

`host`, `creator`, or `topic`.

**status** `string`

`proposed`, `accepted`, or `dismissed`.

**limit** `integer` (default: 20)

Results per page, 1 to 100.

**offset** `integer` (default: 0)

Number of results to skip.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.

***

## affonso\_get\_discovery\_exclusion\_proposal

Gets one weekly exclusion proposal. Read-only. Same as [Get exclusion proposal](https://docs.affonso.io/api/endpoint/discovery/get-exclusion-proposal.md).

### Parameters

**proposal\_id** `string` *required*

Proposal ID from `affonso_list_discovery_exclusion_proposals`.

**response\_format** `string` (default: markdown)

Response format: `markdown` or `json`. Also accepted as `responseFormat`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.