@ancplua/qyl-api-schema 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/api/analysis.tsp +165 -0
- package/common/telemetry-query.tsp +62 -0
- package/generated/json-schema/qyl-api-schema.json +10932 -4780
- package/generated/openapi/qyl.openapi.json +13604 -5470
- package/generated/ts-runtime/api.d.ts +1165 -27
- package/generated/ts-runtime/api.js +64 -12
- package/generated/ts-runtime/schemas.d.ts +291 -2
- package/generated/ts-runtime/schemas.js +289 -0
- package/index.tsp +2 -0
- package/models/annotations.tsp +31 -1
- package/models/mcp-analysis.tsp +1108 -0
- package/models/mcp-tools.tsp +333 -8
- package/models/metrics.tsp +17 -15
- package/models/saved-queries.tsp +7 -0
- package/package.json +5 -2
package/models/mcp-tools.tsp
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import "./mcp-analysis.tsp";
|
|
2
|
+
import "../common/telemetry-query.tsp";
|
|
3
|
+
import "../common/errors.tsp";
|
|
1
4
|
import "../common/types.tsp";
|
|
2
5
|
import "../otel/logs.tsp";
|
|
3
6
|
import "../otel/span.tsp";
|
|
@@ -8,6 +11,7 @@ import "./saved-queries.tsp";
|
|
|
8
11
|
import "../common/resource.tsp";
|
|
9
12
|
|
|
10
13
|
using TypeSpec.OpenAPI;
|
|
14
|
+
using Qyl.Api.Contracts.Common.Errors;
|
|
11
15
|
using Qyl.Api.Contracts.Common;
|
|
12
16
|
using Qyl.Api.Contracts.Annotations;
|
|
13
17
|
using Qyl.Api.Contracts.SavedQueries;
|
|
@@ -66,6 +70,10 @@ union ToolErrorCode {
|
|
|
66
70
|
|
|
67
71
|
@doc("A failed tool call, carried in structuredContent.error.")
|
|
68
72
|
model ToolError {
|
|
73
|
+
fields?: ValidationErrorDetail[];
|
|
74
|
+
@encodedName("application/json", "problem_type")
|
|
75
|
+
problemType?: ProblemType;
|
|
76
|
+
|
|
69
77
|
code: ToolErrorCode;
|
|
70
78
|
|
|
71
79
|
@doc("Human-readable description of this failure.")
|
|
@@ -88,6 +96,10 @@ model ToolPage {
|
|
|
88
96
|
|
|
89
97
|
@doc("Time-range members of a tool input.")
|
|
90
98
|
model ToolTimeRange {
|
|
99
|
+
@minValue(1) @maxValue(43200)
|
|
100
|
+
@encodedName("application/json", "lookback_minutes")
|
|
101
|
+
lookbackMinutes?: int32;
|
|
102
|
+
|
|
91
103
|
@doc("Start of the window (inclusive), RFC 3339.")
|
|
92
104
|
@encodedName("application/json", "start_time")
|
|
93
105
|
startTime?: utcDateTime;
|
|
@@ -103,10 +115,32 @@ enum FetchTelemetryView {
|
|
|
103
115
|
trace: "trace",
|
|
104
116
|
logs: "logs",
|
|
105
117
|
mcpStats: "mcp_stats",
|
|
118
|
+
compare: "compare",
|
|
106
119
|
}
|
|
107
120
|
|
|
108
121
|
@doc("Input for display_traces.")
|
|
109
122
|
model DisplayTracesInput {
|
|
123
|
+
@encodedName("application/json", "failure_class")
|
|
124
|
+
failureClass?: McpFailureClass;
|
|
125
|
+
@encodedName("application/json", "server_name")
|
|
126
|
+
serverName?: string;
|
|
127
|
+
@encodedName("application/json", "tool_name")
|
|
128
|
+
toolName?: string;
|
|
129
|
+
transport?: string;
|
|
130
|
+
|
|
131
|
+
@encodedName("application/json", "failure_id")
|
|
132
|
+
failureId?: FailureId;
|
|
133
|
+
@encodedName("application/json", "compare_to")
|
|
134
|
+
comparisonTraceId?: TraceId;
|
|
135
|
+
@encodedName("application/json", "selected_span_id")
|
|
136
|
+
selectedSpanId?: SpanId;
|
|
137
|
+
cursor?: Cursor;
|
|
138
|
+
|
|
139
|
+
@maxItems(32)
|
|
140
|
+
matchers?: TelemetryMatcher[];
|
|
141
|
+
|
|
142
|
+
...ToolTimeRange;
|
|
143
|
+
|
|
110
144
|
@doc("Open this trace selected; omit to list recent traces.")
|
|
111
145
|
@encodedName("application/json", "trace_id")
|
|
112
146
|
traceId?: TraceId;
|
|
@@ -123,7 +157,13 @@ model DisplayTracesInput {
|
|
|
123
157
|
|
|
124
158
|
@doc("Structured output for display_traces.")
|
|
125
159
|
model DisplayTracesOutput {
|
|
126
|
-
|
|
160
|
+
@encodedName("application/json", "selected_span_id")
|
|
161
|
+
selectedSpanId?: SpanId;
|
|
162
|
+
comparison?: CompareTracesOutput;
|
|
163
|
+
|
|
164
|
+
...ToolReadContext;
|
|
165
|
+
|
|
166
|
+
traces: ToolTrace[];
|
|
127
167
|
|
|
128
168
|
@encodedName("application/json", "selected_trace_id")
|
|
129
169
|
selectedTraceId?: TraceId;
|
|
@@ -136,6 +176,16 @@ model DisplayTracesOutput {
|
|
|
136
176
|
|
|
137
177
|
@doc("Input for display_mcp_dashboard.")
|
|
138
178
|
model DisplayMcpDashboardInput {
|
|
179
|
+
@encodedName("application/json", "server_name")
|
|
180
|
+
serverName?: string;
|
|
181
|
+
@encodedName("application/json", "tool_name")
|
|
182
|
+
toolName?: string;
|
|
183
|
+
transport?: string;
|
|
184
|
+
@encodedName("application/json", "compare_to")
|
|
185
|
+
compareTo?: McpStatsComparison;
|
|
186
|
+
|
|
187
|
+
...ToolTimeRange;
|
|
188
|
+
|
|
139
189
|
@doc("Window length in whole hours.")
|
|
140
190
|
@minValue(1)
|
|
141
191
|
@maxValue(168)
|
|
@@ -144,6 +194,8 @@ model DisplayMcpDashboardInput {
|
|
|
144
194
|
|
|
145
195
|
@doc("Structured output for display_mcp_dashboard.")
|
|
146
196
|
model DisplayMcpDashboardOutput {
|
|
197
|
+
...ToolReadContext;
|
|
198
|
+
|
|
147
199
|
stats: McpDashboardStats;
|
|
148
200
|
|
|
149
201
|
@doc("Set when the call failed.")
|
|
@@ -152,6 +204,37 @@ model DisplayMcpDashboardOutput {
|
|
|
152
204
|
|
|
153
205
|
@doc("Input for list_traces.")
|
|
154
206
|
model ListTracesInput {
|
|
207
|
+
@encodedName("application/json", "failure_class")
|
|
208
|
+
failureClass?: McpFailureClass;
|
|
209
|
+
@encodedName("application/json", "server_name")
|
|
210
|
+
serverName?: string;
|
|
211
|
+
@encodedName("application/json", "tool_name")
|
|
212
|
+
toolName?: string;
|
|
213
|
+
transport?: string;
|
|
214
|
+
|
|
215
|
+
@encodedName("application/json", "session_id")
|
|
216
|
+
sessionId?: SessionId;
|
|
217
|
+
@encodedName("application/json", "root_span_name")
|
|
218
|
+
rootSpanName?: string;
|
|
219
|
+
@encodedName("application/json", "min_duration_ms")
|
|
220
|
+
minDurationMs?: DurationMs;
|
|
221
|
+
@encodedName("application/json", "max_duration_ms")
|
|
222
|
+
maxDurationMs?: DurationMs;
|
|
223
|
+
release?: string;
|
|
224
|
+
@encodedName("application/json", "failure_id")
|
|
225
|
+
failureId?: FailureId;
|
|
226
|
+
@encodedName("application/json", "error_scope")
|
|
227
|
+
errorScope?: "any" | "root";
|
|
228
|
+
@encodedName("application/json", "annotation_label")
|
|
229
|
+
annotationLabel?: string;
|
|
230
|
+
@encodedName("application/json", "group_by")
|
|
231
|
+
groupBy?: "failure_id" | "root_span" | "service";
|
|
232
|
+
@encodedName("application/json", "sort_by")
|
|
233
|
+
sortBy?: "start_time" | "duration" | "errors";
|
|
234
|
+
|
|
235
|
+
@maxItems(32)
|
|
236
|
+
matchers?: TelemetryMatcher[];
|
|
237
|
+
|
|
155
238
|
@doc("Maximum traces to return in this page.")
|
|
156
239
|
@minValue(1)
|
|
157
240
|
@maxValue(100)
|
|
@@ -173,7 +256,11 @@ model ListTracesInput {
|
|
|
173
256
|
|
|
174
257
|
@doc("Structured output for list_traces.")
|
|
175
258
|
model ListTracesOutput {
|
|
176
|
-
|
|
259
|
+
groups?: TraceGroup[];
|
|
260
|
+
|
|
261
|
+
...ToolReadContext;
|
|
262
|
+
|
|
263
|
+
traces: ToolTraceSummary[];
|
|
177
264
|
mode: McpDataMode;
|
|
178
265
|
...ToolPage;
|
|
179
266
|
|
|
@@ -183,6 +270,14 @@ model ListTracesOutput {
|
|
|
183
270
|
|
|
184
271
|
@doc("Input for get_trace.")
|
|
185
272
|
model GetTraceInput {
|
|
273
|
+
selection?: "all" | "errors" | "errors_with_ancestors" | "critical_path";
|
|
274
|
+
attributes?: string[];
|
|
275
|
+
@minValue(0) @maxValue(50)
|
|
276
|
+
@encodedName("application/json", "include_logs")
|
|
277
|
+
includeLogs?: int32;
|
|
278
|
+
|
|
279
|
+
...ToolTimeRange;
|
|
280
|
+
|
|
186
281
|
@encodedName("application/json", "trace_id")
|
|
187
282
|
traceId: TraceId;
|
|
188
283
|
|
|
@@ -203,7 +298,18 @@ model GetTraceInput {
|
|
|
203
298
|
|
|
204
299
|
@doc("Structured output for get_trace.")
|
|
205
300
|
model GetTraceOutput {
|
|
206
|
-
|
|
301
|
+
@encodedName("application/json", "span_roles")
|
|
302
|
+
spanRoles?: SpanEvidenceRole[];
|
|
303
|
+
omitted?: TraceOmitted;
|
|
304
|
+
@encodedName("application/json", "missing_parent_span_ids")
|
|
305
|
+
missingParentSpanIds?: SpanId[];
|
|
306
|
+
links?: TraceLinkAvailability[];
|
|
307
|
+
logs?: LogRecord[];
|
|
308
|
+
settled?: boolean;
|
|
309
|
+
|
|
310
|
+
...ToolReadContext;
|
|
311
|
+
|
|
312
|
+
trace: ToolTrace;
|
|
207
313
|
mode: McpDataMode;
|
|
208
314
|
|
|
209
315
|
@doc("Annotations on the trace and its spans, newest first.")
|
|
@@ -215,6 +321,27 @@ model GetTraceOutput {
|
|
|
215
321
|
|
|
216
322
|
@doc("Input for list_sessions.")
|
|
217
323
|
model ListSessionsInput {
|
|
324
|
+
@encodedName("application/json", "has_error")
|
|
325
|
+
hasError?: boolean;
|
|
326
|
+
@encodedName("application/json", "min_errors")
|
|
327
|
+
minErrors?: int64;
|
|
328
|
+
@encodedName("application/json", "service_name")
|
|
329
|
+
serviceName?: string;
|
|
330
|
+
@encodedName("application/json", "agent_name")
|
|
331
|
+
agentName?: string;
|
|
332
|
+
`model`?: string;
|
|
333
|
+
@encodedName("application/json", "min_tokens")
|
|
334
|
+
minTokens?: int64;
|
|
335
|
+
@encodedName("application/json", "min_duration_ms")
|
|
336
|
+
minDurationMs?: DurationMs;
|
|
337
|
+
@encodedName("application/json", "annotation_label")
|
|
338
|
+
annotationLabel?: string;
|
|
339
|
+
@encodedName("application/json", "sort_by")
|
|
340
|
+
sortBy?: "last_activity" | "errors" | "duration" | "tokens";
|
|
341
|
+
|
|
342
|
+
@maxItems(32)
|
|
343
|
+
matchers?: TelemetryMatcher[];
|
|
344
|
+
|
|
218
345
|
@doc("Maximum sessions to return in this page.")
|
|
219
346
|
@minValue(1)
|
|
220
347
|
@maxValue(100)
|
|
@@ -232,7 +359,9 @@ model ListSessionsInput {
|
|
|
232
359
|
|
|
233
360
|
@doc("Structured output for list_sessions.")
|
|
234
361
|
model ListSessionsOutput {
|
|
235
|
-
|
|
362
|
+
...ToolReadContext;
|
|
363
|
+
|
|
364
|
+
sessions: ToolSession[];
|
|
236
365
|
mode: McpDataMode;
|
|
237
366
|
...ToolPage;
|
|
238
367
|
|
|
@@ -245,6 +374,16 @@ model ListSessionsOutput {
|
|
|
245
374
|
|
|
246
375
|
@doc("Input for search_logs.")
|
|
247
376
|
model SearchLogsInput {
|
|
377
|
+
@encodedName("application/json", "span_id")
|
|
378
|
+
spanId?: SpanId;
|
|
379
|
+
@encodedName("application/json", "group_by")
|
|
380
|
+
groupBy?: "pattern";
|
|
381
|
+
@minValue(0) @maxValue(10)
|
|
382
|
+
context?: int32;
|
|
383
|
+
|
|
384
|
+
@maxItems(32)
|
|
385
|
+
matchers?: TelemetryMatcher[];
|
|
386
|
+
|
|
248
387
|
@doc("Return only log records correlated with this trace.")
|
|
249
388
|
@encodedName("application/json", "trace_id")
|
|
250
389
|
traceId?: TraceId;
|
|
@@ -279,6 +418,12 @@ model SearchLogsInput {
|
|
|
279
418
|
|
|
280
419
|
@doc("Structured output for search_logs.")
|
|
281
420
|
model SearchLogsOutput {
|
|
421
|
+
@encodedName("application/json", "total_matched")
|
|
422
|
+
totalMatched?: int64;
|
|
423
|
+
patterns?: LogPattern[];
|
|
424
|
+
|
|
425
|
+
...ToolReadContext;
|
|
426
|
+
|
|
282
427
|
logs: LogRecord[];
|
|
283
428
|
mode: McpDataMode;
|
|
284
429
|
...ToolPage;
|
|
@@ -296,6 +441,22 @@ enum CiPhaseStatus {
|
|
|
296
441
|
|
|
297
442
|
@doc("Input for ci_log.")
|
|
298
443
|
model CiLogInput {
|
|
444
|
+
cursor?: Cursor;
|
|
445
|
+
branch?: string;
|
|
446
|
+
commit?: string;
|
|
447
|
+
leg?: string;
|
|
448
|
+
phase?: string;
|
|
449
|
+
@encodedName("application/json", "phase_cursor")
|
|
450
|
+
phaseCursor?: Cursor;
|
|
451
|
+
outcome?: "failed" | "passed" | "all";
|
|
452
|
+
@encodedName("application/json", "compare_to")
|
|
453
|
+
compareTo?: string;
|
|
454
|
+
|
|
455
|
+
@maxItems(32)
|
|
456
|
+
matchers?: TelemetryMatcher[];
|
|
457
|
+
|
|
458
|
+
...ToolTimeRange;
|
|
459
|
+
|
|
299
460
|
@doc("Session id of one CI run for a per-leg phase breakdown; omit to list recent runs.")
|
|
300
461
|
@encodedName("application/json", "run_id")
|
|
301
462
|
runId?: SessionId;
|
|
@@ -314,6 +475,15 @@ model CiLogInput {
|
|
|
314
475
|
|
|
315
476
|
@doc("One CI run, summarized from the session its telemetry is grouped under.")
|
|
316
477
|
model CiRunSummary {
|
|
478
|
+
@encodedName("application/json", "session_id")
|
|
479
|
+
sessionId?: SessionId;
|
|
480
|
+
@encodedName("application/json", "provider_run_id")
|
|
481
|
+
providerRunId?: string;
|
|
482
|
+
@encodedName("application/json", "provider_run_url")
|
|
483
|
+
providerRunUrl?: UrlString;
|
|
484
|
+
attempt?: int32;
|
|
485
|
+
attempts?: CiAttempt[];
|
|
486
|
+
|
|
317
487
|
@encodedName("application/json", "run_id")
|
|
318
488
|
runId: SessionId;
|
|
319
489
|
|
|
@@ -336,6 +506,15 @@ model CiRunSummary {
|
|
|
336
506
|
|
|
337
507
|
@doc("One phase span of a CI run, attributed to the leg that executed it.")
|
|
338
508
|
model CiPhase {
|
|
509
|
+
@encodedName("application/json", "span_id")
|
|
510
|
+
spanId?: SpanId;
|
|
511
|
+
@encodedName("application/json", "trace_ids")
|
|
512
|
+
traceIds?: TraceId[];
|
|
513
|
+
@encodedName("application/json", "error_log_count")
|
|
514
|
+
errorLogCount?: int64;
|
|
515
|
+
@encodedName("application/json", "error_logs")
|
|
516
|
+
errorLogs?: CiErrorExcerpt[];
|
|
517
|
+
|
|
339
518
|
@doc("Value of the span's ci.leg attribute, falling back to its service name.")
|
|
340
519
|
leg: string;
|
|
341
520
|
|
|
@@ -353,6 +532,11 @@ model CiPhase {
|
|
|
353
532
|
|
|
354
533
|
@doc("Structured output for ci_log: recent runs, or one run's phases.")
|
|
355
534
|
model CiLogOutput {
|
|
535
|
+
...ToolPage;
|
|
536
|
+
comparison?: CiComparison;
|
|
537
|
+
|
|
538
|
+
...ToolReadContext;
|
|
539
|
+
|
|
356
540
|
runs?: CiRunSummary[];
|
|
357
541
|
|
|
358
542
|
@encodedName("application/json", "run_id")
|
|
@@ -367,6 +551,30 @@ model CiLogOutput {
|
|
|
367
551
|
|
|
368
552
|
@doc("fetch_telemetry input for the trace list (view `traces`).")
|
|
369
553
|
model FetchTelemetryTracesInput {
|
|
554
|
+
@encodedName("application/json", "failure_class")
|
|
555
|
+
failureClass?: McpFailureClass;
|
|
556
|
+
@encodedName("application/json", "server_name")
|
|
557
|
+
serverName?: string;
|
|
558
|
+
@encodedName("application/json", "tool_name")
|
|
559
|
+
toolName?: string;
|
|
560
|
+
transport?: string;
|
|
561
|
+
|
|
562
|
+
@encodedName("application/json", "session_id")
|
|
563
|
+
sessionId?: SessionId;
|
|
564
|
+
@encodedName("application/json", "failure_id")
|
|
565
|
+
failureId?: FailureId;
|
|
566
|
+
@encodedName("application/json", "compare_to")
|
|
567
|
+
comparisonTraceId?: TraceId;
|
|
568
|
+
@encodedName("application/json", "selected_span_id")
|
|
569
|
+
selectedSpanId?: SpanId;
|
|
570
|
+
cursor?: Cursor;
|
|
571
|
+
|
|
572
|
+
...ToolTimeRange;
|
|
573
|
+
@encodedName("application/json", "since_cursor")
|
|
574
|
+
sinceCursor?: Cursor;
|
|
575
|
+
fields?: string[];
|
|
576
|
+
matchers?: TelemetryMatcher[];
|
|
577
|
+
|
|
370
578
|
view: "traces";
|
|
371
579
|
|
|
372
580
|
@doc("Return this one trace as the list, selected.")
|
|
@@ -380,6 +588,17 @@ model FetchTelemetryTracesInput {
|
|
|
380
588
|
|
|
381
589
|
@doc("fetch_telemetry input for one trace (view `trace`).")
|
|
382
590
|
model FetchTelemetryTraceInput {
|
|
591
|
+
selection?: "all" | "errors" | "errors_with_ancestors" | "critical_path";
|
|
592
|
+
attributes?: string[];
|
|
593
|
+
@encodedName("application/json", "include_logs")
|
|
594
|
+
includeLogs?: int32;
|
|
595
|
+
|
|
596
|
+
...ToolTimeRange;
|
|
597
|
+
@encodedName("application/json", "since_cursor")
|
|
598
|
+
sinceCursor?: Cursor;
|
|
599
|
+
fields?: string[];
|
|
600
|
+
matchers?: TelemetryMatcher[];
|
|
601
|
+
|
|
383
602
|
view: "trace";
|
|
384
603
|
|
|
385
604
|
@encodedName("application/json", "trace_id")
|
|
@@ -388,6 +607,12 @@ model FetchTelemetryTraceInput {
|
|
|
388
607
|
|
|
389
608
|
@doc("fetch_telemetry input for log records (view `logs`).")
|
|
390
609
|
model FetchTelemetryLogsInput {
|
|
610
|
+
...ToolTimeRange;
|
|
611
|
+
@encodedName("application/json", "since_cursor")
|
|
612
|
+
sinceCursor?: Cursor;
|
|
613
|
+
fields?: string[];
|
|
614
|
+
matchers?: TelemetryMatcher[];
|
|
615
|
+
|
|
391
616
|
view: "logs";
|
|
392
617
|
|
|
393
618
|
@encodedName("application/json", "trace_id")
|
|
@@ -410,6 +635,20 @@ model FetchTelemetryLogsInput {
|
|
|
410
635
|
|
|
411
636
|
@doc("fetch_telemetry input for MCP traffic statistics (view `mcp_stats`).")
|
|
412
637
|
model FetchTelemetryMcpStatsInput {
|
|
638
|
+
@encodedName("application/json", "server_name")
|
|
639
|
+
serverName?: string;
|
|
640
|
+
@encodedName("application/json", "tool_name")
|
|
641
|
+
toolName?: string;
|
|
642
|
+
transport?: string;
|
|
643
|
+
@encodedName("application/json", "compare_to")
|
|
644
|
+
compareTo?: McpStatsComparison;
|
|
645
|
+
|
|
646
|
+
...ToolTimeRange;
|
|
647
|
+
@encodedName("application/json", "since_cursor")
|
|
648
|
+
sinceCursor?: Cursor;
|
|
649
|
+
fields?: string[];
|
|
650
|
+
matchers?: TelemetryMatcher[];
|
|
651
|
+
|
|
413
652
|
view: "mcp_stats";
|
|
414
653
|
|
|
415
654
|
@doc("Window length in whole hours.")
|
|
@@ -425,12 +664,21 @@ union FetchTelemetryInput {
|
|
|
425
664
|
trace: FetchTelemetryTraceInput,
|
|
426
665
|
logs: FetchTelemetryLogsInput,
|
|
427
666
|
mcp_stats: FetchTelemetryMcpStatsInput,
|
|
667
|
+
compare: FetchTelemetryCompareInput,
|
|
428
668
|
}
|
|
429
669
|
|
|
430
670
|
@doc("Structured output for the app-only fetch_telemetry tool.")
|
|
431
671
|
model FetchTelemetryOutput {
|
|
432
|
-
|
|
433
|
-
|
|
672
|
+
comparison?: CompareTracesOutput;
|
|
673
|
+
@encodedName("application/json", "since_cursor")
|
|
674
|
+
sinceCursor?: Cursor;
|
|
675
|
+
@encodedName("application/json", "next_cursor")
|
|
676
|
+
nextCursor?: Cursor;
|
|
677
|
+
|
|
678
|
+
...ToolReadContext;
|
|
679
|
+
|
|
680
|
+
traces?: ToolTrace[];
|
|
681
|
+
trace?: ToolTrace;
|
|
434
682
|
logs?: LogRecord[];
|
|
435
683
|
stats?: McpDashboardStats;
|
|
436
684
|
mode: McpDataMode;
|
|
@@ -441,6 +689,12 @@ model FetchTelemetryOutput {
|
|
|
441
689
|
|
|
442
690
|
@doc("Aggregate MCP traffic statistics shown by qyl.mcp.")
|
|
443
691
|
model McpDashboardStats {
|
|
692
|
+
groups?: McpTrafficGroup[];
|
|
693
|
+
@encodedName("application/json", "failure_classes")
|
|
694
|
+
failureClasses?: McpFailureClasses;
|
|
695
|
+
comparison?: McpStatsComparisonResult;
|
|
696
|
+
coverage?: ToolCoverage;
|
|
697
|
+
|
|
444
698
|
window: McpDashboardWindow;
|
|
445
699
|
buckets: McpDashboardBucket[];
|
|
446
700
|
totals: McpDashboardTotals;
|
|
@@ -485,6 +739,11 @@ model McpDashboardBucket {
|
|
|
485
739
|
}
|
|
486
740
|
|
|
487
741
|
model McpDashboardTotals {
|
|
742
|
+
@encodedName("application/json", "p50_ms")
|
|
743
|
+
p50Ms?: float64;
|
|
744
|
+
@encodedName("application/json", "p95_ms")
|
|
745
|
+
p95Ms?: float64;
|
|
746
|
+
|
|
488
747
|
@minValue(0)
|
|
489
748
|
requests: int32;
|
|
490
749
|
|
|
@@ -533,6 +792,17 @@ model McpToolStats {
|
|
|
533
792
|
|
|
534
793
|
@doc("Input for list_metrics.")
|
|
535
794
|
model ListMetricsInput {
|
|
795
|
+
text?: string;
|
|
796
|
+
@encodedName("application/json", "service_name")
|
|
797
|
+
serviceName?: string;
|
|
798
|
+
kind?: MetricKind;
|
|
799
|
+
unit?: string;
|
|
800
|
+
|
|
801
|
+
@maxItems(32)
|
|
802
|
+
matchers?: TelemetryMatcher[];
|
|
803
|
+
|
|
804
|
+
...ToolTimeRange;
|
|
805
|
+
|
|
536
806
|
@doc("Return only names starting with this prefix.")
|
|
537
807
|
@encodedName("application/json", "name_prefix")
|
|
538
808
|
namePrefix?: string;
|
|
@@ -547,6 +817,8 @@ model ListMetricsInput {
|
|
|
547
817
|
|
|
548
818
|
@doc("Structured output for list_metrics.")
|
|
549
819
|
model ListMetricsOutput {
|
|
820
|
+
...ToolReadContext;
|
|
821
|
+
|
|
550
822
|
items: MetricDescriptor[];
|
|
551
823
|
...ToolPage;
|
|
552
824
|
|
|
@@ -556,6 +828,8 @@ model ListMetricsOutput {
|
|
|
556
828
|
|
|
557
829
|
@doc("Input for get_metric_series.")
|
|
558
830
|
model GetMetricSeriesInput {
|
|
831
|
+
...ToolTimeRange;
|
|
832
|
+
|
|
559
833
|
@encodedName("application/json", "metric_name")
|
|
560
834
|
@minLength(1)
|
|
561
835
|
metricName: string;
|
|
@@ -574,6 +848,12 @@ model GetMetricSeriesInput {
|
|
|
574
848
|
|
|
575
849
|
@doc("Structured output for get_metric_series.")
|
|
576
850
|
model GetMetricSeriesOutput {
|
|
851
|
+
keys?: MetricKeySummary[];
|
|
852
|
+
@encodedName("application/json", "suggested_group_by")
|
|
853
|
+
suggestedGroupBy?: string[];
|
|
854
|
+
|
|
855
|
+
...ToolReadContext;
|
|
856
|
+
|
|
577
857
|
items: MetricSeries[];
|
|
578
858
|
...ToolPage;
|
|
579
859
|
|
|
@@ -583,15 +863,23 @@ model GetMetricSeriesOutput {
|
|
|
583
863
|
|
|
584
864
|
@doc("Input for query_metric.")
|
|
585
865
|
model QueryMetricInput {
|
|
866
|
+
@encodedName("application/json", "lookback_minutes")
|
|
867
|
+
lookbackMinutes?: int32;
|
|
868
|
+
function?: "none" | "rate" | "increase" | "delta";
|
|
869
|
+
@encodedName("application/json", "compare_to")
|
|
870
|
+
compareTo?: MetricComparison;
|
|
871
|
+
@encodedName("application/json", "ratio_of")
|
|
872
|
+
ratioOf?: MetricRatio;
|
|
873
|
+
|
|
586
874
|
@encodedName("application/json", "metric_name")
|
|
587
875
|
@minLength(1)
|
|
588
876
|
metricName: string;
|
|
589
877
|
|
|
590
878
|
@encodedName("application/json", "start_time")
|
|
591
|
-
startTime
|
|
879
|
+
startTime?: utcDateTime;
|
|
592
880
|
|
|
593
881
|
@encodedName("application/json", "end_time")
|
|
594
|
-
endTime
|
|
882
|
+
endTime?: utcDateTime;
|
|
595
883
|
|
|
596
884
|
@doc("Bucket width in integer milliseconds.")
|
|
597
885
|
@encodedName("application/json", "step_ms")
|
|
@@ -618,6 +906,14 @@ model QueryMetricInput {
|
|
|
618
906
|
|
|
619
907
|
@doc("Structured output for query_metric: the collector's range-query result.")
|
|
620
908
|
model QueryMetricOutput {
|
|
909
|
+
method?: string;
|
|
910
|
+
approximate?: boolean;
|
|
911
|
+
@encodedName("application/json", "exemplar_trace_ids")
|
|
912
|
+
exemplarTraceIds?: TraceId[];
|
|
913
|
+
comparison?: MetricComparisonResult;
|
|
914
|
+
|
|
915
|
+
...ToolReadContext;
|
|
916
|
+
|
|
621
917
|
...MetricQueryResult;
|
|
622
918
|
|
|
623
919
|
@doc("Set when the call failed.")
|
|
@@ -630,6 +926,10 @@ model QueryMetricOutput {
|
|
|
630
926
|
|
|
631
927
|
@doc("Input for create_annotation.")
|
|
632
928
|
model CreateAnnotationInput {
|
|
929
|
+
@minLength(1) @maxLength(255)
|
|
930
|
+
@encodedName("application/json", "idempotency_key")
|
|
931
|
+
idempotencyKey?: string;
|
|
932
|
+
|
|
633
933
|
...AnnotationCreateRequest;
|
|
634
934
|
}
|
|
635
935
|
|
|
@@ -653,6 +953,10 @@ model AnnotationOutput {
|
|
|
653
953
|
|
|
654
954
|
@doc("Input for create_saved_query.")
|
|
655
955
|
model CreateSavedQueryInput {
|
|
956
|
+
@minLength(1) @maxLength(255)
|
|
957
|
+
@encodedName("application/json", "idempotency_key")
|
|
958
|
+
idempotencyKey?: string;
|
|
959
|
+
|
|
656
960
|
...SavedQueryCreateRequest;
|
|
657
961
|
}
|
|
658
962
|
|
|
@@ -677,6 +981,11 @@ model SavedQueryOutput {
|
|
|
677
981
|
|
|
678
982
|
@doc("Input for list_saved_queries.")
|
|
679
983
|
model ListSavedQueriesInput {
|
|
984
|
+
@maxItems(32)
|
|
985
|
+
matchers?: TelemetryMatcher[];
|
|
986
|
+
|
|
987
|
+
...ToolTimeRange;
|
|
988
|
+
|
|
680
989
|
signal?: SavedQuerySignal;
|
|
681
990
|
|
|
682
991
|
@minValue(1)
|
|
@@ -688,6 +997,8 @@ model ListSavedQueriesInput {
|
|
|
688
997
|
|
|
689
998
|
@doc("Structured output for list_saved_queries.")
|
|
690
999
|
model ListSavedQueriesOutput {
|
|
1000
|
+
...ToolReadContext;
|
|
1001
|
+
|
|
691
1002
|
@encodedName("application/json", "saved_queries")
|
|
692
1003
|
savedQueries: SavedQuery[];
|
|
693
1004
|
|
|
@@ -699,12 +1010,17 @@ model ListSavedQueriesOutput {
|
|
|
699
1010
|
|
|
700
1011
|
@doc("Input for run_saved_query.")
|
|
701
1012
|
model RunSavedQueryInput {
|
|
1013
|
+
@encodedName("application/json", "lookback_minutes")
|
|
1014
|
+
lookbackMinutes?: int32;
|
|
1015
|
+
|
|
702
1016
|
id: ResourceId;
|
|
703
1017
|
...SavedQueryRunRequest;
|
|
704
1018
|
}
|
|
705
1019
|
|
|
706
1020
|
@doc("Structured output for run_saved_query.")
|
|
707
1021
|
model RunSavedQueryOutput {
|
|
1022
|
+
...ToolReadContext;
|
|
1023
|
+
|
|
708
1024
|
result?: SavedQueryRunResult;
|
|
709
1025
|
mode?: McpDataMode;
|
|
710
1026
|
|
|
@@ -734,3 +1050,12 @@ model DeleteOutput {
|
|
|
734
1050
|
@doc("Set when the call failed.")
|
|
735
1051
|
error?: ToolError;
|
|
736
1052
|
}
|
|
1053
|
+
|
|
1054
|
+
@doc("FetchTelemetryCompareInput contract.")
|
|
1055
|
+
model FetchTelemetryCompareInput {
|
|
1056
|
+
...CompareTracesInput;
|
|
1057
|
+
view: "compare";
|
|
1058
|
+
@encodedName("application/json", "since_cursor")
|
|
1059
|
+
sinceCursor?: Cursor;
|
|
1060
|
+
fields?: string[];
|
|
1061
|
+
}
|
package/models/metrics.tsp
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../common/telemetry-query.tsp";
|
|
1
2
|
import "../common/types.tsp";
|
|
2
3
|
|
|
3
4
|
using Qyl.Api.Contracts.Common;
|
|
@@ -63,6 +64,11 @@ enum MetricAggregation {
|
|
|
63
64
|
This is the catalog entry a client reads before it knows which series exist.
|
|
64
65
|
""")
|
|
65
66
|
model MetricDescriptor {
|
|
67
|
+
@encodedName("application/json", "supported_aggregations")
|
|
68
|
+
supportedAggregations?: MetricAggregation[];
|
|
69
|
+
services?: string[];
|
|
70
|
+
conflicts?: MetricDescriptorConflict[];
|
|
71
|
+
|
|
66
72
|
@doc("Instrument name, e.g. `http.server.request.duration`.")
|
|
67
73
|
name: string;
|
|
68
74
|
|
|
@@ -90,6 +96,9 @@ model MetricDescriptor {
|
|
|
90
96
|
|
|
91
97
|
@doc("One distinct attribute stream recorded under a metric name.")
|
|
92
98
|
model MetricSeries {
|
|
99
|
+
new?: boolean;
|
|
100
|
+
stale?: boolean;
|
|
101
|
+
|
|
93
102
|
@doc("Stable identifier for this stream, derived from its name, attributes and resource.")
|
|
94
103
|
@encodedName("application/json", "series_id")
|
|
95
104
|
seriesId: string;
|
|
@@ -172,13 +181,7 @@ model MetricQueryResult {
|
|
|
172
181
|
}
|
|
173
182
|
|
|
174
183
|
@doc("How a structured attribute matcher compares an attribute value.")
|
|
175
|
-
enum MetricMatcherOp {
|
|
176
|
-
@doc("The attribute equals `value`; serialized to the `attr` query parameter as `key=value`.")
|
|
177
|
-
eq: "eq",
|
|
178
|
-
|
|
179
|
-
@doc("The attribute starts with `value`; serialized to the `attr_prefix` query parameter as `key=value`.")
|
|
180
|
-
prefix: "prefix",
|
|
181
|
-
}
|
|
184
|
+
enum MetricMatcherOp { eq, neq, `in`, prefix, contains, exists, gt, gte, lt, lte }
|
|
182
185
|
|
|
183
186
|
@doc("""
|
|
184
187
|
One structured attribute matcher. Tool inputs and saved queries carry
|
|
@@ -186,13 +189,12 @@ enum MetricMatcherOp {
|
|
|
186
189
|
parameters, and a client serializes each matcher to one of them.
|
|
187
190
|
""")
|
|
188
191
|
model MetricAttributeMatcher {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
@maxLength(256)
|
|
192
|
-
key: string;
|
|
193
|
-
|
|
194
|
-
`op`: MetricMatcherOp;
|
|
192
|
+
...TelemetryMatcher;
|
|
193
|
+
}
|
|
195
194
|
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
@doc("MetricDescriptorConflict contract.")
|
|
196
|
+
model MetricDescriptorConflict {
|
|
197
|
+
kind: MetricKind;
|
|
198
|
+
unit?: string;
|
|
199
|
+
services: string[];
|
|
198
200
|
}
|
package/models/saved-queries.tsp
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../common/telemetry-query.tsp";
|
|
1
2
|
// =============================================================================
|
|
2
3
|
// Saved queries: named, structured filters for traces, logs or metrics
|
|
3
4
|
// =============================================================================
|
|
@@ -44,6 +45,9 @@ model SavedQueryWindow {
|
|
|
44
45
|
|
|
45
46
|
@doc("A saved filter over traces.")
|
|
46
47
|
model SavedTraceQueryFilter {
|
|
48
|
+
@maxItems(32)
|
|
49
|
+
matchers?: TelemetryMatcher[];
|
|
50
|
+
|
|
47
51
|
signal: "traces";
|
|
48
52
|
...SavedQueryWindow;
|
|
49
53
|
|
|
@@ -59,6 +63,9 @@ model SavedTraceQueryFilter {
|
|
|
59
63
|
|
|
60
64
|
@doc("A saved filter over log records.")
|
|
61
65
|
model SavedLogQueryFilter {
|
|
66
|
+
@maxItems(32)
|
|
67
|
+
matchers?: TelemetryMatcher[];
|
|
68
|
+
|
|
62
69
|
signal: "logs";
|
|
63
70
|
...SavedQueryWindow;
|
|
64
71
|
|