loopctl-mcp-server 2.28.0 → 2.29.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/index.js +41 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1151,6 +1151,18 @@ async function knowledgeAnalyticsTop({ limit, offset, since_days, access_type }
|
|
|
1151
1151
|
return toContent(result);
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
+
async function knowledgeRetrievalMetrics({ limit, offset } = {}) {
|
|
1155
|
+
const params = new URLSearchParams();
|
|
1156
|
+
if (limit != null) params.set("limit", String(limit));
|
|
1157
|
+
if (offset != null) params.set("offset", String(offset));
|
|
1158
|
+
const qs = params.toString();
|
|
1159
|
+
const path = qs
|
|
1160
|
+
? `/api/v1/knowledge/analytics/retrieval-metrics?${qs}`
|
|
1161
|
+
: "/api/v1/knowledge/analytics/retrieval-metrics";
|
|
1162
|
+
const result = await apiCall("GET", path, null, process.env.LOOPCTL_ORCH_KEY);
|
|
1163
|
+
return toContent(result);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1154
1166
|
async function knowledgeArticleStats({ article_id }) {
|
|
1155
1167
|
const result = await apiCall(
|
|
1156
1168
|
"GET",
|
|
@@ -3254,6 +3266,32 @@ const TOOLS = [
|
|
|
3254
3266
|
},
|
|
3255
3267
|
|
|
3256
3268
|
// Knowledge Analytics Tools (orchestrator key)
|
|
3269
|
+
{
|
|
3270
|
+
name: "knowledge_retrieval_metrics",
|
|
3271
|
+
description:
|
|
3272
|
+
"Return the daily retrieval-PRECISION time series (agents' KB #3): for each day, the " +
|
|
3273
|
+
"share of search results the agent then opened (search → get/context within a window). " +
|
|
3274
|
+
"A proxy for whether retrieval is improving — watch it trend up as the corpus is " +
|
|
3275
|
+
"de-duplicated, better navigated (MOCs), and conflict-resolved. Most recent day first. " +
|
|
3276
|
+
"Requires orchestrator role.",
|
|
3277
|
+
inputSchema: {
|
|
3278
|
+
type: "object",
|
|
3279
|
+
properties: {
|
|
3280
|
+
limit: {
|
|
3281
|
+
type: "integer",
|
|
3282
|
+
description: "Days per page (default 30, max 365). Clamped, never rejected.",
|
|
3283
|
+
minimum: 1,
|
|
3284
|
+
maximum: 365,
|
|
3285
|
+
},
|
|
3286
|
+
offset: {
|
|
3287
|
+
type: "integer",
|
|
3288
|
+
description: "Days to skip. Default 0.",
|
|
3289
|
+
minimum: 0,
|
|
3290
|
+
},
|
|
3291
|
+
},
|
|
3292
|
+
required: [],
|
|
3293
|
+
},
|
|
3294
|
+
},
|
|
3257
3295
|
{
|
|
3258
3296
|
name: "knowledge_analytics_top",
|
|
3259
3297
|
description:
|
|
@@ -3670,6 +3708,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
3670
3708
|
return await knowledgeIngestionJobs();
|
|
3671
3709
|
|
|
3672
3710
|
// Knowledge Analytics Tools
|
|
3711
|
+
case "knowledge_retrieval_metrics":
|
|
3712
|
+
return await knowledgeRetrievalMetrics(args);
|
|
3713
|
+
|
|
3673
3714
|
case "knowledge_analytics_top":
|
|
3674
3715
|
return await knowledgeAnalyticsTop(args);
|
|
3675
3716
|
|