@dalmia/calibrate-mcp 0.0.87 → 0.0.88
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/bin/mcp-server.js +340 -20
- package/bin/mcp-server.js.map +19 -11
- package/esm/funcs/tracesList.d.ts +16 -0
- package/esm/funcs/tracesList.d.ts.map +1 -0
- package/esm/funcs/tracesList.js +102 -0
- package/esm/funcs/tracesList.js.map +1 -0
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/tracesList.d.ts +7 -0
- package/esm/mcp-server/tools/tracesList.d.ts.map +1 -0
- package/esm/mcp-server/tools/tracesList.js +40 -0
- package/esm/mcp-server/tools/tracesList.js.map +1 -0
- package/esm/models/listtracesendpointtracesgetop.d.ts +55 -0
- package/esm/models/listtracesendpointtracesgetop.d.ts.map +1 -0
- package/esm/models/listtracesendpointtracesgetop.js +52 -0
- package/esm/models/listtracesendpointtracesgetop.js.map +1 -0
- package/esm/models/traceevalrunstatus.d.ts +18 -0
- package/esm/models/traceevalrunstatus.d.ts.map +1 -0
- package/esm/models/traceevalrunstatus.js +19 -0
- package/esm/models/traceevalrunstatus.js.map +1 -0
- package/esm/models/tracelistresponse.d.ts +15 -0
- package/esm/models/tracelistresponse.d.ts.map +1 -0
- package/esm/models/tracelistresponse.js +16 -0
- package/esm/models/tracelistresponse.js.map +1 -0
- package/esm/models/tracescoreaverage.d.ts +38 -0
- package/esm/models/tracescoreaverage.d.ts.map +1 -0
- package/esm/models/tracescoreaverage.js +31 -0
- package/esm/models/tracescoreaverage.js.map +1 -0
- package/esm/models/tracescoreresult.d.ts +58 -0
- package/esm/models/tracescoreresult.d.ts.map +1 -0
- package/esm/models/tracescoreresult.js +50 -0
- package/esm/models/tracescoreresult.js.map +1 -0
- package/esm/models/tracesummary.d.ts +35 -0
- package/esm/models/tracesummary.d.ts.map +1 -0
- package/esm/models/tracesummary.js +42 -0
- package/esm/models/tracesummary.js.map +1 -0
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +4 -0
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/tracesList.ts +165 -0
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/tracesList.ts +48 -0
- package/src/models/listtracesendpointtracesgetop.ts +129 -0
- package/src/models/traceevalrunstatus.ts +23 -0
- package/src/models/tracelistresponse.ts +39 -0
- package/src/models/tracescoreaverage.ts +72 -0
- package/src/models/tracescoreresult.ts +107 -0
- package/src/models/tracesummary.ts +112 -0
- package/src/tool-names.ts +4 -0
package/bin/mcp-server.js
CHANGED
|
@@ -25997,6 +25997,15 @@ var require_utils2 = __commonJS(function(exports, module) {
|
|
|
25997
25997
|
}
|
|
25998
25998
|
return max;
|
|
25999
25999
|
};
|
|
26000
|
+
var countElements = function countElements(arr) {
|
|
26001
|
+
var count = 0;
|
|
26002
|
+
for (var i = 0;i < arr.length; ++i) {
|
|
26003
|
+
if (has.call(arr, i)) {
|
|
26004
|
+
count += 1;
|
|
26005
|
+
}
|
|
26006
|
+
}
|
|
26007
|
+
return count;
|
|
26008
|
+
};
|
|
26000
26009
|
var limitedPair = function limitedPair(first, second, options) {
|
|
26001
26010
|
var pair = [first, second];
|
|
26002
26011
|
if (options && typeof options.arrayLimit === "number" && pair.length > options.arrayLimit) {
|
|
@@ -26014,7 +26023,7 @@ var require_utils2 = __commonJS(function(exports, module) {
|
|
|
26014
26023
|
if (typeof source !== "object" && typeof source !== "function") {
|
|
26015
26024
|
if (isArray(target)) {
|
|
26016
26025
|
var nextIndex = target.length;
|
|
26017
|
-
if (options && typeof options.arrayLimit === "number" &&
|
|
26026
|
+
if (options && typeof options.arrayLimit === "number" && countElements(target) >= options.arrayLimit) {
|
|
26018
26027
|
if (options.throwOnLimitExceeded) {
|
|
26019
26028
|
throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
26020
26029
|
}
|
|
@@ -26083,7 +26092,7 @@ var require_utils2 = __commonJS(function(exports, module) {
|
|
|
26083
26092
|
target[i] = item;
|
|
26084
26093
|
}
|
|
26085
26094
|
});
|
|
26086
|
-
if (options && typeof options.arrayLimit === "number" && target
|
|
26095
|
+
if (options && typeof options.arrayLimit === "number" && countElements(target) > options.arrayLimit) {
|
|
26087
26096
|
if (options.throwOnLimitExceeded) {
|
|
26088
26097
|
throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
26089
26098
|
}
|
|
@@ -26577,6 +26586,7 @@ var require_parse = __commonJS(function(exports, module) {
|
|
|
26577
26586
|
var has = Object.prototype.hasOwnProperty;
|
|
26578
26587
|
var isArray = Array.isArray;
|
|
26579
26588
|
var getPrototypeOf = Object.getPrototypeOf;
|
|
26589
|
+
var fromCharCode = String.fromCharCode;
|
|
26580
26590
|
var isPlainContainer = function isPlainContainer(value) {
|
|
26581
26591
|
if (!value || typeof value !== "object") {
|
|
26582
26592
|
return false;
|
|
@@ -26645,7 +26655,12 @@ var require_parse = __commonJS(function(exports, module) {
|
|
|
26645
26655
|
};
|
|
26646
26656
|
var interpretNumericEntities = function(str) {
|
|
26647
26657
|
return str.replace(/&#(\d+);/g, function($0, numberStr) {
|
|
26648
|
-
|
|
26658
|
+
var c = parseInt(numberStr, 10);
|
|
26659
|
+
if (c > 65535 && c <= 1114111) {
|
|
26660
|
+
c -= 65536;
|
|
26661
|
+
return fromCharCode(55296 | c >> 10, 56320 | c & 1023);
|
|
26662
|
+
}
|
|
26663
|
+
return fromCharCode(c);
|
|
26649
26664
|
});
|
|
26650
26665
|
};
|
|
26651
26666
|
var parseArrayValue = function(val, options, currentArrayLength) {
|
|
@@ -26738,6 +26753,9 @@ var require_parse = __commonJS(function(exports, module) {
|
|
|
26738
26753
|
}
|
|
26739
26754
|
return obj;
|
|
26740
26755
|
};
|
|
26756
|
+
var stripWrappingBrackets = function stripWrappingBrackets(key) {
|
|
26757
|
+
return key.charAt(0) === "[" && key.charAt(key.length - 1) === "]" ? key.slice(1, -1) : key;
|
|
26758
|
+
};
|
|
26741
26759
|
var parseObject = function(chain, val, options, valuesParsed) {
|
|
26742
26760
|
var currentArrayLength = 0;
|
|
26743
26761
|
if (chain.length > 0 && chain[chain.length - 1] === "[]") {
|
|
@@ -26756,12 +26774,12 @@ var require_parse = __commonJS(function(exports, module) {
|
|
|
26756
26774
|
}
|
|
26757
26775
|
} else {
|
|
26758
26776
|
obj = options.plainObjects ? { __proto__: null } : {};
|
|
26759
|
-
var cleanRoot =
|
|
26777
|
+
var cleanRoot = stripWrappingBrackets(root);
|
|
26760
26778
|
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/gi, ".") : cleanRoot;
|
|
26761
26779
|
var index = parseInt(decodedRoot, 10);
|
|
26762
26780
|
var isValidArrayIndex = !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays;
|
|
26763
26781
|
if (!options.parseArrays && decodedRoot === "") {
|
|
26764
|
-
obj =
|
|
26782
|
+
obj[0] = leaf;
|
|
26765
26783
|
} else if (isValidArrayIndex && index < options.arrayLimit) {
|
|
26766
26784
|
obj = [];
|
|
26767
26785
|
obj[index] = leaf;
|
|
@@ -26808,7 +26826,7 @@ var require_parse = __commonJS(function(exports, module) {
|
|
|
26808
26826
|
var splitKeyIntoSegments = function splitKeyIntoSegments(originalKey, options) {
|
|
26809
26827
|
var key = options.allowDots ? topLevelDotsToBrackets(originalKey) : originalKey;
|
|
26810
26828
|
if (options.depth <= 0) {
|
|
26811
|
-
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
26829
|
+
if (!options.plainObjects && has.call(Object.prototype, stripWrappingBrackets(key))) {
|
|
26812
26830
|
if (!options.allowPrototypes) {
|
|
26813
26831
|
return;
|
|
26814
26832
|
}
|
|
@@ -27095,10 +27113,11 @@ var require_encodeurl = __commonJS(function(exports, module) {
|
|
|
27095
27113
|
*/
|
|
27096
27114
|
module.exports = encodeUrl;
|
|
27097
27115
|
var ENCODE_CHARS_REGEXP = /(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g;
|
|
27098
|
-
var
|
|
27099
|
-
var UNMATCHED_SURROGATE_PAIR_REPLACE = "$1�$2";
|
|
27116
|
+
var SURROGATE_REGEXP = /([\uD800-\uDBFF][\uDC00-\uDFFF])|[\uD800-\uDFFF]/g;
|
|
27100
27117
|
function encodeUrl(url) {
|
|
27101
|
-
return String(url).replace(
|
|
27118
|
+
return String(url).replace(SURROGATE_REGEXP, function(_, pair) {
|
|
27119
|
+
return pair || "�";
|
|
27120
|
+
}).replace(ENCODE_CHARS_REGEXP, encodeURI);
|
|
27102
27121
|
}
|
|
27103
27122
|
});
|
|
27104
27123
|
|
|
@@ -53279,9 +53298,9 @@ var init_config = __esm(() => {
|
|
|
53279
53298
|
SDK_METADATA = {
|
|
53280
53299
|
language: "typescript",
|
|
53281
53300
|
openapiDocVersion: "0.1.0",
|
|
53282
|
-
sdkVersion: "0.0.
|
|
53301
|
+
sdkVersion: "0.0.88",
|
|
53283
53302
|
genVersion: "2.915.1",
|
|
53284
|
-
userAgent: "speakeasy-sdk/mcp-typescript 0.0.
|
|
53303
|
+
userAgent: "speakeasy-sdk/mcp-typescript 0.0.88 2.915.1 0.1.0 @dalmia/calibrate-mcp"
|
|
53285
53304
|
};
|
|
53286
53305
|
});
|
|
53287
53306
|
|
|
@@ -62903,6 +62922,294 @@ hits its trace limit.
|
|
|
62903
62922
|
};
|
|
62904
62923
|
});
|
|
62905
62924
|
|
|
62925
|
+
// src/models/tracescoreaverage.ts
|
|
62926
|
+
var TraceScoreAverageOutputType$zodSchema, TraceScoreAverage$zodSchema;
|
|
62927
|
+
var init_tracescoreaverage = __esm(() => {
|
|
62928
|
+
init_zod();
|
|
62929
|
+
TraceScoreAverageOutputType$zodSchema = _enum([
|
|
62930
|
+
"binary",
|
|
62931
|
+
"rating"
|
|
62932
|
+
]).describe("How the evaluator scores:\n\n- `binary`: pass or fail\n- `rating`: a numeric score, using the scale in `output_config`\n");
|
|
62933
|
+
TraceScoreAverage$zodSchema = object({
|
|
62934
|
+
average: number2().describe("Mean of those scores. A binary evaluator averages 0 and 1, so its mean is the share that passed"),
|
|
62935
|
+
evaluator_uuid: string2().describe("ID of the evaluator these numbers are for"),
|
|
62936
|
+
name: string2().describe("Name of the evaluator. Uses the last stored name if it has been deleted"),
|
|
62937
|
+
output_type: TraceScoreAverageOutputType$zodSchema.describe("How the evaluator scores:\n\n- `binary`: pass or fail\n- `rating`: a numeric score, using the scale in `output_config`\n"),
|
|
62938
|
+
scale_max: number2().nullable().optional().describe("Highest value on a rating scale"),
|
|
62939
|
+
scale_min: number2().nullable().optional().describe("Lowest value on a rating scale"),
|
|
62940
|
+
traces_scored: int().describe("How many of the matching traces this evaluator scored")
|
|
62941
|
+
});
|
|
62942
|
+
});
|
|
62943
|
+
|
|
62944
|
+
// src/models/traceevalrunstatus.ts
|
|
62945
|
+
var TraceEvalRunStatus$zodSchema;
|
|
62946
|
+
var init_traceevalrunstatus = __esm(() => {
|
|
62947
|
+
init_zod();
|
|
62948
|
+
TraceEvalRunStatus$zodSchema = _enum([
|
|
62949
|
+
"pending",
|
|
62950
|
+
"processing",
|
|
62951
|
+
"completed",
|
|
62952
|
+
"failed",
|
|
62953
|
+
"skipped"
|
|
62954
|
+
]);
|
|
62955
|
+
});
|
|
62956
|
+
|
|
62957
|
+
// src/models/tracescoreresult.ts
|
|
62958
|
+
var TraceScoreResultEvaluatorType$zodSchema, TraceScoreResultOutputType$zodSchema, TraceScoreResult$zodSchema;
|
|
62959
|
+
var init_tracescoreresult = __esm(() => {
|
|
62960
|
+
init_zod();
|
|
62961
|
+
TraceScoreResultEvaluatorType$zodSchema = _enum([
|
|
62962
|
+
"tts",
|
|
62963
|
+
"stt",
|
|
62964
|
+
"llm",
|
|
62965
|
+
"llm-general",
|
|
62966
|
+
"conversation",
|
|
62967
|
+
"tool-call"
|
|
62968
|
+
]);
|
|
62969
|
+
TraceScoreResultOutputType$zodSchema = _enum([
|
|
62970
|
+
"binary",
|
|
62971
|
+
"rating"
|
|
62972
|
+
]).describe("How the evaluator scores:\n\n- `binary`: pass or fail\n- `rating`: a numeric score, using the scale in `output_config`\n");
|
|
62973
|
+
TraceScoreResult$zodSchema = object({
|
|
62974
|
+
evaluator_type: TraceScoreResultEvaluatorType$zodSchema.nullable().optional().describe("What the evaluator judges:\n\n- `tts`: TTS audio\n- `stt`: one transcript\n- `llm`: a reply with its conversation history\n- `llm-general`: a standalone input and output pair\n- `conversation`: a full conversation\n- `tool-call`: whether the agent called the right tool, labelled by a person\n"),
|
|
62975
|
+
evaluator_uuid: string2().describe("ID of the evaluator that produced this result"),
|
|
62976
|
+
evaluator_version_id: string2().describe("ID of the evaluator version that produced this result"),
|
|
62977
|
+
name: string2().describe("Name of the evaluator. Uses the last stored name if it has been deleted"),
|
|
62978
|
+
output_type: TraceScoreResultOutputType$zodSchema.describe("How the evaluator scores:\n\n- `binary`: pass or fail\n- `rating`: a numeric score, using the scale in `output_config`\n"),
|
|
62979
|
+
passed: boolean2().describe("Whether this evaluator passed. A binary result passes on 1. A rating passes at the top of its scale"),
|
|
62980
|
+
reasoning: string2().nullable().optional().describe("The judge's rationale for this result"),
|
|
62981
|
+
scale_max: number2().nullable().optional().describe("Highest value on a rating scale"),
|
|
62982
|
+
scale_min: number2().nullable().optional().describe("Lowest value on a rating scale"),
|
|
62983
|
+
value: number2().describe("The judged result. Binary stores 0 or 1. Rating stores the numeric score")
|
|
62984
|
+
});
|
|
62985
|
+
});
|
|
62986
|
+
|
|
62987
|
+
// src/models/tracesummary.ts
|
|
62988
|
+
var TraceSummaryInput$zodSchema, TraceSummary$zodSchema;
|
|
62989
|
+
var init_tracesummary = __esm(() => {
|
|
62990
|
+
init_zod();
|
|
62991
|
+
init_traceevalrunstatus();
|
|
62992
|
+
init_tracemetadataentry();
|
|
62993
|
+
init_traceoutput();
|
|
62994
|
+
init_tracescoreresult();
|
|
62995
|
+
init_tracetoolcall();
|
|
62996
|
+
init_traceturn();
|
|
62997
|
+
TraceSummaryInput$zodSchema = union([
|
|
62998
|
+
string2(),
|
|
62999
|
+
array(TraceTurn$zodSchema)
|
|
63000
|
+
]).describe("What the agent was given for this turn. For a `general` agent, the standalone prompt as a string. For a `conversation` agent, the history up to the reported output, oldest turn first, in OpenAI chat format. Sent only with `include_content`");
|
|
63001
|
+
TraceSummary$zodSchema = object({
|
|
63002
|
+
agent_id: string2().describe("ID of the agent that produced the turn"),
|
|
63003
|
+
conversation_id: string2().nullable().optional().describe("The conversation ID you sent, if any"),
|
|
63004
|
+
created_at: string2().describe("When the trace was created (ISO 8601 UTC)"),
|
|
63005
|
+
input: union([
|
|
63006
|
+
string2(),
|
|
63007
|
+
array(TraceTurn$zodSchema)
|
|
63008
|
+
]).nullable().optional().describe("What the agent was given for this turn. For a `general` agent, the standalone prompt as a string. For a `conversation` agent, the history up to the reported output, oldest turn first, in OpenAI chat format. Sent only with `include_content`"),
|
|
63009
|
+
input_preview: string2().nullable().optional().describe("The standalone prompt or the last user message, truncated for display"),
|
|
63010
|
+
labels: array(string2()).describe("Your own tags for this turn, such as an environment or a release. Matched exactly when filtering, so keep the spelling stable"),
|
|
63011
|
+
latest_run_error: string2().nullable().optional().describe("Why the latest scoring run was skipped or failed"),
|
|
63012
|
+
latest_run_status: TraceEvalRunStatus$zodSchema.nullable().optional().describe("Status of the latest scoring run for this trace"),
|
|
63013
|
+
message_id: string2().nullable().optional().describe("The message ID you sent, if any"),
|
|
63014
|
+
metadata: array(TraceMetadataEntry$zodSchema).nullable().optional().describe("Key-value pairs stored with the trace. Sent only with `include_content`"),
|
|
63015
|
+
metadata_count: int().describe("Number of metadata entries stored with the trace"),
|
|
63016
|
+
output: TraceOutput$zodSchema.nullable().optional().describe("What the agent produced for this turn. Sent only with `include_content`"),
|
|
63017
|
+
response_preview: string2().nullable().optional().describe("The agent reply, truncated for display"),
|
|
63018
|
+
results: array(TraceScoreResult$zodSchema).optional().describe("Results for each evaluator on the latest scoring run"),
|
|
63019
|
+
tool_call_count: int().describe("Number of tool calls the agent issued for this turn"),
|
|
63020
|
+
tool_calls: array(TraceToolCall$zodSchema).describe("Tools the agent issued on this turn, with the arguments it passed"),
|
|
63021
|
+
tool_names: array(string2()).describe("Names of the tools the agent issued on this turn, in order"),
|
|
63022
|
+
turn_count: int().describe("Number of turns in the stored input. A standalone prompt counts as 1"),
|
|
63023
|
+
uuid: string2().describe("Unique ID for the trace")
|
|
63024
|
+
});
|
|
63025
|
+
});
|
|
63026
|
+
|
|
63027
|
+
// src/models/tracelistresponse.ts
|
|
63028
|
+
var TraceListResponse$zodSchema;
|
|
63029
|
+
var init_tracelistresponse = __esm(() => {
|
|
63030
|
+
init_zod();
|
|
63031
|
+
init_tracescoreaverage();
|
|
63032
|
+
init_tracesummary();
|
|
63033
|
+
TraceListResponse$zodSchema = object({
|
|
63034
|
+
items: array(TraceSummary$zodSchema).describe("The page of results"),
|
|
63035
|
+
limit: int().nullable().optional().describe("The applied `limit` (null when unbounded)"),
|
|
63036
|
+
offset: int().default(0).describe("The applied `offset`"),
|
|
63037
|
+
score_averages: array(TraceScoreAverage$zodSchema).nullable().optional().describe("One entry per evaluator that scored at least one matching trace, averaged over every matching trace rather than this page. Ask for it with `include_score_averages`"),
|
|
63038
|
+
total: int().describe("Total number of items matching the query, before pagination")
|
|
63039
|
+
}).describe("The page, plus the averages when `include_score_averages` asked for them.");
|
|
63040
|
+
});
|
|
63041
|
+
|
|
63042
|
+
// src/models/listtracesendpointtracesgetop.ts
|
|
63043
|
+
var ListTracesEndpointTracesGetOutputType$zodSchema, SortOrder$zodSchema, ListTracesEndpointTracesGetRequest$zodSchema, ListTracesEndpointTracesGetResponse$zodSchema;
|
|
63044
|
+
var init_listtracesendpointtracesgetop = __esm(() => {
|
|
63045
|
+
init_zod();
|
|
63046
|
+
init_httpvalidationerror();
|
|
63047
|
+
init_tracelistresponse();
|
|
63048
|
+
ListTracesEndpointTracesGetOutputType$zodSchema = _enum([
|
|
63049
|
+
"response",
|
|
63050
|
+
"tool_call"
|
|
63051
|
+
]).describe("Return only traces whose output is of this kind. `response` covers every trace carrying a reply, including one that also issued tool calls. `tool_call` covers traces that only issued tool calls");
|
|
63052
|
+
SortOrder$zodSchema = _enum([
|
|
63053
|
+
"asc",
|
|
63054
|
+
"desc"
|
|
63055
|
+
]).describe("Whether `sort_by_evaluator` puts the highest scores first or the lowest. Ignored without it");
|
|
63056
|
+
ListTracesEndpointTracesGetRequest$zodSchema = object({
|
|
63057
|
+
agent_id: string2().describe("Return only traces from this agent").nullable().optional(),
|
|
63058
|
+
conversation_id: string2().describe("Return only the turns of this conversation. Requires `agent_id`").nullable().optional(),
|
|
63059
|
+
created_after: datetime2({ offset: true }).describe("Return only traces created at or after this time (ISO 8601). A time with no timezone is read as UTC").nullable().optional(),
|
|
63060
|
+
created_before: datetime2({ offset: true }).describe("Return only traces created before this time (ISO 8601). A time with no timezone is read as UTC").nullable().optional(),
|
|
63061
|
+
include_content: boolean2().default(false).describe("Also return each trace's full input, output and metadata. Use `limit` and `offset` to page through them"),
|
|
63062
|
+
include_score_averages: boolean2().default(false).describe("Also return each evaluator's mean score over every matching trace, not just this page. Costs a pass over those traces, so ask for it when the filters change rather than on every page"),
|
|
63063
|
+
labels: array(string2()).describe("Return only traces carrying at least one of these labels. Repeat the parameter for each label").nullable().optional(),
|
|
63064
|
+
limit: int().default(50).describe("Maximum number of items to return"),
|
|
63065
|
+
offset: int().default(0).describe("Number of items to skip before returning results"),
|
|
63066
|
+
output_type: ListTracesEndpointTracesGetOutputType$zodSchema.nullable().optional().describe("Return only traces whose output is of this kind. `response` covers every trace carrying a reply, including one that also issued tool calls. `tool_call` covers traces that only issued tool calls"),
|
|
63067
|
+
q: string2().describe("Return only traces containing this text in their message ID, conversation ID, conversation history, output, or metadata").nullable().optional(),
|
|
63068
|
+
score: array(string2()).describe("Return only traces whose latest scoring run matches this condition. Each is written as `<evaluator ID>:<condition>`, where the condition is `passed`, `failed`, or one of `=`, `!=`, `<`, `<=`, `>`, `>=` followed by a number, such as `>=4`. Repeat the parameter to require every condition at once").nullable().optional(),
|
|
63069
|
+
sort_by_evaluator: string2().describe("Order traces by this evaluator's score on each trace's latest scoring run. Traces it has not scored come last whichever direction you pick").nullable().optional(),
|
|
63070
|
+
sort_order: SortOrder$zodSchema.default("desc").describe("Whether `sort_by_evaluator` puts the highest scores first or the lowest. Ignored without it"),
|
|
63071
|
+
xAPIKey: string2().nullable().optional()
|
|
63072
|
+
});
|
|
63073
|
+
ListTracesEndpointTracesGetResponse$zodSchema = union([
|
|
63074
|
+
TraceListResponse$zodSchema,
|
|
63075
|
+
HTTPValidationError$zodSchema
|
|
63076
|
+
]);
|
|
63077
|
+
});
|
|
63078
|
+
|
|
63079
|
+
// src/funcs/tracesList.ts
|
|
63080
|
+
function tracesList(client$, request, options) {
|
|
63081
|
+
return new APIPromise($do46(client$, request, options));
|
|
63082
|
+
}
|
|
63083
|
+
async function $do46(client$, request, options) {
|
|
63084
|
+
const parsed$ = safeParse4(request, (value$) => ListTracesEndpointTracesGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
|
|
63085
|
+
if (!parsed$.ok) {
|
|
63086
|
+
return [parsed$, { status: "invalid" }];
|
|
63087
|
+
}
|
|
63088
|
+
const payload$ = parsed$.value;
|
|
63089
|
+
const body$ = null;
|
|
63090
|
+
const path$ = pathToFunc("/traces")();
|
|
63091
|
+
const query$ = encodeFormQuery({
|
|
63092
|
+
agent_id: payload$?.agent_id,
|
|
63093
|
+
conversation_id: payload$?.conversation_id,
|
|
63094
|
+
created_after: payload$?.created_after,
|
|
63095
|
+
created_before: payload$?.created_before,
|
|
63096
|
+
include_content: payload$?.include_content,
|
|
63097
|
+
include_score_averages: payload$?.include_score_averages,
|
|
63098
|
+
labels: payload$?.labels,
|
|
63099
|
+
limit: payload$?.limit,
|
|
63100
|
+
offset: payload$?.offset,
|
|
63101
|
+
output_type: payload$?.output_type,
|
|
63102
|
+
q: payload$?.q,
|
|
63103
|
+
score: payload$?.score,
|
|
63104
|
+
sort_by_evaluator: payload$?.sort_by_evaluator,
|
|
63105
|
+
sort_order: payload$?.sort_order
|
|
63106
|
+
});
|
|
63107
|
+
const headers$ = new Headers(compactMap({
|
|
63108
|
+
Accept: "application/json",
|
|
63109
|
+
"X-API-Key": encodeSimple("X-API-Key", payload$?.xAPIKey, {
|
|
63110
|
+
explode: false,
|
|
63111
|
+
charEncoding: "none"
|
|
63112
|
+
})
|
|
63113
|
+
}));
|
|
63114
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
63115
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
63116
|
+
const context = {
|
|
63117
|
+
options: client$._options,
|
|
63118
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
63119
|
+
operationID: "list_traces_endpoint_traces_get",
|
|
63120
|
+
oAuth2Scopes: null,
|
|
63121
|
+
resolvedSecurity: requestSecurity,
|
|
63122
|
+
securitySource: client$._options.security,
|
|
63123
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
63124
|
+
retryCodes: options?.retryCodes || [
|
|
63125
|
+
"429",
|
|
63126
|
+
"500",
|
|
63127
|
+
"502",
|
|
63128
|
+
"503",
|
|
63129
|
+
"504"
|
|
63130
|
+
]
|
|
63131
|
+
};
|
|
63132
|
+
const requestRes = client$._createRequest(context, {
|
|
63133
|
+
security: requestSecurity,
|
|
63134
|
+
method: "GET",
|
|
63135
|
+
baseURL: options?.serverURL,
|
|
63136
|
+
path: path$,
|
|
63137
|
+
headers: headers$,
|
|
63138
|
+
query: query$,
|
|
63139
|
+
body: body$,
|
|
63140
|
+
userAgent: client$._options.userAgent,
|
|
63141
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
63142
|
+
}, options);
|
|
63143
|
+
if (!requestRes.ok) {
|
|
63144
|
+
return [requestRes, { status: "invalid" }];
|
|
63145
|
+
}
|
|
63146
|
+
const req$ = requestRes.value;
|
|
63147
|
+
const doResult = await client$._do(req$, {
|
|
63148
|
+
context,
|
|
63149
|
+
errorCodes: [],
|
|
63150
|
+
retryConfig: context.retryConfig,
|
|
63151
|
+
retryCodes: context.retryCodes
|
|
63152
|
+
});
|
|
63153
|
+
if (!doResult.ok) {
|
|
63154
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
63155
|
+
}
|
|
63156
|
+
return [doResult, {
|
|
63157
|
+
status: "complete",
|
|
63158
|
+
request: req$,
|
|
63159
|
+
response: doResult.value
|
|
63160
|
+
}];
|
|
63161
|
+
}
|
|
63162
|
+
var init_tracesList = __esm(() => {
|
|
63163
|
+
init_encodings();
|
|
63164
|
+
init_primitives();
|
|
63165
|
+
init_schemas4();
|
|
63166
|
+
init_security();
|
|
63167
|
+
init_url();
|
|
63168
|
+
init_listtracesendpointtracesgetop();
|
|
63169
|
+
init_async();
|
|
63170
|
+
});
|
|
63171
|
+
|
|
63172
|
+
// src/mcp-server/tools/tracesList.ts
|
|
63173
|
+
var args46, tool$tracesList;
|
|
63174
|
+
var init_tracesList2 = __esm(() => {
|
|
63175
|
+
init_tracesList();
|
|
63176
|
+
init_listtracesendpointtracesgetop();
|
|
63177
|
+
init_tools();
|
|
63178
|
+
args46 = {
|
|
63179
|
+
request: ListTracesEndpointTracesGetRequest$zodSchema.optional()
|
|
63180
|
+
};
|
|
63181
|
+
tool$tracesList = {
|
|
63182
|
+
name: "list-traces",
|
|
63183
|
+
description: `List the traces in the caller's org, newest first, one page at a
|
|
63184
|
+
time. Each trace carries a short preview of its last user message
|
|
63185
|
+
and reply, its tool calls and labels, and the scores from its
|
|
63186
|
+
latest scoring run with each evaluator's reasoning and evaluator
|
|
63187
|
+
version. Filter by agent, label, creation time, text, or score.
|
|
63188
|
+
Set include_content to also get each trace's full input, output
|
|
63189
|
+
and metadata.
|
|
63190
|
+
`,
|
|
63191
|
+
scopes: ["read"],
|
|
63192
|
+
annotations: {
|
|
63193
|
+
title: "List traces",
|
|
63194
|
+
destructiveHint: false,
|
|
63195
|
+
idempotentHint: false,
|
|
63196
|
+
openWorldHint: true,
|
|
63197
|
+
readOnlyHint: true
|
|
63198
|
+
},
|
|
63199
|
+
args: args46,
|
|
63200
|
+
tool: async (client, args, ctx) => {
|
|
63201
|
+
const [result] = await tracesList(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63202
|
+
if (!result.ok) {
|
|
63203
|
+
return {
|
|
63204
|
+
content: [{ type: "text", text: result.error.message }],
|
|
63205
|
+
isError: true
|
|
63206
|
+
};
|
|
63207
|
+
}
|
|
63208
|
+
return formatResult(result.value);
|
|
63209
|
+
}
|
|
63210
|
+
};
|
|
63211
|
+
});
|
|
63212
|
+
|
|
62906
63213
|
// src/models/currentworkspaceresponse.ts
|
|
62907
63214
|
var CurrentWorkspaceResponse$zodSchema;
|
|
62908
63215
|
var init_currentworkspaceresponse = __esm(() => {
|
|
@@ -62930,9 +63237,9 @@ var init_getcurrentworkspaceorganizationscurrentgetop = __esm(() => {
|
|
|
62930
63237
|
|
|
62931
63238
|
// src/funcs/workspaceCurrent.ts
|
|
62932
63239
|
function workspaceCurrent(client$, request, options) {
|
|
62933
|
-
return new APIPromise($
|
|
63240
|
+
return new APIPromise($do47(client$, request, options));
|
|
62934
63241
|
}
|
|
62935
|
-
async function $
|
|
63242
|
+
async function $do47(client$, request, options) {
|
|
62936
63243
|
const parsed$ = safeParse4(request, (value$) => GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema.optional().parse(value$), "Input validation failed");
|
|
62937
63244
|
if (!parsed$.ok) {
|
|
62938
63245
|
return [parsed$, { status: "invalid" }];
|
|
@@ -63005,12 +63312,12 @@ var init_workspaceCurrent = __esm(() => {
|
|
|
63005
63312
|
});
|
|
63006
63313
|
|
|
63007
63314
|
// src/mcp-server/tools/workspaceCurrent.ts
|
|
63008
|
-
var
|
|
63315
|
+
var args47, tool$workspaceCurrent;
|
|
63009
63316
|
var init_workspaceCurrent2 = __esm(() => {
|
|
63010
63317
|
init_workspaceCurrent();
|
|
63011
63318
|
init_getcurrentworkspaceorganizationscurrentgetop();
|
|
63012
63319
|
init_tools();
|
|
63013
|
-
|
|
63320
|
+
args47 = {
|
|
63014
63321
|
request: GetCurrentWorkspaceOrganizationsCurrentGetRequest$zodSchema.optional()
|
|
63015
63322
|
};
|
|
63016
63323
|
tool$workspaceCurrent = {
|
|
@@ -63029,7 +63336,7 @@ last. Requires a Calibrate API key (CALIBRATE_API_KEY).
|
|
|
63029
63336
|
openWorldHint: true,
|
|
63030
63337
|
readOnlyHint: true
|
|
63031
63338
|
},
|
|
63032
|
-
args:
|
|
63339
|
+
args: args47,
|
|
63033
63340
|
tool: async (client, args, ctx) => {
|
|
63034
63341
|
const [result] = await workspaceCurrent(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
63035
63342
|
if (!result.ok) {
|
|
@@ -63047,7 +63354,7 @@ last. Requires a Calibrate API key (CALIBRATE_API_KEY).
|
|
|
63047
63354
|
function createMCPServer(deps) {
|
|
63048
63355
|
const server = new McpServer({
|
|
63049
63356
|
name: "CalibrateMcp",
|
|
63050
|
-
version: "0.0.
|
|
63357
|
+
version: "0.0.88"
|
|
63051
63358
|
});
|
|
63052
63359
|
const getClient = deps.getSDK || (() => new CalibrateMcpCore({
|
|
63053
63360
|
security: deps.security,
|
|
@@ -63112,6 +63419,7 @@ function createMCPServer(deps) {
|
|
|
63112
63419
|
tool(tool$annotatorsUpdate);
|
|
63113
63420
|
tool(tool$workspaceCurrent);
|
|
63114
63421
|
tool(tool$tracesCreate);
|
|
63422
|
+
tool(tool$tracesList);
|
|
63115
63423
|
if (deps.dynamic) {
|
|
63116
63424
|
registerDynamicTools(deps.logger, server, getClient, toolMap, scopes);
|
|
63117
63425
|
}
|
|
@@ -63167,6 +63475,7 @@ var init_server2 = __esm(() => {
|
|
|
63167
63475
|
init_testsList2();
|
|
63168
63476
|
init_testsUpdate2();
|
|
63169
63477
|
init_tracesCreate2();
|
|
63478
|
+
init_tracesList2();
|
|
63170
63479
|
init_workspaceCurrent2();
|
|
63171
63480
|
});
|
|
63172
63481
|
|
|
@@ -63464,6 +63773,17 @@ the conversation history as input, what the agent produced as output,
|
|
|
63464
63773
|
and optional metadata. Use this to capture live traffic for later
|
|
63465
63774
|
review and conversion into tests. Fails with 429 once the workspace
|
|
63466
63775
|
hits its trace limit.
|
|
63776
|
+
`
|
|
63777
|
+
},
|
|
63778
|
+
{
|
|
63779
|
+
name: "list-traces",
|
|
63780
|
+
description: `List the traces in the caller's org, newest first, one page at a
|
|
63781
|
+
time. Each trace carries a short preview of its last user message
|
|
63782
|
+
and reply, its tool calls and labels, and the scores from its
|
|
63783
|
+
latest scoring run with each evaluator's reasoning and evaluator
|
|
63784
|
+
version. Filter by agent, label, creation time, text, or score.
|
|
63785
|
+
Set include_content to also get each trace's full input, output
|
|
63786
|
+
and metadata.
|
|
63467
63787
|
`
|
|
63468
63788
|
}
|
|
63469
63789
|
];
|
|
@@ -64372,7 +64692,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
|
|
|
64372
64692
|
<h1>Instructions</h1>
|
|
64373
64693
|
<p>One-click installation for Claude Desktop users</p>
|
|
64374
64694
|
<div class="instruction-item">
|
|
64375
|
-
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.
|
|
64695
|
+
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.88/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
64376
64696
|
\uD83D\uDCE5 Download MCP Bundle
|
|
64377
64697
|
</a>
|
|
64378
64698
|
</div>
|
|
@@ -67326,7 +67646,7 @@ var routes = buildRouteMap({
|
|
|
67326
67646
|
var app = buildApplication(routes, {
|
|
67327
67647
|
name: "mcp",
|
|
67328
67648
|
versionInfo: {
|
|
67329
|
-
currentVersion: "0.0.
|
|
67649
|
+
currentVersion: "0.0.88"
|
|
67330
67650
|
}
|
|
67331
67651
|
});
|
|
67332
67652
|
run(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -67334,5 +67654,5 @@ export {
|
|
|
67334
67654
|
app
|
|
67335
67655
|
};
|
|
67336
67656
|
|
|
67337
|
-
//# debugId=
|
|
67657
|
+
//# debugId=39FFE1149BBB266D64756E2164756E21
|
|
67338
67658
|
//# sourceMappingURL=mcp-server.js.map
|