@inspectr/mcplab 1.28.3 → 1.28.5
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/dist/app/assets/index-Bxq-wlTN.css +1 -0
- package/dist/app/assets/index-j_NpCqyK.js +258 -0
- package/dist/app/index.html +2 -2
- package/dist/app-server/assistant-events.d.ts +28 -8
- package/dist/app-server/runs-store.d.ts +1 -0
- package/dist/app-server/runs-store.d.ts.map +1 -1
- package/dist/app-server/runs-store.js +1 -0
- package/dist/app-server/runs-store.js.map +1 -1
- package/dist/app-server/scenario-assistant-domain.d.ts +156 -130
- package/dist/app-server/tool-analysis-domain.d.ts +3 -0
- package/dist/app-server/tool-analysis-domain.d.ts.map +1 -1
- package/dist/app-server/tool-analysis-domain.js +14 -4
- package/dist/app-server/tool-analysis-domain.js.map +1 -1
- package/dist/app-server/tool-analysis-storage.d.ts +1 -0
- package/dist/app-server/tool-analysis-storage.d.ts.map +1 -1
- package/dist/app-server/tool-analysis-storage.js +20 -1
- package/dist/app-server/tool-analysis-storage.js.map +1 -1
- package/dist/app-server/tool-definition-improvement.d.ts +41 -0
- package/dist/app-server/tool-definition-improvement.d.ts.map +1 -0
- package/dist/app-server/tool-definition-improvement.js +78 -0
- package/dist/app-server/tool-definition-improvement.js.map +1 -0
- package/dist/app-server/tool-definition-quality.d.ts +96 -0
- package/dist/app-server/tool-definition-quality.d.ts.map +1 -0
- package/dist/app-server/tool-definition-quality.js +237 -0
- package/dist/app-server/tool-definition-quality.js.map +1 -0
- package/dist/app-server/types.d.ts +25 -25
- package/package.json +1 -1
- package/dist/app/assets/index-Bug5M-yX.js +0 -258
- package/dist/app/assets/index-CVe_v-Bh.css +0 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
export const DEFINITION_QUALITY_DIMENSIONS = {
|
|
3
|
+
purpose_clarity: 25,
|
|
4
|
+
usage_guidelines: 20,
|
|
5
|
+
behavioral_transparency: 20,
|
|
6
|
+
parameter_semantics: 15,
|
|
7
|
+
conciseness_structure: 10,
|
|
8
|
+
contextual_completeness: 10
|
|
9
|
+
};
|
|
10
|
+
function canonicalize(value, stack = new WeakSet()) {
|
|
11
|
+
if (value === null || typeof value !== 'object')
|
|
12
|
+
return value;
|
|
13
|
+
if (stack.has(value))
|
|
14
|
+
return '[Circular]';
|
|
15
|
+
stack.add(value);
|
|
16
|
+
if (Array.isArray(value))
|
|
17
|
+
return value.map((item) => canonicalize(item, stack));
|
|
18
|
+
const object = value;
|
|
19
|
+
return Object.fromEntries(Object.keys(object)
|
|
20
|
+
.sort()
|
|
21
|
+
.map((key) => [key, canonicalize(object[key], stack)]));
|
|
22
|
+
}
|
|
23
|
+
function schemaProperties(schema) {
|
|
24
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
25
|
+
return {};
|
|
26
|
+
const properties = schema.properties;
|
|
27
|
+
return properties && typeof properties === 'object' && !Array.isArray(properties)
|
|
28
|
+
? properties
|
|
29
|
+
: {};
|
|
30
|
+
}
|
|
31
|
+
function hasNestedObjectSchema(value, seen = new WeakSet(), depth = 0) {
|
|
32
|
+
if (!value || typeof value !== 'object')
|
|
33
|
+
return false;
|
|
34
|
+
if (seen.has(value))
|
|
35
|
+
return false;
|
|
36
|
+
seen.add(value);
|
|
37
|
+
if (Array.isArray(value))
|
|
38
|
+
return value.some((item) => hasNestedObjectSchema(item, seen, depth));
|
|
39
|
+
const object = value;
|
|
40
|
+
if (depth > 0 && object.type === 'object')
|
|
41
|
+
return true;
|
|
42
|
+
return Object.values(object).some((child) => hasNestedObjectSchema(child, seen, depth + 1));
|
|
43
|
+
}
|
|
44
|
+
export function buildDefinitionQualityContext(tool) {
|
|
45
|
+
const properties = schemaProperties(tool.inputSchema);
|
|
46
|
+
const propertyValues = Object.values(properties);
|
|
47
|
+
const paramCount = propertyValues.length;
|
|
48
|
+
const described = propertyValues.filter((value) => value &&
|
|
49
|
+
typeof value === 'object' &&
|
|
50
|
+
typeof value.description === 'string' &&
|
|
51
|
+
String(value.description).trim().length > 0).length;
|
|
52
|
+
const enums = propertyValues.filter((value) => value &&
|
|
53
|
+
typeof value === 'object' &&
|
|
54
|
+
Array.isArray(value.enum)).length;
|
|
55
|
+
const input = (tool.inputSchema ?? {});
|
|
56
|
+
const required = Array.isArray(input.required) ? input.required.length : 0;
|
|
57
|
+
const canonical = JSON.stringify(canonicalize({
|
|
58
|
+
name: tool.name,
|
|
59
|
+
title: tool.title ?? null,
|
|
60
|
+
description: tool.description ?? null,
|
|
61
|
+
inputSchema: tool.inputSchema ?? null,
|
|
62
|
+
outputSchema: tool.outputSchema ?? null,
|
|
63
|
+
annotations: tool.annotations ?? null
|
|
64
|
+
}));
|
|
65
|
+
return {
|
|
66
|
+
paramCount,
|
|
67
|
+
requiredParamCount: required,
|
|
68
|
+
paramsWithDescriptions: described,
|
|
69
|
+
paramsWithEnums: enums,
|
|
70
|
+
schemaDescriptionCoverage: paramCount === 0 ? 100 : Math.round((described / paramCount) * 100),
|
|
71
|
+
hasNestedObjects: hasNestedObjectSchema(tool.inputSchema),
|
|
72
|
+
hasOutputSchema: !!tool.outputSchema &&
|
|
73
|
+
typeof tool.outputSchema === 'object' &&
|
|
74
|
+
Object.keys(tool.outputSchema).length > 0,
|
|
75
|
+
hasAnnotations: !!tool.annotations &&
|
|
76
|
+
typeof tool.annotations === 'object' &&
|
|
77
|
+
Object.keys(tool.annotations).length > 0,
|
|
78
|
+
titleIsMeaningful: typeof tool.title === 'string' &&
|
|
79
|
+
tool.title.trim().length > tool.name.trim().length &&
|
|
80
|
+
tool.title.trim().toLowerCase() !== tool.name.trim().toLowerCase(),
|
|
81
|
+
definitionBytes: Buffer.byteLength(canonical, 'utf8'),
|
|
82
|
+
definitionHash: createHash('sha256').update(canonical).digest('hex').slice(0, 16)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function isRecord(value) {
|
|
86
|
+
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
87
|
+
}
|
|
88
|
+
export function parseDefinitionQualityEvaluation(value) {
|
|
89
|
+
const root = isRecord(value) && isRecord(value.definitionQuality) ? value.definitionQuality : value;
|
|
90
|
+
if (!isRecord(root)) {
|
|
91
|
+
throw new Error('Invalid definitionQuality evaluation');
|
|
92
|
+
}
|
|
93
|
+
const raw = root;
|
|
94
|
+
const scoreRoot = isRecord(raw.scores)
|
|
95
|
+
? raw.scores
|
|
96
|
+
: isRecord(raw.dimensionScores)
|
|
97
|
+
? raw.dimensionScores
|
|
98
|
+
: undefined;
|
|
99
|
+
const summary = typeof raw.summary === 'string'
|
|
100
|
+
? raw.summary
|
|
101
|
+
: typeof raw.overallSummary === 'string'
|
|
102
|
+
? raw.overallSummary
|
|
103
|
+
: '';
|
|
104
|
+
if (!scoreRoot || !summary.trim()) {
|
|
105
|
+
throw new Error('Invalid definitionQuality evaluation');
|
|
106
|
+
}
|
|
107
|
+
const scores = {};
|
|
108
|
+
for (const dimension of Object.keys(DEFINITION_QUALITY_DIMENSIONS)) {
|
|
109
|
+
const item = scoreRoot[dimension];
|
|
110
|
+
const rawScore = isRecord(item) ? item.score : undefined;
|
|
111
|
+
const score = typeof rawScore === 'string' && /^\d+$/.test(rawScore) ? Number(rawScore) : rawScore;
|
|
112
|
+
const justification = isRecord(item)
|
|
113
|
+
? typeof item.justification === 'string'
|
|
114
|
+
? item.justification
|
|
115
|
+
: item.evidence
|
|
116
|
+
: undefined;
|
|
117
|
+
if (!Number.isInteger(score) || score < 1 || score > 5) {
|
|
118
|
+
throw new Error('Definition quality score for ' + dimension + ' must be an integer between 1 and 5');
|
|
119
|
+
}
|
|
120
|
+
if (typeof justification !== 'string' || !justification.trim()) {
|
|
121
|
+
throw new Error('Definition quality justification for ' + dimension + ' is required');
|
|
122
|
+
}
|
|
123
|
+
scores[dimension] = {
|
|
124
|
+
score: score,
|
|
125
|
+
justification: justification.trim()
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
scores,
|
|
130
|
+
annotationContradiction: raw.annotationContradiction === true,
|
|
131
|
+
summary: summary.trim()
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export function computeDefinitionQualityTier(score) {
|
|
135
|
+
if (score >= 3.5)
|
|
136
|
+
return 'A';
|
|
137
|
+
if (score >= 3)
|
|
138
|
+
return 'B';
|
|
139
|
+
if (score >= 2)
|
|
140
|
+
return 'C';
|
|
141
|
+
if (score >= 1)
|
|
142
|
+
return 'D';
|
|
143
|
+
return 'F';
|
|
144
|
+
}
|
|
145
|
+
function roundScoreFromHundredths(numerator, denominator) {
|
|
146
|
+
return Math.floor((20 * numerator + denominator) / (2 * denominator)) / 10;
|
|
147
|
+
}
|
|
148
|
+
function roundScoreFromTenths(numerator, denominator) {
|
|
149
|
+
return Math.floor((2 * numerator + denominator) / (2 * denominator)) / 10;
|
|
150
|
+
}
|
|
151
|
+
export function finalizeDefinitionQuality(params) {
|
|
152
|
+
const context = buildDefinitionQualityContext(params.tool);
|
|
153
|
+
const parsed = parseDefinitionQualityEvaluation(isRecord(params.evaluation) && 'definitionQuality' in params.evaluation
|
|
154
|
+
? params.evaluation
|
|
155
|
+
: { definitionQuality: params.evaluation });
|
|
156
|
+
const missing = !params.tool.description?.trim();
|
|
157
|
+
const tautological = !missing &&
|
|
158
|
+
[params.tool.name, params.tool.title].some((value) => value?.trim().toLowerCase() === params.tool.description?.trim().toLowerCase());
|
|
159
|
+
const flags = [];
|
|
160
|
+
if (missing)
|
|
161
|
+
flags.push('no_description');
|
|
162
|
+
if (tautological)
|
|
163
|
+
flags.push('tautological_description');
|
|
164
|
+
if (parsed.annotationContradiction)
|
|
165
|
+
flags.push('annotation_contradiction');
|
|
166
|
+
const dimensions = {};
|
|
167
|
+
let weighted = 0;
|
|
168
|
+
for (const dimension of Object.keys(DEFINITION_QUALITY_DIMENSIONS)) {
|
|
169
|
+
const score = missing
|
|
170
|
+
? 1
|
|
171
|
+
: dimension === 'purpose_clarity' && tautological
|
|
172
|
+
? Math.min(parsed.scores[dimension].score, 2)
|
|
173
|
+
: parsed.scores[dimension].score;
|
|
174
|
+
weighted += score * DEFINITION_QUALITY_DIMENSIONS[dimension];
|
|
175
|
+
dimensions[dimension] = {
|
|
176
|
+
score: score,
|
|
177
|
+
weight: DEFINITION_QUALITY_DIMENSIONS[dimension],
|
|
178
|
+
justification: missing
|
|
179
|
+
? 'The tool has no usable description to evaluate.'
|
|
180
|
+
: parsed.scores[dimension].justification
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const overallScore = missing ? 1 : roundScoreFromHundredths(weighted, 100);
|
|
184
|
+
const smells = Object.keys(dimensions).filter((dimension) => dimensions[dimension].score < 3);
|
|
185
|
+
return {
|
|
186
|
+
methodology: 'mcplab-definition-quality',
|
|
187
|
+
methodologyVersion: '1.0',
|
|
188
|
+
methodologySource: 'https://github.com/glama-ai/tool-definition-quality-score',
|
|
189
|
+
scoredAt: params.now ?? new Date().toISOString(),
|
|
190
|
+
definitionHash: context.definitionHash,
|
|
191
|
+
overallScore,
|
|
192
|
+
tier: computeDefinitionQualityTier(overallScore),
|
|
193
|
+
passing: overallScore >= 3,
|
|
194
|
+
summary: missing
|
|
195
|
+
? 'This tool has no description, so an agent cannot reliably understand when to use it.'
|
|
196
|
+
: parsed.summary,
|
|
197
|
+
dimensions,
|
|
198
|
+
smells,
|
|
199
|
+
flags,
|
|
200
|
+
contextSignals: context
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
export function computeDefinitionQualityAggregate(items, toolsDiscovered) {
|
|
204
|
+
if (items.length === 0) {
|
|
205
|
+
return {
|
|
206
|
+
label: toolsDiscovered === 0 ? 'server' : 'selection',
|
|
207
|
+
score: 0,
|
|
208
|
+
tier: 'F',
|
|
209
|
+
toolsScored: 0,
|
|
210
|
+
toolsDiscovered,
|
|
211
|
+
toolsPassing: 0,
|
|
212
|
+
meanScore: 0,
|
|
213
|
+
minimumScore: 0
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const scoresTenths = items.map((item) => Math.round(item.quality.overallScore * 10));
|
|
217
|
+
const sumTenths = scoresTenths.reduce((sum, score) => sum + score, 0);
|
|
218
|
+
const minimumTenths = Math.min(...scoresTenths);
|
|
219
|
+
const score = roundScoreFromTenths(6 * sumTenths + 4 * items.length * minimumTenths, 10 * items.length);
|
|
220
|
+
const weakest = items[scoresTenths.indexOf(minimumTenths)];
|
|
221
|
+
const weakestDimension = Object.keys(DEFINITION_QUALITY_DIMENSIONS).sort((a, b) => (5 - weakest.quality.dimensions[b].score) * DEFINITION_QUALITY_DIMENSIONS[b] -
|
|
222
|
+
(5 - weakest.quality.dimensions[a].score) * DEFINITION_QUALITY_DIMENSIONS[a])[0];
|
|
223
|
+
return {
|
|
224
|
+
label: items.length === toolsDiscovered ? 'server' : 'selection',
|
|
225
|
+
score,
|
|
226
|
+
tier: computeDefinitionQualityTier(score),
|
|
227
|
+
toolsScored: items.length,
|
|
228
|
+
toolsDiscovered,
|
|
229
|
+
toolsPassing: items.filter((item) => item.quality.passing).length,
|
|
230
|
+
meanScore: roundScoreFromTenths(sumTenths, 10 * items.length),
|
|
231
|
+
minimumScore: minimumTenths / 10,
|
|
232
|
+
weakestTool: weakest.toolName,
|
|
233
|
+
weakestDimension,
|
|
234
|
+
bestNextAction: weakest.quality.dimensions[weakestDimension].justification
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=tool-definition-quality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definition-quality.js","sourceRoot":"","sources":["../../src/app-server/tool-definition-quality.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,uBAAuB,EAAE,EAAE;IAC3B,mBAAmB,EAAE,EAAE;IACvB,qB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AAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,6BAA6B,CAAC,CAAC,CAAC;QAC5E,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,6BAA6B,CAAC,CAAC,CAAC,CAC/E,CAAC,CAAC,CAAC,CAAC;IACL,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW;QAChE,KAAK;QACL,IAAI,EAAE,4BAA4B,CAAC,KAAK,CAAC;QACzC,WAAW,EAAE,KAAK,CAAC,MAAM;QACzB,eAAe;QACf,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM;QACjE,SAAS,EAAE,oBAAoB,CAAC,SAAS,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7D,YAAY,EAAE,aAAa,GAAG,EAAE;QAChC,WAAW,EAAE,OAAO,CAAC,QAAQ;QAC7B,gBAAgB;QAChB,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,aAAa;KAC3E,CAAC;AACJ,CAAC"}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import type { HealthMcpConnectionInfo } from '@inspectr/mcplab-core';
|
|
2
2
|
export type { HealthMcpConnectionInfo };
|
|
3
3
|
export interface AppServerOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
host: string;
|
|
5
|
+
port: number;
|
|
6
|
+
evalsDir: string;
|
|
7
|
+
runsDir: string;
|
|
8
|
+
toolAnalysisResultsDir: string;
|
|
9
|
+
librariesDir: string;
|
|
10
|
+
dev: boolean;
|
|
11
|
+
open: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface AppSettings {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
workspaceRoot: string;
|
|
15
|
+
evalsDir: string;
|
|
16
|
+
runsDir: string;
|
|
17
|
+
toolAnalysisResultsDir: string;
|
|
18
|
+
librariesDir: string;
|
|
19
|
+
defaultQueueWorkers: number;
|
|
20
|
+
scenarioAssistantAgentName?: string;
|
|
21
|
+
evaluationJudgeAgentName?: string;
|
|
22
22
|
}
|
|
23
23
|
export interface HealthResponse {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
ok: boolean;
|
|
25
|
+
version: string;
|
|
26
|
+
mcp: HealthMcpConnectionInfo;
|
|
27
27
|
}
|
|
28
28
|
export interface DevMcpServerRuntime {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
host: string;
|
|
30
|
+
port: number;
|
|
31
|
+
path: string;
|
|
32
|
+
targetBaseUrl: string;
|
|
33
|
+
stop: () => void;
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=types.d.ts.map
|
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inspectr/mcplab",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.5",
|
|
4
4
|
"description": "MCPLab - Test and evaluate MCP servers with LLMs — run evals, compare agents and launch the MCPLab web app",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://mcplab.inspectr.dev",
|