# Basic Usage Examples
## Using with AI Assistants
Once configured, simply ask your AI assistant about service management topics:
### List Available Playbooks
```
You: "What service management playbooks do you have?"
AI: I found 29 playbooks across these categories:
- Margin & Profitability (8 playbooks)
- Renewal & Retention (6 playbooks)
- Capacity Planning (5 playbooks)
- SLA Management (5 playbooks)
- Growth & Strategy (5 playbooks)
```
### Get Playbook Details
```
You: "Tell me about the margin protection playbook"
AI: Here's the Engagement Margin Protection playbook:
**Problem Statement:** Service margins eroding over time due to scope creep,
untracked costs, and pricing that doesn't reflect actual delivery costs.
**Key Takeaways:**
1. Implement monthly margin reviews per engagement
2. Track all costs including shadow IT and overtime
3. Build price escalation clauses into contracts
**Relevant KPIs:** Gross Margin, Contribution Margin, Cost per FTE
```
### Understand a Metric
```
You: "How do I calculate gross margin?"
AI: Here's how gross margin works:
**Formula:** (Revenue - Direct Costs) / Revenue × 100
**Healthy Range:** 30-45% for IT services
**Improvement Tips:**
- Review pricing annually against cost increases
- Identify and eliminate low-margin services
- Automate repetitive tasks to reduce labor costs
```
### Service Health Check
```
You: "Check my service: €2M revenue, €1.5M costs, 12 FTEs, 92% SLA"
AI: Here's your service health analysis:
**Overall Score: 58/100** - Needs Attention
📊 **Economics** (Score: 45)
- Margin: 25% (below 35% target)
- Status: Critical
📊 **Delivery** (Score: 78)
- SLA: 92% (target 95%)
- Status: Attention Needed
📊 **Efficiency** (Score: 52)
- Revenue/FTE: €167K (target €150K+)
- Status: Acceptable
💡 **Key Insights:**
- Your margins are too low - consider pricing review
- SLA is close to target but has room for improvement
- Efficiency is acceptable but could improve with automation
```
## REST API Examples
### cURL
```bash
# List all playbooks
curl -s https://mcpfree.digitalcore.app/list_playbooks | jq '.playbooks[:3]'
# Get a specific playbook
curl -s "https://mcpfree.digitalcore.app/get_playbook?name=engagement-margin-protection" | jq
# Explain a metric
curl -s "https://mcpfree.digitalcore.app/explain_metric?metric_name=gross_margin" | jq
# Run service reality check
curl -s -X POST https://mcpfree.digitalcore.app/run_service_reality_check \
-H "Content-Type: application/json" \
-d '{
"revenue": 2000000,
"costs": 1500000,
"ftes": 12,
"sla_achievement": 92
}' | jq
```
### Python
```python
import requests
BASE_URL = "https://mcpfree.digitalcore.app"
# List playbooks
response = requests.get(f"{BASE_URL}/list_playbooks")
playbooks = response.json()
print(f"Found {playbooks['total']} playbooks")
# Get playbook details
response = requests.get(f"{BASE_URL}/get_playbook", params={"name": "margin-protection"})
playbook = response.json()
print(f"Playbook: {playbook['title']}")
# Run reality check
response = requests.post(f"{BASE_URL}/run_service_reality_check", json={
"revenue": 500000,
"costs": 400000,
"ftes": 5,
"sla_achievement": 95
})
result = response.json()
print(f"Health Score: {result['overall_score']}/100")
```
### JavaScript/Node.js
```javascript
const BASE_URL = 'https://mcpfree.digitalcore.app';
// List playbooks
const playbooks = await fetch(`${BASE_URL}/list_playbooks`).then(r => r.json());
console.log(`Found ${playbooks.total} playbooks`);
// Run reality check
const result = await fetch(`${BASE_URL}/run_service_reality_check`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
revenue: 500000,
costs: 400000,
ftes: 5,
sla_achievement: 95
})
}).then(r => r.json());
console.log(`Health Score: ${result.overall_score}/100`);
```
## MCP Protocol Examples
### Initialize Session
```json
POST /mcp
Content-Type: application/json
Accept: application/json, text/event-stream
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {}
}
```
### List Tools
```json
POST /mcp
Content-Type: application/json
Accept: application/json, text/event-stream
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}
```
### Call a Tool
```json
POST /mcp
Content-Type: application/json
Accept: application/json, text/event-stream
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "run_service_reality_check",
"arguments": {
"revenue": 500000,
"costs": 400000,
"ftes": 5,
"sla_achievement": 95
}
}
}
```