# Claude Desktop - Umbrella Cost MCP Instructions
## IMPORTANT: Customer Detection for MSP Users
When using the Umbrella Cost API for MSP (Managed Service Provider) users, the system now includes automatic customer detection from natural language queries.
### How to Use Customer Detection
When calling cost-related endpoints (`api___invoices_caui`, `api___recommendationsNew_heatmap_summary`, etc.), **ALWAYS** include the `userQuery` parameter with the user's natural language query. This enables automatic customer detection.
#### Example Usage:
**User says:** "Show me Bank Leumi costs for last month"
**You should call:**
```json
{
"name": "api___invoices_caui",
"arguments": {
"userQuery": "Show me Bank Leumi costs for last month",
"startDate": "2025-08-01",
"endDate": "2025-08-31",
"groupBy": "none",
"periodGranLevel": "month",
"costType": ["cost", "discount"],
"isUnblended": true,
"cloud_context": "aws"
}
}
```
### Supported Customer Names
The system automatically detects customer names like:
- **Bank Leumi** → Maps to account key 22676, division 139
- **Bank Hapoalim** → Maps to account key 16185, division 1
- **Mizrahi Tefahot**
- **Discount Bank**
- And 350+ other MSP customers
### Important Notes:
1. **ALWAYS include userQuery** - Pass the user's original query in the `userQuery` parameter
2. **Customer detection is automatic** - You don't need to manually set `customer_account_key`
3. **Division ID is handled** - The system automatically uses the correct division ID for each customer
4. **Works for all cost endpoints** - Customer detection works for:
- `/invoices/caui` (cost analysis)
- `/recommendationsNew/heatmap/summary` (recommendations)
- `/anomaly-detection` (anomaly detection)
- `/recommendations/report` (legacy recommendations)
### Authentication Required
Before making any API calls, authenticate the MSP user:
```json
{
"name": "authenticate_user",
"arguments": {
"username": "david+allcloud@umbrellacost.com",
"password": "B4*zcI7#F7poEC"
}
}
```
### Getting Customer List
To see all available customers:
```json
{
"name": "api___users_plain_sub_users",
"arguments": {}
}
```
This returns the `customerDivisions` object with all customer names and their account mappings.