Loading...
Loading...
How to use KubeSense MCP tools to query logs, traces, and metrics from Kubernetes clusters. Covers tool selection, the discovery-first workflow, and links to datasource-specific skills.
npx skill4agent add kubesense-ai/kubesense-mcp-skills kubesense-mcp| Tool | Purpose |
|---|---|
| Discover available fields for logs or traces |
| Discover available metric names |
| Get label names for a specific metric |
| Browse raw log records (max 10 rows) |
| Browse raw trace/span records (max 10 rows) |
| Run aggregated analysis on logs |
| Run aggregated analysis on traces |
| Execute PromQL queries on metrics |
| Multi-datasource queries with formula support |
logs/traces: get-trace-or-log-fields → search-logs / search-traces / analyze-logs / analyze-traces
metrics: get-available-metrics → get-metric-labels → analyze-metricssearch-logsanalyze-logsrow_countanalyze-tracesp99durationget-available-metricsanalyze-metricsanalyze-telemetryanalyze-*queryType"range""instant"from_timeto_time"from_time": "2026-04-23T10:00:00Z"
"to_time": "2026-04-23T10:30:00Z"filterssearch-logssearch-tracesanalyze-logsanalyze-traces| Operator | Example | Notes |
|---|---|---|
| | Exact match |
| | Not equal |
| | Comparisons; use unquoted numbers for float fields. Filter trace latency via |
| | Matches any value in list |
| | Excludes values in list |
| | |
| | Negative pattern match |
level = 'ERROR' AND namespace = 'production'status = 'error' AND (workload = 'api-server' OR workload = 'auth-service')workload = 'my-service'duration_ms > 500duration_mslevel IN ('ERROR', 'FATAL') AND workload LIKE '%payment%'status = 'error' AND protocol_type = 'HTTP' AND return_code = '500'duration_ms > 500 AND workload = 'checkout-service'analyze-telemetry