Cluster Noisy Logs via Drain Prefix-Tree
cluster_logsFolds multi-line stack traces (JS/Java 'at ...', Python Traceback, Go panics, Java 'Caused by:'), parses plain-text, Docker/Kubernetes CRI, and NDJSON logs, pre-masks ///<ISO_TS>//, and runs a fixed-depth Drain prefix-tree clusterer to collapse 50,000+ log lines by 95–99% with errorClusters highlighted first. Pricing: $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 2,000 log lines, capped at $0.008), x402 variable settlement). Pass ?dry_run=true on REST to validate schema free.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cluster_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logs | No | Raw plain-text, Docker/Kubernetes CRI, or newline-delimited JSON (ndjson) log stream. | |
| lines | No | Pre-split array of log lines (alternative to passing a single 'logs' string). | |
| treeDepth | No | Fixed Drain prefix-tree depth (length -> leading tokens -> leaf templates). | |
| maxClusters | No | Maximum canonical Drain clusters maintained before routing outliers to overflow. | |
| maxStackTraceChars | No | Maximum characters retained per cluster sampleStackTrace. | |
| maxReturnedClusters | No | Maximum ranked clusters returned in the response payload. | |
| similarityThreshold | No | Drain token-similarity threshold [0.2-1.0] required to merge a log line into an existing canonical template. |