Back to Documentation
Cost and Performance Metadata
Rich metadata that helps agents make intelligent decisions about cost, latency, and resource usage.
Complete Tool Transparency
Every MCPify tool exposes comprehensive metadata so agents can optimize their strategies:
{
"tool": "search_products",
"metadata": {
"cost": {
"per_call_usd": 0.0012,
"token_estimate": {
"input": 150,
"output": 800
}
},
"performance": {
"latency_ms": {
"p50": 127,
"p95": 312,
"p99": 589
},
"throughput_rps": 100
},
"limits": {
"rate_limit_rpm": 600,
"max_page_size": 100,
"max_results": 10000
},
"cache": {
"ttl_seconds": 300,
"hit_rate": 0.87
}
}
}Cost Optimization Signals
Per-Call Costs
- • API request cost
- • Data transfer fees
- • Processing charges
- • Token consumption
Cost Comparison
- • Alternative tool costs
- • Cached vs live costs
- • Batch vs individual
- • Peak vs off-peak pricing
Latency Profiles
Detailed latency distributions help agents plan for different scenarios:
P50 (Median)
127ms
Most requests
P95
312ms
Slower requests
P99
589ms
Worst case
Factors affecting latency: Payload size, query complexity, cache status, current load, geographic distance
Resource Utilization
Token Consumption
Input tokens:~150
Output tokens:~800
Memory Usage
Typical response size: 2-5KB • Max response: 100KB
Concurrency
Max parallel calls: 10 • Recommended: 5
Rate Limit Awareness
Dynamic Rate Limit Info
{
"rate_limits": {
"tier": "standard",
"limits": {
"requests_per_minute": 600,
"requests_per_day": 100000,
"concurrent_requests": 10
},
"current": {
"rpm_remaining": 547,
"rpd_remaining": 87234,
"reset_at": "2025-08-25T10:30:00Z"
},
"headers": {
"X-RateLimit-Limit": "600",
"X-RateLimit-Remaining": "547",
"X-RateLimit-Reset": "1724584200"
}
}
}Using Metadata for Decisions
Agent Decision Example
// Agent evaluates two options: Option A: Live search - Cost: $0.0012 per call - Latency: 127ms (p50) - Freshness: Real-time Option B: Cached search - Cost: $0.00001 (token processing only) - Latency: 3ms - Freshness: 5 minutes old Decision: Use cached data (freshness acceptable for use case)
Metadata Configuration
{
"metadata_config": {
"expose_costs": true,
"include_latency_percentiles": ["p50", "p95", "p99"],
"track_token_usage": true,
"rate_limit_headers": true,
"cache_transparency": "full",
"cost_units": "usd",
"latency_units": "milliseconds",
"update_frequency": "real-time"
}
}Make every API call count
With full cost and performance transparency, your agents can optimize for any objective.