Skip to content

Commit afd8ad8

Browse files
authored
Merge branch 'main' into feat/dashboard-create-and-update
2 parents 6bd722c + f2dd1e9 commit afd8ad8

File tree

11 files changed

+562
-141
lines changed

11 files changed

+562
-141
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
contents: write
9+
id-token: write
910

1011
jobs:
1112
build:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ go.work.sum
2727
# env file
2828
.env
2929

30+
# MCP Registry tokens
31+
.mcpregistry_github_token
32+
.mcpregistry_registry_token
33+
3034
# Editor/IDE
3135
.idea/
3236
.vscode/

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A Model Context Protocol (MCP) server that provides seamless access to SigNoz ob
99
## 🚀 Features
1010

1111
- **List Metric Keys**: Retrieve all available metric keys from SigNoz.
12-
- **Search Metric Keys**: Find specific metrics.
12+
- **Search Metric by text**: Find specific metric containing given text.
1313
- **List Alerts**: Get all active alerts with detailed status.
1414
- **Get Alert Details**: Retrieve comprehensive information about specific alert rules.
1515
- **Get Alert History**: Gives you timeline of an alert.
@@ -241,14 +241,14 @@ The MCP server provides the following tools that can be used through natural lan
241241
#### Metrics Exploration
242242
```
243243
"Show me all available metrics"
244-
"Search for CPU-related metrics"
244+
"Search for CPU related metrics"
245245
```
246246

247247
#### Alert Monitoring
248248
```
249249
"List all active alerts"
250250
"Get details for alert rule ID abc123"
251-
"Show me the history for alert rule abc123 from the last 24 hours"
251+
"Show me the history for alert rule abc123 from the last 6 hours"
252252
"Get logs related to alert abc456"
253253
```
254254

@@ -261,7 +261,7 @@ The MCP server provides the following tools that can be used through natural lan
261261

262262
#### Service Analysis
263263
```
264-
"List all services from the last 24 hours"
264+
"List all services from the last 6 hours"
265265
"What are the top operations for the paymentservice?"
266266
```
267267

@@ -290,8 +290,8 @@ The MCP server provides the following tools that can be used through natural lan
290290
#### `list_metric_keys`
291291
Lists all available metric keys from SigNoz.
292292

293-
#### `search_metric_keys`
294-
Searches for metrics by text query.
293+
#### `search_metric_by_text`
294+
Searches metrics by text (uses SigNoz aggregate_attributes autocomplete).
295295
- **Parameters**: `searchText` (required) - Text to search for
296296

297297
#### `list_alerts`
@@ -326,15 +326,15 @@ Dashboard metadata, layout array, widgets array, and stored dashboard config.
326326
Lists all services within a time range.
327327
- **Parameters**:
328328
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
329-
- `start` (optional) - Start time in nanoseconds (defaults to 24 hours ago)
329+
- `start` (optional) - Start time in nanoseconds (defaults to 6 hours ago)
330330
- `end` (optional) - End time in nanoseconds (defaults to now)
331331

332332
#### `get_service_top_operations`
333333
Gets top operations for a specific service.
334334
- **Parameters**:
335335
- `service` (required) - Service name
336336
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
337-
- `start` (optional) - Start time in nanoseconds (defaults to 24 hours ago)
337+
- `start` (optional) - Start time in nanoseconds (defaults to 6 hours ago)
338338
- `end` (optional) - End time in nanoseconds (defaults to now)
339339
- `tags` (optional) - JSON array of tags
340340

@@ -343,7 +343,7 @@ Gets alert history timeline for a specific rule.
343343
- **Parameters**:
344344
- `ruleId` (required) - Alert rule ID
345345
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
346-
- `start` (optional) - Start timestamp in milliseconds (defaults to 24 hours ago)
346+
- `start` (optional) - Start timestamp in milliseconds (defaults to 6 hours ago)
347347
- `end` (optional) - End timestamp in milliseconds (defaults to now)
348348
- `offset` (optional) - Offset for pagination (default: 0)
349349
- `limit` (optional) - Limit number of results (default: 20)
@@ -368,7 +368,7 @@ Gets logs related to a specific alert automatically.
368368
Gets logs with ERROR or FATAL severity within a time range.
369369
- **Parameters**:
370370
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
371-
- `start` (optional) - Start time in milliseconds (defaults to 24 hours ago)
371+
- `start` (optional) - Start time in milliseconds (defaults to 6 hours ago)
372372
- `end` (optional) - End time in milliseconds (defaults to now)
373373
- `service` (optional) - Service name to filter by
374374
- `limit` (optional) - Maximum number of logs to return (default: 100)
@@ -378,7 +378,7 @@ Searches logs for a specific service within a time range.
378378
- **Parameters**:
379379
- `service` (required) - Service name to search logs for
380380
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
381-
- `start` (optional) - Start time in milliseconds (defaults to 24 hours ago)
381+
- `start` (optional) - Start time in milliseconds (defaults to 6 hours ago)
382382
- `end` (optional) - End time in milliseconds (defaults to now)
383383
- `severity` (optional) - Log severity filter (DEBUG, INFO, WARN, ERROR, FATAL)
384384
- `searchText` (optional) - Text to search for in log body
@@ -395,7 +395,7 @@ Searches traces for a specific service.
395395
- **Parameters**:
396396
- `service` (required) - Service name to search traces for
397397
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
398-
- `start` (optional) - Start time in milliseconds (defaults to 24 hours ago)
398+
- `start` (optional) - Start time in milliseconds (defaults to 6 hours ago)
399399
- `end` (optional) - End time in milliseconds (defaults to now)
400400
- `operation` (optional) - Operation name to filter by
401401
- `error` (optional) - Filter by error status (true/false)
@@ -408,15 +408,15 @@ Gets trace information including all spans and metadata.
408408
- **Parameters**:
409409
- `traceId` (required) - Trace ID to get details for
410410
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
411-
- `start` (optional) - Start time in milliseconds (defaults to 24 hours ago)
411+
- `start` (optional) - Start time in milliseconds (defaults to 6 hours ago)
412412
- `end` (optional) - End time in milliseconds (defaults to now)
413413
- `includeSpans` (optional) - Include detailed span information (true/false, default: true)
414414

415415
#### `get_trace_error_analysis`
416416
Analyzes error patterns in traces.
417417
- **Parameters**:
418418
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
419-
- `start` (optional) - Start time in milliseconds (defaults to 24 hours ago)
419+
- `start` (optional) - Start time in milliseconds (defaults to 6 hours ago)
420420
- `end` (optional) - End time in milliseconds (defaults to now)
421421
- `service` (optional) - Service name to filter by
422422
- **Returns**: Traces with errors, useful for identifying patterns and affected services
@@ -426,7 +426,7 @@ Gets trace span relationships and hierarchy.
426426
- **Parameters**:
427427
- `traceId` (required) - Trace ID to get span hierarchy for
428428
- `timeRange` (optional) - Time range like '2h', '6h', '2d', '7d'
429-
- `start` (optional) - Start time in milliseconds (defaults to 24 hours ago)
429+
- `start` (optional) - Start time in milliseconds (defaults to 6 hours ago)
430430
- `end` (optional) - End time in milliseconds (defaults to now)
431431

432432
#### `signoz_execute_builder_query`
@@ -453,7 +453,7 @@ Use the `timeRange` parameter with formats:
453453
- `'2d'` - Last 2 days
454454
- `'7d'` - Last 7 days
455455

456-
The `timeRange` parameter automatically calculates the time window from now backwards. If not specified, most tools default to the last 24 hours. You can also specify time in milliseconds and nanoseconds
456+
The `timeRange` parameter automatically calculates the time window from now backwards. If not specified, most tools default to the last 6 hours. You can also specify time in milliseconds and nanoseconds
457457
### Response Format
458458

459459
All tools return JSON responses that are optimized for LLM consumption:

cmd/server/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ import (
1616
func main() {
1717
cfg, err := config.LoadConfig()
1818
if err != nil {
19-
fmt.Fprintln(os.Stderr, fmt.Sprintf("Failed to load config: %v", err))
19+
fmt.Fprintf(os.Stderr, "Failed to load config: %v\n", err)
2020
os.Exit(1)
2121
}
2222

2323
if err := cfg.ValidateConfig(); err != nil {
24-
fmt.Fprintln(os.Stderr, fmt.Sprintf("Configuration validation failed: %v", err))
24+
fmt.Fprintf(os.Stderr, "Configuration validation failed: %v\n", err)
2525
os.Exit(1)
2626
}
2727

2828
log, err := logger.NewLogger(logger.LogLevel(cfg.LogLevel))
2929
if err != nil {
30-
fmt.Fprintln(os.Stderr, fmt.Sprintf("Failed to initialize logger: %v", err))
30+
fmt.Fprintf(os.Stderr, "Failed to initialize logger: %v\n", err)
3131
os.Exit(1)
3232
}
3333

0 commit comments

Comments
 (0)