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

# Tools Reference

> Reference for every MCP tool in ClosedLoop AI: query insights, customers, opportunities, themes, and competitive intelligence from your AI dev agent.

## Overview & Discovery

### get\_overview

Get a high-level summary of your product intelligence landscape. Use this as a starting point.

| Parameter    | Type                   | Default | Description |
| ------------ | ---------------------- | ------- | ----------- |
| `time_range` | `7d` `30d` `90d` `all` | `30d`   | Time window |

Returns: total insights, deal blockers, churn risks, top categories.

### get\_facets

Get aggregated counts by dimension. Use to understand distributions before drilling in.

| Parameter    | Type   | Required | Description                                                                                |
| ------------ | ------ | -------- | ------------------------------------------------------------------------------------------ |
| `dimensions` | array  | yes      | Which dimensions: `category`, `severity`, `feature_area`, `emotion`, `country`, `industry` |
| `date_from`  | string | no       | Start date YYYY-MM-DD                                                                      |
| `date_to`    | string | no       | End date YYYY-MM-DD                                                                        |

Returns: top 20 values with counts per dimension.

### get\_trends

Get time-bucketed counts for trend analysis.

| Parameter      | Type                       | Default     | Description                                    |
| -------------- | -------------------------- | ----------- | ---------------------------------------------- |
| `query`        | string                     | none        | Topic to trend. Leave empty for overall volume |
| `category`     | string                     | none        | Filter by category                             |
| `feature_area` | string                     | none        | Filter by feature area                         |
| `granularity`  | `daily` `weekly` `monthly` | `weekly`    | Time bucket size                               |
| `date_from`    | string                     | 90 days ago | Start date                                     |
| `date_to`      | string                     | today       | End date                                       |

Returns: time-bucketed counts with unique customers and average frustration per period.

***

## Customer Intelligence

### search\_customers

Find customers by name, industry, country, or engagement metrics. Every result includes revenue context.

| Parameter           | Type                                                        | Default         | Description                       |
| ------------------- | ----------------------------------------------------------- | --------------- | --------------------------------- |
| `query`             | string                                                      | none            | Company name, domain, or keyword  |
| `industry`          | string                                                      | none            | Filter by industry                |
| `country`           | string                                                      | none            | Filter by country                 |
| `has_active_deals`  | boolean                                                     | none            | Only customers with open deals    |
| `has_deal_blockers` | boolean                                                     | none            | Only customers with deal blockers |
| `has_churn_risks`   | boolean                                                     | none            | Only customers with churn risks   |
| `min_insights`      | integer                                                     | none            | Only customers with N+ insights   |
| `sort`              | `insight_count` `deal_value` `frustration` `recency` `name` | `insight_count` | Sort order                        |
| `limit`             | integer                                                     | 10              | Max results (1-50)                |
| `offset`            | integer                                                     | 0               | Skip first N results              |

Returns: company profiles with CRM data, deal values, and intelligence stats.

### get\_customer

Get full profile for a specific customer.

| Parameter | Type   | Required | Description                        |
| --------- | ------ | -------- | ---------------------------------- |
| `id`      | string | yes      | Customer ID from search\_customers |

Returns: CRM data, deals, contacts, intelligence summary, strategic context.

***

## Product Intelligence

### search\_insights

Find product intelligence using hybrid search (keyword + semantic). Returns 300-character content previews and a customers\_mentioned summary.

| Parameter         | Type                                                                                                                                                             | Default     | Description                                                           |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------- |
| `query`           | string                                                                                                                                                           | none        | What to search for. Works with natural language                       |
| `customer_id`     | string                                                                                                                                                           | none        | Filter to one customer                                                |
| `category`        | `bug` `feature request` `improvement` `integration issue` `missing functionality` `ux/ui issue` `documentation` `performance issue` `security issue` `reporting` | none        | Filter by category                                                    |
| `severity`        | `Critical` `High` `Medium` `Low`                                                                                                                                 | none        | Filter by severity                                                    |
| `is_deal_blocker` | boolean                                                                                                                                                          | none        | Only deal-blocking insights                                           |
| `is_churn_risk`   | boolean                                                                                                                                                          | none        | Only churn-risk insights                                              |
| `feature_area`    | string                                                                                                                                                           | none        | Filter by product area                                                |
| `emotion`         | string                                                                                                                                                           | none        | Filter by emotion (frustrated, disappointed, confused, hopeful, etc.) |
| `country`         | string                                                                                                                                                           | none        | Filter by customer country                                            |
| `industry`        | string                                                                                                                                                           | none        | Filter by customer industry                                           |
| `date_from`       | string                                                                                                                                                           | none        | Start date YYYY-MM-DD                                                 |
| `date_to`         | string                                                                                                                                                           | none        | End date YYYY-MM-DD                                                   |
| `sort`            | `relevance` `severity` `frustration` `recency`                                                                                                                   | `relevance` | Sort order                                                            |
| `limit`           | integer                                                                                                                                                          | 20          | Max results (1-100)                                                   |
| `offset`          | integer                                                                                                                                                          | 0           | Skip first N results                                                  |

Returns: matching insights with content previews, plus a `customers_mentioned` summary showing which customers raised this topic.

### get\_insight

Get full detail for a specific insight.

| Parameter | Type   | Required | Description                      |
| --------- | ------ | -------- | -------------------------------- |
| `id`      | string | yes      | Insight ID from search\_insights |

Returns: full verbatim content, pain point, workaround, use case, business outcomes, kano category, reporter details.

***

## Sales Intelligence

### search\_signals

Search strategic intelligence: satisfaction, churn, competitor mentions, buying behavior.

| Parameter         | Type                  | Default     | Description                                                                                                                                                   |
| ----------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`           | string                | none        | What to search for                                                                                                                                            |
| `type`            | string                | none        | Context type: `satisfaction`, `churn_reason`, `competitor_mention`, `decision_criteria`, `purchase_hesitation`, `win_reason`, `onboarding_friction`, and more |
| `customer_id`     | string                | none        | Filter to one customer                                                                                                                                        |
| `date_from`       | string                | none        | Start date YYYY-MM-DD                                                                                                                                         |
| `competitor_name` | string                | none        | Filter by competitor name. Use get\_competitors to see valid names                                                                                            |
| `date_to`         | string                | none        | End date YYYY-MM-DD                                                                                                                                           |
| `sort`            | `relevance` `recency` | `relevance` | Sort order                                                                                                                                                    |
| `limit`           | integer               | 20          | Max results (1-100)                                                                                                                                           |
| `offset`          | integer               | 0           | Skip first N results                                                                                                                                          |

Returns: strategic context records with content previews, churn urgency, satisfaction level, competitor names.

### get\_competitors

List your configured competitors with mention counts from customer conversations. Use this to see which competitors come up most, then drill in with `search_signals(competitor_name="...")`.

No parameters required.

Returns: competitor list with names, products, mention counts, and whether they're a direct competitor.

### get\_signal

Get full detail for a specific context record.

| Parameter | Type   | Required | Description                            |
| --------- | ------ | -------- | -------------------------------------- |
| `id`      | string | yes      | Context record ID from search\_signals |

Returns: full content, context, source URL (links to original conversation), competitor details.

### search\_opportunities

Find the biggest clustered product problems ranked by business impact.

| Parameter           | Type                                                                       | Default     | Description                           |
| ------------------- | -------------------------------------------------------------------------- | ----------- | ------------------------------------- |
| `query`             | string                                                                     | none        | Search by topic                       |
| `status`            | `active` `new` `declined` `all`                                            | `active`    | Filter by status                      |
| `velocity_status`   | `accelerating` `active` `cooling` `dormant`                                | none        | Filter by growth trend                |
| `sort`              | `ric_score` `signal_count` `customer_count` `deal_blocker_count` `recency` | `ric_score` | Sort order                            |
| `min_signals`       | integer                                                                    | 10          | Minimum insight count                 |
| `has_deal_blockers` | boolean                                                                    | none        | Only opportunities with deal blockers |
| `limit`             | integer                                                                    | 10          | Max results (1-50)                    |
| `offset`            | integer                                                                    | 0           | Skip first N results                  |

Returns: opportunities with RIC scores (reach/impact/confidence), customer counts, severity breakdown, velocity status.

### get\_opportunity

Get full detail for a specific opportunity, including evidence and revenue impact.

| Parameter | Type   | Required | Description                               |
| --------- | ------ | -------- | ----------------------------------------- |
| `id`      | string | yes      | Opportunity ID from search\_opportunities |

Returns: full evidence (top 50 quotes), customer list with IDs and deal values, `total_won_deal_value`, features for parent opportunities.
