# RevCent MCP Guide: `SearchSubscriptions`

Brief AI/MCP-focused guide for searching RevCent Subscriptions.

---

## Operation Summary

Operation:

```text
SearchSubscriptions
```

Purpose:

```text
Search previously created Subscriptions using a search term.
```

Use `SearchSubscriptions` when the exact Subscription ID is unknown and the user provides a search term such as customer email, customer name, phone, address, status, metadata value, subscription/product context, or another searchable phrase.

---

## Related Links

| Guide | Link |
|---|---|
| Subscription Overview | `https://revcent.com/documentation/markdown/mcp/operation/OverviewSubscription.md` |
| GetSubscription | `https://revcent.com/documentation/markdown/mcp/operation/GetSubscription.md` |
| GetSubscriptions | `https://revcent.com/documentation/markdown/mcp/operation/GetSubscriptions.md` |
| GetSubscriptionRenewals | `https://revcent.com/documentation/markdown/mcp/operation/GetSubscriptionRenewals.md` |
| RenewSubscription | `https://revcent.com/documentation/markdown/mcp/operation/RenewSubscription.md` |
| CancelSubscription | `https://revcent.com/documentation/markdown/mcp/operation/CancelSubscription.md` |
| SuspendSubscription | `https://revcent.com/documentation/markdown/mcp/operation/SuspendSubscription.md` |
| ActivateSubscription | `https://revcent.com/documentation/markdown/mcp/operation/ActivateSubscription.md` |
| BigQueryRunQuery | `https://revcent.com/documentation/markdown/mcp/operation/BigQueryRunQuery.md` |

---

## When to Use

Use `SearchSubscriptions` for targeted lookup when the Subscription ID is unknown.

Good search terms:

- customer email,
- customer name,
- customer phone,
- address,
- Subscription status,
- product name/SKU where indexed,
- metadata value,
- external/customer/internal identifier.

After finding a likely match:

```text
SearchSubscriptions
    ↓
Review result/highlights/score
    ↓
GetSubscription
    ↓
Confirm exact Subscription before action
```

---

## Input Schema

Required:

| Field | Type | Description |
|---|---:|---|
| `search_term` | string | Single search term or phrase used by the full-text search engine. |

Example:

```json
{
  "search_term": "customer@example.com"
}
```

---

## Output Summary

Search results can include:

| Field | Meaning |
|---|---|
| `item_type` | Usually `subscription`. |
| `id` | 20-character Subscription ID. |
| `created_date_unix` | Subscription creation timestamp. |
| `first_name` / `last_name` | Customer name when returned. |
| `email` | Customer email when returned. |
| `phone` | Customer phone when returned. |
| `status` | Subscription status when returned. |
| `metadata` | Metadata name/value pairs. |
| `url` | Direct RevCent details URL. |
| `highlights` | Fields and values matched by the search. |
| `score` | Search score. Higher means a better match. |

---

## Search Safety Rule

Search results are possible matches.

They are not enough to perform consequential actions.

Before cancelling, suspending, activating, manually renewing, changing a Subscription Profile, or discussing sensitive Subscription context:

```text
SearchSubscriptions
    ↓
Select likely result
    ↓
GetSubscription
    ↓
Confirm customer, Subscription status, dates, and related records
    ↓
Only then take action if appropriate
```

Do not cancel, suspend, activate, renew, or edit subscription-related settings directly from a search result.

---

## Customer-Facing AI Verification Warning

This operation can help locate sensitive customer, subscription, billing, payment, renewal, shipment, tax, refund, salvage, or lifecycle context.

If this operation is used inside a customer-facing AI flow, such as:

- AI Voice Agent,
- public chatbot,
- support chatbot,
- customer portal assistant,
- SMS assistant,
- any visitor-facing AI workflow,

the AI/MCP client should verify the visitor is actually related to the resulting Subscription before providing details or taking action.

Recommended rule:

```text
Do not provide Subscription details to a public-facing visitor based only on the search input they supplied.
```

Search inputs can be guessed, mistyped, shared, or discovered. A search result is only a possible match, not proof that the visitor is authorized.

Safe customer-facing flow:

```text
Visitor provides search input
    ↓
AI runs SearchSubscriptions
    ↓
AI selects likely result
    ↓
AI runs GetSubscription for the selected Subscription
    ↓
AI verifies the visitor against a secondary value from the GetSubscription response
    ↓
Only after verification:
        provide limited appropriate details
        or take an allowed action
```

Recommended secondary verification values:

| Search Input | Secondary Verification Value |
|---|---|
| Customer name | Customer email or phone from `GetSubscription`. |
| Customer email | Secondary phone, subscription-related value, or another record-backed verification value where available. |
| Phone number | Customer email from `GetSubscription`. |
| Metadata/external ID | Customer email or phone from the retrieved Subscription. |
| Subscription ID | Customer email from the retrieved Subscription. |

Important:

```text
The secondary verification value should come from the retrieved RevCent record, not only from the visitor's original search input.
```

For example, if the visitor searches by name or metadata value, do not reveal matching Subscription details until they verify a customer email or another secondary value returned by `GetSubscription`.

Do not disclose sensitive details such as:

- payment details,
- unrelated subscription details,
- shipment details,
- tax details,
- fraud/risk logic,
- unrelated customer records,
- internal notes not meant for customers,
- other related records unless the visitor is verified and authorized.

For consequential actions, such as `CancelSubscription`, `SuspendSubscription`, `ActivateSubscription`, `RenewSubscription`, Subscription Profile changes, or salvage processing, require explicit confirmation and follow the relevant operation-specific safety guidance.


---

## Critical Reporting Rule

This Subscription lookup/search operation is **not** a reporting tool.

Do not use this operation for:

- counting,
- aggregations,
- metrics,
- reporting,
- data mining,
- bulk retrieval,
- broad analysis,
- document property searches,
- subscription revenue reports,
- subscription status reports,
- churn reports,
- renewal performance reports,
- overdue subscription reports,
- cancellation/suspension reports,
- campaign/shop/product/subscription performance metrics.

Use:

```text
BigQueryRunQuery
```

for those purposes.

Important AI/MCP behavior:

```text
If the AI/MCP client intended to use this operation for reporting, metrics, aggregation, or data mining and then realizes BigQueryRunQuery is the correct operation, it does not need to tell the user about the correction.

It should simply use BigQueryRunQuery instead.
```

The user does not need an explanation that the AI almost used the wrong operation. The correct behavior is to quietly choose the correct operation.


---

## Correct Use vs Incorrect Use

| User Intent | Correct Action |
|---|---|
| “Find the subscription for this customer email.” | Use `SearchSubscriptions`, then `GetSubscription`. |
| “Find this customer’s subscription.” | Use `SearchSubscriptions`, then verify with `GetSubscription`. |
| “Search for this metadata value.” | Use `SearchSubscriptions`, then verify with `GetSubscription`. |
| “How many subscriptions mention X?” | Use `BigQueryRunQuery`, not `SearchSubscriptions`. |
| “Analyze subscriptions by metadata value.” | Use `BigQueryRunQuery`, not `SearchSubscriptions`. |
| “Find churn rate by customer source.” | Use `BigQueryRunQuery`, not `SearchSubscriptions`. |

---

## Example: Correct Lookup Flow

```text
User: Find the subscription for customer@example.com.
```

Correct:

```text
1. SearchSubscriptions with search_term = "customer@example.com".
2. Review results.
3. GetSubscription for the correct result ID.
4. Summarize the exact Subscription.
```

---

## Example: Incorrect Reporting Flow

```text
User: Search all subscriptions with utm_source=google and tell me retention rate.
```

Incorrect:

```text
Use SearchSubscriptions repeatedly and aggregate results manually.
```

Correct:

```text
Use BigQueryRunQuery.
```

AI/MCP should simply run `BigQueryRunQuery` without telling the user it changed plans.

---

## Best Practices

1. Use specific search terms.
2. Prefer customer email, phone, or unique metadata values over broad names.
3. Review `highlights` and `score`.
4. Use `GetSubscription` after selecting a result.
5. Do not use search results alone for subscription lifecycle mutations.
6. Do not use search for reporting or data mining.
7. Verify customer identity with a secondary value from `GetSubscription` before sharing details in customer-facing AI flows.
8. Use `BigQueryRunQuery` for metrics and analysis.

---

## Final AI/MCP Instruction

Use `SearchSubscriptions` only for targeted full-text lookup of Subscriptions when the exact Subscription ID is unknown.

In customer-facing AI flows, search results are not proof of authorization. After finding a likely match, use `GetSubscription` and verify the visitor with a secondary value from the retrieved record, such as `customer.email`, before providing details or taking action.

Do not use it for reporting, metrics, aggregation, counting, broad analysis, or data mining. If the user's intent is analytical, silently use `BigQueryRunQuery` instead.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.