@ainyc/canonry 2.15.1 → 2.16.2
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/assets/agent-workspace/skills/aero/references/memory-patterns.md +9 -9
- package/assets/assets/index-CwZdqfeb.js +302 -0
- package/assets/assets/{index-DMx3Oy9W.css → index-Ec4au-rY.css} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-KANIG6ES.js → chunk-75EV36V6.js} +735 -781
- package/dist/{chunk-OX24LLIH.js → chunk-7DVIJC6L.js} +990 -5
- package/dist/cli.js +99 -2
- package/dist/index.js +2 -2
- package/dist/mcp.js +9 -796
- package/package.json +6 -6
- package/assets/assets/index-D0BgyJJT.js +0 -302
package/dist/mcp.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CliError,
|
|
3
|
-
|
|
4
|
-
createApiClient
|
|
5
|
-
|
|
6
|
-
keywordGenerateRequestSchema,
|
|
7
|
-
notificationCreateRequestSchema,
|
|
8
|
-
notificationEventSchema,
|
|
9
|
-
projectConfigSchema,
|
|
10
|
-
projectUpsertRequestSchema,
|
|
11
|
-
runTriggerRequestSchema,
|
|
12
|
-
scheduleUpsertRequestSchema
|
|
13
|
-
} from "./chunk-OX24LLIH.js";
|
|
3
|
+
canonryMcpTools,
|
|
4
|
+
createApiClient
|
|
5
|
+
} from "./chunk-7DVIJC6L.js";
|
|
14
6
|
import "./chunk-MLKGABMK.js";
|
|
15
7
|
|
|
16
8
|
// src/mcp/cli.ts
|
|
@@ -18,792 +10,13 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
18
10
|
|
|
19
11
|
// src/mcp/server.ts
|
|
20
12
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
21
|
-
import { z
|
|
13
|
+
import { z } from "zod";
|
|
22
14
|
|
|
23
15
|
// src/package-version.ts
|
|
24
16
|
import { createRequire } from "module";
|
|
25
17
|
var _require = createRequire(import.meta.url);
|
|
26
18
|
var PACKAGE_VERSION = _require("../package.json").version;
|
|
27
19
|
|
|
28
|
-
// src/mcp/tool-registry.ts
|
|
29
|
-
import { z as z2 } from "zod";
|
|
30
|
-
|
|
31
|
-
// src/mcp/schema.ts
|
|
32
|
-
import { z } from "zod";
|
|
33
|
-
var projectNameSchema = z.string().min(1).describe("Canonry project name.");
|
|
34
|
-
var runIdSchema = z.string().min(1).describe("Canonry run ID.");
|
|
35
|
-
var insightIdSchema = z.string().min(1).describe("Canonry insight ID.");
|
|
36
|
-
var analyticsWindowSchema = z.enum(["7d", "30d", "90d", "all"]).describe("Analytics time window.");
|
|
37
|
-
var emptyInputSchema = z.object({});
|
|
38
|
-
var projectInputSchema = z.object({
|
|
39
|
-
project: projectNameSchema
|
|
40
|
-
});
|
|
41
|
-
function toJsonSchema(schema, name) {
|
|
42
|
-
return {
|
|
43
|
-
...z.toJSONSchema(schema, { target: "draft-7" }),
|
|
44
|
-
title: name
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
function compactStringParams(values, keys) {
|
|
48
|
-
const params = {};
|
|
49
|
-
for (const key of keys) {
|
|
50
|
-
const value = values[key];
|
|
51
|
-
if (value === void 0 || value === null || value === "") continue;
|
|
52
|
-
params[key] = String(value);
|
|
53
|
-
}
|
|
54
|
-
return Object.keys(params).length ? params : void 0;
|
|
55
|
-
}
|
|
56
|
-
function uniqueStrings(values) {
|
|
57
|
-
const seen = /* @__PURE__ */ new Set();
|
|
58
|
-
const result = [];
|
|
59
|
-
for (const value of values) {
|
|
60
|
-
const trimmed = value.trim();
|
|
61
|
-
if (!trimmed || seen.has(trimmed)) continue;
|
|
62
|
-
seen.add(trimmed);
|
|
63
|
-
result.push(trimmed);
|
|
64
|
-
}
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// src/mcp/tool-registry.ts
|
|
69
|
-
var readAnnotations = (openWorldHint) => ({
|
|
70
|
-
readOnlyHint: true,
|
|
71
|
-
...openWorldHint ? { openWorldHint } : {}
|
|
72
|
-
});
|
|
73
|
-
var writeAnnotations = (opts) => ({
|
|
74
|
-
readOnlyHint: false,
|
|
75
|
-
idempotentHint: opts.idempotentHint,
|
|
76
|
-
destructiveHint: Boolean(opts.destructiveHint),
|
|
77
|
-
...opts.openWorldHint ? { openWorldHint: opts.openWorldHint } : {}
|
|
78
|
-
});
|
|
79
|
-
function defineTool(tool) {
|
|
80
|
-
return {
|
|
81
|
-
...tool,
|
|
82
|
-
inputJsonSchema: toJsonSchema(tool.inputSchema, tool.name)
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
var runTriggerInputSchema = z2.object({
|
|
86
|
-
project: projectNameSchema,
|
|
87
|
-
request: runTriggerRequestSchema.optional()
|
|
88
|
-
});
|
|
89
|
-
var runsListInputSchema = z2.object({
|
|
90
|
-
project: projectNameSchema,
|
|
91
|
-
limit: z2.number().int().positive().max(500).optional()
|
|
92
|
-
});
|
|
93
|
-
var runGetInputSchema = z2.object({
|
|
94
|
-
runId: runIdSchema
|
|
95
|
-
});
|
|
96
|
-
var timelineInputSchema = z2.object({
|
|
97
|
-
project: projectNameSchema,
|
|
98
|
-
location: z2.string().optional().describe("Location label. Use an empty string for locationless results.")
|
|
99
|
-
});
|
|
100
|
-
var snapshotsListInputSchema = z2.object({
|
|
101
|
-
project: projectNameSchema,
|
|
102
|
-
limit: z2.number().int().positive().max(500).optional(),
|
|
103
|
-
offset: z2.number().int().nonnegative().optional(),
|
|
104
|
-
location: z2.string().optional().describe("Location label. Use an empty string for locationless results.")
|
|
105
|
-
});
|
|
106
|
-
var snapshotsDiffInputSchema = z2.object({
|
|
107
|
-
project: projectNameSchema,
|
|
108
|
-
run1: runIdSchema,
|
|
109
|
-
run2: runIdSchema
|
|
110
|
-
});
|
|
111
|
-
var insightsListInputSchema = z2.object({
|
|
112
|
-
project: projectNameSchema,
|
|
113
|
-
dismissed: z2.boolean().optional(),
|
|
114
|
-
runId: runIdSchema.optional()
|
|
115
|
-
});
|
|
116
|
-
var insightInputSchema = z2.object({
|
|
117
|
-
project: projectNameSchema,
|
|
118
|
-
insightId: insightIdSchema
|
|
119
|
-
});
|
|
120
|
-
var healthHistoryInputSchema = z2.object({
|
|
121
|
-
project: projectNameSchema,
|
|
122
|
-
limit: z2.number().int().positive().max(100).optional()
|
|
123
|
-
});
|
|
124
|
-
var gscPerformanceInputSchema = z2.object({
|
|
125
|
-
project: projectNameSchema,
|
|
126
|
-
startDate: z2.string().optional(),
|
|
127
|
-
endDate: z2.string().optional(),
|
|
128
|
-
query: z2.string().optional(),
|
|
129
|
-
page: z2.string().optional(),
|
|
130
|
-
limit: z2.number().int().positive().max(500).optional(),
|
|
131
|
-
window: analyticsWindowSchema.optional()
|
|
132
|
-
});
|
|
133
|
-
var gscInspectionsInputSchema = z2.object({
|
|
134
|
-
project: projectNameSchema,
|
|
135
|
-
url: z2.string().optional(),
|
|
136
|
-
limit: z2.number().int().positive().max(500).optional()
|
|
137
|
-
});
|
|
138
|
-
var gscCoverageHistoryInputSchema = z2.object({
|
|
139
|
-
project: projectNameSchema,
|
|
140
|
-
limit: z2.number().int().positive().max(500).optional()
|
|
141
|
-
});
|
|
142
|
-
var gaWindowInputSchema = z2.object({
|
|
143
|
-
project: projectNameSchema,
|
|
144
|
-
window: analyticsWindowSchema.optional()
|
|
145
|
-
});
|
|
146
|
-
var gaTrafficInputSchema = gaWindowInputSchema.extend({
|
|
147
|
-
limit: z2.number().int().positive().max(500).optional()
|
|
148
|
-
});
|
|
149
|
-
var keywordsInputSchema = z2.object({
|
|
150
|
-
project: projectNameSchema,
|
|
151
|
-
request: keywordBatchRequestSchema
|
|
152
|
-
});
|
|
153
|
-
var keywordGenerateInputSchema = z2.object({
|
|
154
|
-
project: projectNameSchema,
|
|
155
|
-
request: keywordGenerateRequestSchema
|
|
156
|
-
});
|
|
157
|
-
var competitorsInputSchema = z2.object({
|
|
158
|
-
project: projectNameSchema,
|
|
159
|
-
request: competitorBatchRequestSchema
|
|
160
|
-
});
|
|
161
|
-
var projectUpsertInputSchema = z2.object({
|
|
162
|
-
project: projectNameSchema,
|
|
163
|
-
request: projectUpsertRequestSchema
|
|
164
|
-
});
|
|
165
|
-
var applyConfigInputSchema = z2.object({
|
|
166
|
-
config: projectConfigSchema
|
|
167
|
-
});
|
|
168
|
-
var scheduleSetInputSchema = z2.object({
|
|
169
|
-
project: projectNameSchema,
|
|
170
|
-
schedule: scheduleUpsertRequestSchema
|
|
171
|
-
});
|
|
172
|
-
var agentWebhookAttachInputSchema = z2.object({
|
|
173
|
-
project: projectNameSchema,
|
|
174
|
-
url: z2.string().url()
|
|
175
|
-
});
|
|
176
|
-
var doctorInputSchema = z2.object({
|
|
177
|
-
project: projectNameSchema.optional().describe("Project name to scope project-level checks. Omit to run global checks (provider keys, config, etc.)."),
|
|
178
|
-
checks: z2.array(z2.string().min(1)).optional().describe('Optional check IDs or wildcard prefixes (e.g. "google.auth.*", "config.providers"). Empty/omitted runs all matching checks for the chosen scope.')
|
|
179
|
-
});
|
|
180
|
-
var AGENT_WEBHOOK_EVENTS = [
|
|
181
|
-
notificationEventSchema.enum["run.completed"],
|
|
182
|
-
notificationEventSchema.enum["insight.critical"],
|
|
183
|
-
notificationEventSchema.enum["insight.high"],
|
|
184
|
-
notificationEventSchema.enum["citation.gained"]
|
|
185
|
-
];
|
|
186
|
-
var canonryMcpTools = [
|
|
187
|
-
defineTool({
|
|
188
|
-
name: "canonry_projects_list",
|
|
189
|
-
title: "List Canonry projects",
|
|
190
|
-
description: "List all Canonry projects available through the configured API.",
|
|
191
|
-
access: "read",
|
|
192
|
-
tier: "core",
|
|
193
|
-
inputSchema: emptyInputSchema,
|
|
194
|
-
annotations: readAnnotations(),
|
|
195
|
-
openApiOperations: ["GET /api/v1/projects"],
|
|
196
|
-
handler: (client) => client.listProjects()
|
|
197
|
-
}),
|
|
198
|
-
defineTool({
|
|
199
|
-
name: "canonry_project_get",
|
|
200
|
-
title: "Get project",
|
|
201
|
-
description: "Get a Canonry project by name.",
|
|
202
|
-
access: "read",
|
|
203
|
-
tier: "core",
|
|
204
|
-
inputSchema: projectInputSchema,
|
|
205
|
-
annotations: readAnnotations(),
|
|
206
|
-
openApiOperations: ["GET /api/v1/projects/{name}"],
|
|
207
|
-
handler: (client, input) => client.getProject(input.project)
|
|
208
|
-
}),
|
|
209
|
-
defineTool({
|
|
210
|
-
name: "canonry_project_overview",
|
|
211
|
-
title: "Get project overview (composite)",
|
|
212
|
-
description: 'One-call summary for "how is project X doing?" \u2014 bundles project info, latest run, top undismissed insights, latest health snapshot, keyword cited rate, per-provider breakdown, and gained/lost/emerging vs the previous run. Prefer this over fanning out to separate tools.',
|
|
213
|
-
access: "read",
|
|
214
|
-
tier: "core",
|
|
215
|
-
inputSchema: projectInputSchema,
|
|
216
|
-
annotations: readAnnotations(),
|
|
217
|
-
openApiOperations: ["GET /api/v1/projects/{name}/overview"],
|
|
218
|
-
handler: (client, input) => client.getProjectOverview(input.project)
|
|
219
|
-
}),
|
|
220
|
-
defineTool({
|
|
221
|
-
name: "canonry_search",
|
|
222
|
-
title: "Search project (composite)",
|
|
223
|
-
description: "Search query snapshots and intelligence insights for the given text. Looks at snapshot answer text, cited domains, raw provider responses, and insight title/keyword/recommendation/cause. Returns ranked hits with snippets \u2014 use it instead of paginating snapshots when you need to find a competitor mention or term.",
|
|
224
|
-
access: "read",
|
|
225
|
-
tier: "core",
|
|
226
|
-
inputSchema: z2.object({
|
|
227
|
-
project: projectNameSchema,
|
|
228
|
-
q: z2.string().min(2).describe("Search term, at least 2 characters."),
|
|
229
|
-
limit: z2.number().int().positive().max(50).optional().describe("Max combined hits (1-50, default 25).")
|
|
230
|
-
}),
|
|
231
|
-
annotations: readAnnotations(),
|
|
232
|
-
openApiOperations: ["GET /api/v1/projects/{name}/search"],
|
|
233
|
-
handler: (client, input) => client.searchProject(input.project, { q: input.q, limit: input.limit })
|
|
234
|
-
}),
|
|
235
|
-
defineTool({
|
|
236
|
-
name: "canonry_doctor",
|
|
237
|
-
title: "Run health checks",
|
|
238
|
-
description: 'Run canonry health checks. With `project`, runs project-scoped checks (Google/GA auth, redirect URI, scopes, property access). Without `project`, runs global checks (provider keys, etc.). Use `checks` to filter by exact ID or wildcard prefix (e.g. ["google.auth.*"]). Returns a structured DoctorReport with per-check status, code, summary, remediation, and details \u2014 use this to diagnose Google auth failures (401/403/redirect-mismatch/principal-mismatch) without parsing logs.',
|
|
239
|
-
access: "read",
|
|
240
|
-
tier: "core",
|
|
241
|
-
inputSchema: doctorInputSchema,
|
|
242
|
-
annotations: readAnnotations(true),
|
|
243
|
-
openApiOperations: ["GET /api/v1/doctor", "GET /api/v1/projects/{name}/doctor"],
|
|
244
|
-
handler: (client, input) => client.runDoctor({ project: input.project, checkIds: input.checks })
|
|
245
|
-
}),
|
|
246
|
-
defineTool({
|
|
247
|
-
name: "canonry_project_export",
|
|
248
|
-
title: "Export project config",
|
|
249
|
-
description: "Export a Canonry project in config-as-code format.",
|
|
250
|
-
access: "read",
|
|
251
|
-
tier: "setup",
|
|
252
|
-
inputSchema: projectInputSchema,
|
|
253
|
-
annotations: readAnnotations(),
|
|
254
|
-
openApiOperations: ["GET /api/v1/projects/{name}/export"],
|
|
255
|
-
handler: (client, input) => client.getExport(input.project)
|
|
256
|
-
}),
|
|
257
|
-
defineTool({
|
|
258
|
-
name: "canonry_project_history",
|
|
259
|
-
title: "Get project history",
|
|
260
|
-
description: "Get audit history for a Canonry project.",
|
|
261
|
-
access: "read",
|
|
262
|
-
tier: "monitoring",
|
|
263
|
-
inputSchema: projectInputSchema,
|
|
264
|
-
annotations: readAnnotations(),
|
|
265
|
-
openApiOperations: ["GET /api/v1/projects/{name}/history"],
|
|
266
|
-
handler: (client, input) => client.getHistory(input.project)
|
|
267
|
-
}),
|
|
268
|
-
defineTool({
|
|
269
|
-
name: "canonry_runs_list",
|
|
270
|
-
title: "List project runs",
|
|
271
|
-
description: "List runs for a Canonry project.",
|
|
272
|
-
access: "read",
|
|
273
|
-
tier: "monitoring",
|
|
274
|
-
inputSchema: runsListInputSchema,
|
|
275
|
-
annotations: readAnnotations(),
|
|
276
|
-
openApiOperations: ["GET /api/v1/projects/{name}/runs"],
|
|
277
|
-
handler: (client, input) => client.listRuns(input.project, input.limit)
|
|
278
|
-
}),
|
|
279
|
-
defineTool({
|
|
280
|
-
name: "canonry_runs_latest",
|
|
281
|
-
title: "Get latest project run",
|
|
282
|
-
description: "Get the latest run and total run count for a Canonry project.",
|
|
283
|
-
access: "read",
|
|
284
|
-
tier: "monitoring",
|
|
285
|
-
inputSchema: projectInputSchema,
|
|
286
|
-
annotations: readAnnotations(),
|
|
287
|
-
openApiOperations: ["GET /api/v1/projects/{name}/runs/latest"],
|
|
288
|
-
handler: (client, input) => client.getLatestRun(input.project)
|
|
289
|
-
}),
|
|
290
|
-
defineTool({
|
|
291
|
-
name: "canonry_run_get",
|
|
292
|
-
title: "Get run",
|
|
293
|
-
description: "Get a Canonry run with its snapshots.",
|
|
294
|
-
access: "read",
|
|
295
|
-
tier: "monitoring",
|
|
296
|
-
inputSchema: runGetInputSchema,
|
|
297
|
-
annotations: readAnnotations(),
|
|
298
|
-
openApiOperations: ["GET /api/v1/runs/{id}"],
|
|
299
|
-
handler: (client, input) => client.getRun(input.runId)
|
|
300
|
-
}),
|
|
301
|
-
defineTool({
|
|
302
|
-
name: "canonry_timeline_get",
|
|
303
|
-
title: "Get project timeline",
|
|
304
|
-
description: "Get per-keyword citation history for a Canonry project.",
|
|
305
|
-
access: "read",
|
|
306
|
-
tier: "monitoring",
|
|
307
|
-
inputSchema: timelineInputSchema,
|
|
308
|
-
annotations: readAnnotations(),
|
|
309
|
-
openApiOperations: ["GET /api/v1/projects/{name}/timeline"],
|
|
310
|
-
handler: (client, input) => client.getTimeline(input.project, input.location)
|
|
311
|
-
}),
|
|
312
|
-
defineTool({
|
|
313
|
-
name: "canonry_snapshots_list",
|
|
314
|
-
title: "List query snapshots",
|
|
315
|
-
description: "List paginated query snapshots for a Canonry project.",
|
|
316
|
-
access: "read",
|
|
317
|
-
tier: "monitoring",
|
|
318
|
-
inputSchema: snapshotsListInputSchema,
|
|
319
|
-
annotations: readAnnotations(),
|
|
320
|
-
openApiOperations: ["GET /api/v1/projects/{name}/snapshots"],
|
|
321
|
-
handler: (client, input) => client.getSnapshots(input.project, {
|
|
322
|
-
limit: input.limit,
|
|
323
|
-
offset: input.offset,
|
|
324
|
-
location: input.location
|
|
325
|
-
})
|
|
326
|
-
}),
|
|
327
|
-
defineTool({
|
|
328
|
-
name: "canonry_snapshots_diff",
|
|
329
|
-
title: "Diff snapshots",
|
|
330
|
-
description: "Compare query snapshot states between two Canonry runs.",
|
|
331
|
-
access: "read",
|
|
332
|
-
tier: "monitoring",
|
|
333
|
-
inputSchema: snapshotsDiffInputSchema,
|
|
334
|
-
annotations: readAnnotations(),
|
|
335
|
-
openApiOperations: ["GET /api/v1/projects/{name}/snapshots/diff"],
|
|
336
|
-
handler: (client, input) => client.getSnapshotDiff(input.project, input.run1, input.run2)
|
|
337
|
-
}),
|
|
338
|
-
defineTool({
|
|
339
|
-
name: "canonry_insights_list",
|
|
340
|
-
title: "List insights",
|
|
341
|
-
description: "List intelligence insights for a Canonry project.",
|
|
342
|
-
access: "read",
|
|
343
|
-
tier: "monitoring",
|
|
344
|
-
inputSchema: insightsListInputSchema,
|
|
345
|
-
annotations: readAnnotations(),
|
|
346
|
-
openApiOperations: ["GET /api/v1/projects/{name}/insights"],
|
|
347
|
-
handler: (client, input) => client.getInsights(input.project, { dismissed: input.dismissed, runId: input.runId })
|
|
348
|
-
}),
|
|
349
|
-
defineTool({
|
|
350
|
-
name: "canonry_insight_get",
|
|
351
|
-
title: "Get insight",
|
|
352
|
-
description: "Get one intelligence insight for a Canonry project.",
|
|
353
|
-
access: "read",
|
|
354
|
-
tier: "monitoring",
|
|
355
|
-
inputSchema: insightInputSchema,
|
|
356
|
-
annotations: readAnnotations(),
|
|
357
|
-
openApiOperations: ["GET /api/v1/projects/{name}/insights/{id}"],
|
|
358
|
-
handler: (client, input) => client.getInsight(input.project, input.insightId)
|
|
359
|
-
}),
|
|
360
|
-
defineTool({
|
|
361
|
-
name: "canonry_health_latest",
|
|
362
|
-
title: "Get latest health",
|
|
363
|
-
description: 'Get the latest health snapshot for a Canonry project. Always returns a snapshot once the project exists: real data carries `status: "ready"`; newly-created projects (or projects with only failed runs) carry `status: "no-data"` with `reason: "no-runs-yet"` and zeroed metrics.',
|
|
364
|
-
access: "read",
|
|
365
|
-
tier: "monitoring",
|
|
366
|
-
inputSchema: projectInputSchema,
|
|
367
|
-
annotations: readAnnotations(),
|
|
368
|
-
openApiOperations: ["GET /api/v1/projects/{name}/health/latest"],
|
|
369
|
-
handler: (client, input) => client.getHealth(input.project)
|
|
370
|
-
}),
|
|
371
|
-
defineTool({
|
|
372
|
-
name: "canonry_health_history",
|
|
373
|
-
title: "Get health history",
|
|
374
|
-
description: "Get health snapshot history for a Canonry project.",
|
|
375
|
-
access: "read",
|
|
376
|
-
tier: "monitoring",
|
|
377
|
-
inputSchema: healthHistoryInputSchema,
|
|
378
|
-
annotations: readAnnotations(),
|
|
379
|
-
openApiOperations: ["GET /api/v1/projects/{name}/health/history"],
|
|
380
|
-
handler: (client, input) => client.getHealthHistory(input.project, input.limit)
|
|
381
|
-
}),
|
|
382
|
-
defineTool({
|
|
383
|
-
name: "canonry_keywords_list",
|
|
384
|
-
title: "List keywords",
|
|
385
|
-
description: "List tracked keywords for a Canonry project.",
|
|
386
|
-
access: "read",
|
|
387
|
-
tier: "setup",
|
|
388
|
-
inputSchema: projectInputSchema,
|
|
389
|
-
annotations: readAnnotations(),
|
|
390
|
-
openApiOperations: ["GET /api/v1/projects/{name}/keywords"],
|
|
391
|
-
handler: (client, input) => client.listKeywords(input.project)
|
|
392
|
-
}),
|
|
393
|
-
defineTool({
|
|
394
|
-
name: "canonry_competitors_list",
|
|
395
|
-
title: "List competitors",
|
|
396
|
-
description: "List tracked competitors for a Canonry project.",
|
|
397
|
-
access: "read",
|
|
398
|
-
tier: "setup",
|
|
399
|
-
inputSchema: projectInputSchema,
|
|
400
|
-
annotations: readAnnotations(),
|
|
401
|
-
openApiOperations: ["GET /api/v1/projects/{name}/competitors"],
|
|
402
|
-
handler: (client, input) => client.listCompetitors(input.project)
|
|
403
|
-
}),
|
|
404
|
-
defineTool({
|
|
405
|
-
name: "canonry_schedule_get",
|
|
406
|
-
title: "Get schedule",
|
|
407
|
-
description: "Get the scheduled run configuration for a Canonry project.",
|
|
408
|
-
access: "read",
|
|
409
|
-
tier: "setup",
|
|
410
|
-
inputSchema: projectInputSchema,
|
|
411
|
-
annotations: readAnnotations(),
|
|
412
|
-
openApiOperations: ["GET /api/v1/projects/{name}/schedule"],
|
|
413
|
-
handler: (client, input) => client.getSchedule(input.project)
|
|
414
|
-
}),
|
|
415
|
-
defineTool({
|
|
416
|
-
name: "canonry_backlinks_latest_release",
|
|
417
|
-
title: "Discover latest Common Crawl release",
|
|
418
|
-
description: "Probes Common Crawl to find the latest published hyperlinkgraph release. Returns the release id and file URLs/sizes ready to feed into a backlinks sync (or null if no candidate slug responded).",
|
|
419
|
-
access: "read",
|
|
420
|
-
tier: "setup",
|
|
421
|
-
inputSchema: emptyInputSchema,
|
|
422
|
-
annotations: readAnnotations(true),
|
|
423
|
-
openApiOperations: ["GET /api/v1/backlinks/latest-release"],
|
|
424
|
-
handler: (client) => client.backlinksLatestRelease()
|
|
425
|
-
}),
|
|
426
|
-
defineTool({
|
|
427
|
-
name: "canonry_settings_get",
|
|
428
|
-
title: "Get settings",
|
|
429
|
-
description: "Get Canonry API settings and configured provider status.",
|
|
430
|
-
access: "read",
|
|
431
|
-
tier: "core",
|
|
432
|
-
inputSchema: emptyInputSchema,
|
|
433
|
-
annotations: readAnnotations(),
|
|
434
|
-
openApiOperations: ["GET /api/v1/settings"],
|
|
435
|
-
handler: (client) => client.getSettings()
|
|
436
|
-
}),
|
|
437
|
-
defineTool({
|
|
438
|
-
name: "canonry_google_connections_list",
|
|
439
|
-
title: "List Google connections",
|
|
440
|
-
description: "List configured Google connections for a Canonry project.",
|
|
441
|
-
access: "read",
|
|
442
|
-
tier: "gsc",
|
|
443
|
-
inputSchema: projectInputSchema,
|
|
444
|
-
annotations: readAnnotations(),
|
|
445
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/connections"],
|
|
446
|
-
handler: (client, input) => client.googleConnections(input.project)
|
|
447
|
-
}),
|
|
448
|
-
defineTool({
|
|
449
|
-
name: "canonry_gsc_performance",
|
|
450
|
-
title: "Get GSC performance",
|
|
451
|
-
description: "Get stored Google Search Console performance rows for a Canonry project.",
|
|
452
|
-
access: "read",
|
|
453
|
-
tier: "gsc",
|
|
454
|
-
inputSchema: gscPerformanceInputSchema,
|
|
455
|
-
annotations: readAnnotations(),
|
|
456
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/gsc/performance"],
|
|
457
|
-
handler: (client, input) => client.gscPerformance(input.project, compactStringParams(input, ["startDate", "endDate", "query", "page", "limit", "window"]))
|
|
458
|
-
}),
|
|
459
|
-
defineTool({
|
|
460
|
-
name: "canonry_gsc_inspections",
|
|
461
|
-
title: "List GSC inspections",
|
|
462
|
-
description: "List stored URL inspection rows for a Canonry project.",
|
|
463
|
-
access: "read",
|
|
464
|
-
tier: "gsc",
|
|
465
|
-
inputSchema: gscInspectionsInputSchema,
|
|
466
|
-
annotations: readAnnotations(),
|
|
467
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/gsc/inspections"],
|
|
468
|
-
handler: (client, input) => client.gscInspections(input.project, compactStringParams(input, ["url", "limit"]))
|
|
469
|
-
}),
|
|
470
|
-
defineTool({
|
|
471
|
-
name: "canonry_gsc_deindexed",
|
|
472
|
-
title: "List deindexed GSC URLs",
|
|
473
|
-
description: "List URLs that appear to have become deindexed in Google Search Console data.",
|
|
474
|
-
access: "read",
|
|
475
|
-
tier: "gsc",
|
|
476
|
-
inputSchema: projectInputSchema,
|
|
477
|
-
annotations: readAnnotations(),
|
|
478
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/gsc/deindexed"],
|
|
479
|
-
handler: (client, input) => client.gscDeindexed(input.project)
|
|
480
|
-
}),
|
|
481
|
-
defineTool({
|
|
482
|
-
name: "canonry_gsc_coverage",
|
|
483
|
-
title: "Get GSC coverage",
|
|
484
|
-
description: "Get Google Search Console coverage summary for a Canonry project.",
|
|
485
|
-
access: "read",
|
|
486
|
-
tier: "gsc",
|
|
487
|
-
inputSchema: projectInputSchema,
|
|
488
|
-
annotations: readAnnotations(),
|
|
489
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/gsc/coverage"],
|
|
490
|
-
handler: (client, input) => client.gscCoverage(input.project)
|
|
491
|
-
}),
|
|
492
|
-
defineTool({
|
|
493
|
-
name: "canonry_gsc_coverage_history",
|
|
494
|
-
title: "Get GSC coverage history",
|
|
495
|
-
description: "Get Google Search Console coverage history snapshots for a Canonry project.",
|
|
496
|
-
access: "read",
|
|
497
|
-
tier: "gsc",
|
|
498
|
-
inputSchema: gscCoverageHistoryInputSchema,
|
|
499
|
-
annotations: readAnnotations(),
|
|
500
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/gsc/coverage/history"],
|
|
501
|
-
handler: (client, input) => client.gscCoverageHistory(input.project, { limit: input.limit })
|
|
502
|
-
}),
|
|
503
|
-
defineTool({
|
|
504
|
-
name: "canonry_gsc_sitemaps",
|
|
505
|
-
title: "Get GSC sitemaps",
|
|
506
|
-
description: "Get sitemap data from Google Search Console for a Canonry project.",
|
|
507
|
-
access: "read",
|
|
508
|
-
tier: "gsc",
|
|
509
|
-
inputSchema: projectInputSchema,
|
|
510
|
-
annotations: readAnnotations(true),
|
|
511
|
-
openApiOperations: ["GET /api/v1/projects/{name}/google/gsc/sitemaps"],
|
|
512
|
-
handler: (client, input) => client.gscSitemaps(input.project)
|
|
513
|
-
}),
|
|
514
|
-
defineTool({
|
|
515
|
-
name: "canonry_ga_status",
|
|
516
|
-
title: "Get GA status",
|
|
517
|
-
description: "Get Google Analytics connection status for a Canonry project.",
|
|
518
|
-
access: "read",
|
|
519
|
-
tier: "ga",
|
|
520
|
-
inputSchema: projectInputSchema,
|
|
521
|
-
annotations: readAnnotations(),
|
|
522
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/status"],
|
|
523
|
-
handler: (client, input) => client.gaStatus(input.project)
|
|
524
|
-
}),
|
|
525
|
-
defineTool({
|
|
526
|
-
name: "canonry_ga_traffic",
|
|
527
|
-
title: "Get GA traffic",
|
|
528
|
-
description: "Get Google Analytics traffic summary for a Canonry project.",
|
|
529
|
-
access: "read",
|
|
530
|
-
tier: "ga",
|
|
531
|
-
inputSchema: gaTrafficInputSchema,
|
|
532
|
-
annotations: readAnnotations(),
|
|
533
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/traffic"],
|
|
534
|
-
handler: (client, input) => client.gaTraffic(input.project, compactStringParams(input, ["limit", "window"]))
|
|
535
|
-
}),
|
|
536
|
-
defineTool({
|
|
537
|
-
name: "canonry_ga_coverage",
|
|
538
|
-
title: "Get GA coverage",
|
|
539
|
-
description: "Get Google Analytics page coverage for a Canonry project.",
|
|
540
|
-
access: "read",
|
|
541
|
-
tier: "ga",
|
|
542
|
-
inputSchema: projectInputSchema,
|
|
543
|
-
annotations: readAnnotations(),
|
|
544
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/coverage"],
|
|
545
|
-
handler: (client, input) => client.gaCoverage(input.project)
|
|
546
|
-
}),
|
|
547
|
-
defineTool({
|
|
548
|
-
name: "canonry_ga_ai_referral_history",
|
|
549
|
-
title: "Get GA AI referral history",
|
|
550
|
-
description: "Get AI referral sessions per day grouped by source.",
|
|
551
|
-
access: "read",
|
|
552
|
-
tier: "ga",
|
|
553
|
-
inputSchema: gaWindowInputSchema,
|
|
554
|
-
annotations: readAnnotations(),
|
|
555
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/ai-referral-history"],
|
|
556
|
-
handler: (client, input) => client.gaAiReferralHistory(input.project, compactStringParams(input, ["window"]))
|
|
557
|
-
}),
|
|
558
|
-
defineTool({
|
|
559
|
-
name: "canonry_ga_social_referral_history",
|
|
560
|
-
title: "Get GA social referral history",
|
|
561
|
-
description: "Get social referral sessions per day grouped by source.",
|
|
562
|
-
access: "read",
|
|
563
|
-
tier: "ga",
|
|
564
|
-
inputSchema: gaWindowInputSchema,
|
|
565
|
-
annotations: readAnnotations(),
|
|
566
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/social-referral-history"],
|
|
567
|
-
handler: (client, input) => client.gaSocialReferralHistory(input.project, compactStringParams(input, ["window"]))
|
|
568
|
-
}),
|
|
569
|
-
defineTool({
|
|
570
|
-
name: "canonry_ga_social_referral_trend",
|
|
571
|
-
title: "Get GA social referral trend",
|
|
572
|
-
description: "Get social referral trend with biggest mover for a Canonry project.",
|
|
573
|
-
access: "read",
|
|
574
|
-
tier: "ga",
|
|
575
|
-
inputSchema: projectInputSchema,
|
|
576
|
-
annotations: readAnnotations(),
|
|
577
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/social-referral-trend"],
|
|
578
|
-
handler: (client, input) => client.gaSocialReferralTrend(input.project)
|
|
579
|
-
}),
|
|
580
|
-
defineTool({
|
|
581
|
-
name: "canonry_ga_attribution_trend",
|
|
582
|
-
title: "Get GA attribution trend",
|
|
583
|
-
description: "Get per-channel attribution trends for organic, AI, social, direct, and total sessions.",
|
|
584
|
-
access: "read",
|
|
585
|
-
tier: "ga",
|
|
586
|
-
inputSchema: projectInputSchema,
|
|
587
|
-
annotations: readAnnotations(),
|
|
588
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/attribution-trend"],
|
|
589
|
-
handler: (client, input) => client.gaAttributionTrend(input.project)
|
|
590
|
-
}),
|
|
591
|
-
defineTool({
|
|
592
|
-
name: "canonry_ga_session_history",
|
|
593
|
-
title: "Get GA session history",
|
|
594
|
-
description: "Get total sessions per day for a Canonry project.",
|
|
595
|
-
access: "read",
|
|
596
|
-
tier: "ga",
|
|
597
|
-
inputSchema: gaWindowInputSchema,
|
|
598
|
-
annotations: readAnnotations(),
|
|
599
|
-
openApiOperations: ["GET /api/v1/projects/{name}/ga/session-history"],
|
|
600
|
-
handler: (client, input) => client.gaSessionHistory(input.project, compactStringParams(input, ["window"]))
|
|
601
|
-
}),
|
|
602
|
-
defineTool({
|
|
603
|
-
name: "canonry_project_upsert",
|
|
604
|
-
title: "Create or replace project",
|
|
605
|
-
description: "Create or replace a Canonry project. PUT semantics \u2014 fields not in the request are reset to their defaults. Provide the full intended project shape.",
|
|
606
|
-
access: "write",
|
|
607
|
-
tier: "setup",
|
|
608
|
-
inputSchema: projectUpsertInputSchema,
|
|
609
|
-
annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
|
|
610
|
-
openApiOperations: ["PUT /api/v1/projects/{name}"],
|
|
611
|
-
handler: (client, input) => client.putProject(input.project, input.request)
|
|
612
|
-
}),
|
|
613
|
-
defineTool({
|
|
614
|
-
name: "canonry_apply_config",
|
|
615
|
-
title: "Apply project config",
|
|
616
|
-
description: "Apply one Canonry config-as-code project document. Replaces the project to match the config \u2014 fields omitted from the spec are reset to defaults. For multi-document YAML, call this tool once per project document.",
|
|
617
|
-
access: "write",
|
|
618
|
-
tier: "core",
|
|
619
|
-
inputSchema: applyConfigInputSchema,
|
|
620
|
-
// Declarative apply is safe to repeat, but it replaces configured child state.
|
|
621
|
-
annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
|
|
622
|
-
openApiOperations: ["POST /api/v1/apply"],
|
|
623
|
-
handler: (client, input) => client.apply(input.config)
|
|
624
|
-
}),
|
|
625
|
-
defineTool({
|
|
626
|
-
name: "canonry_keywords_generate",
|
|
627
|
-
title: "Generate keyword suggestions",
|
|
628
|
-
description: "Generate candidate key phrases using a configured provider. Returns suggestions only; use canonry_keywords_add to persist them.",
|
|
629
|
-
access: "write",
|
|
630
|
-
tier: "setup",
|
|
631
|
-
inputSchema: keywordGenerateInputSchema,
|
|
632
|
-
annotations: writeAnnotations({ idempotentHint: false, openWorldHint: true }),
|
|
633
|
-
openApiOperations: ["POST /api/v1/projects/{name}/keywords/generate"],
|
|
634
|
-
handler: (client, input) => client.generateKeywords(input.project, input.request.provider, input.request.count)
|
|
635
|
-
}),
|
|
636
|
-
defineTool({
|
|
637
|
-
name: "canonry_keywords_replace",
|
|
638
|
-
title: "Replace keywords",
|
|
639
|
-
description: "Replace the tracked keyword set for a Canonry project.",
|
|
640
|
-
access: "write",
|
|
641
|
-
tier: "setup",
|
|
642
|
-
inputSchema: keywordsInputSchema,
|
|
643
|
-
annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
|
|
644
|
-
openApiOperations: ["PUT /api/v1/projects/{name}/keywords"],
|
|
645
|
-
handler: async (client, input) => {
|
|
646
|
-
await client.putKeywords(input.project, uniqueStrings(input.request.keywords));
|
|
647
|
-
}
|
|
648
|
-
}),
|
|
649
|
-
defineTool({
|
|
650
|
-
name: "canonry_run_trigger",
|
|
651
|
-
title: "Trigger run",
|
|
652
|
-
description: "Trigger an answer-visibility run for a Canonry project.",
|
|
653
|
-
access: "write",
|
|
654
|
-
tier: "core",
|
|
655
|
-
inputSchema: runTriggerInputSchema,
|
|
656
|
-
annotations: writeAnnotations({ idempotentHint: false, openWorldHint: true }),
|
|
657
|
-
openApiOperations: ["POST /api/v1/projects/{name}/runs"],
|
|
658
|
-
handler: (client, input) => client.triggerRun(input.project, input.request)
|
|
659
|
-
}),
|
|
660
|
-
defineTool({
|
|
661
|
-
name: "canonry_run_cancel",
|
|
662
|
-
title: "Cancel run",
|
|
663
|
-
description: "Cancel a queued or running Canonry run.",
|
|
664
|
-
access: "write",
|
|
665
|
-
tier: "core",
|
|
666
|
-
inputSchema: runGetInputSchema,
|
|
667
|
-
annotations: writeAnnotations({ idempotentHint: false, destructiveHint: true }),
|
|
668
|
-
openApiOperations: ["POST /api/v1/runs/{id}/cancel"],
|
|
669
|
-
handler: (client, input) => client.cancelRun(input.runId)
|
|
670
|
-
}),
|
|
671
|
-
defineTool({
|
|
672
|
-
name: "canonry_keywords_add",
|
|
673
|
-
title: "Add keywords",
|
|
674
|
-
description: "Append tracked keywords to a Canonry project; existing keywords are skipped by the API.",
|
|
675
|
-
access: "write",
|
|
676
|
-
tier: "setup",
|
|
677
|
-
inputSchema: keywordsInputSchema,
|
|
678
|
-
annotations: writeAnnotations({ idempotentHint: true }),
|
|
679
|
-
openApiOperations: ["POST /api/v1/projects/{name}/keywords"],
|
|
680
|
-
handler: async (client, input) => {
|
|
681
|
-
await client.appendKeywords(input.project, uniqueStrings(input.request.keywords));
|
|
682
|
-
}
|
|
683
|
-
}),
|
|
684
|
-
defineTool({
|
|
685
|
-
name: "canonry_keywords_remove",
|
|
686
|
-
title: "Remove keywords",
|
|
687
|
-
description: "Remove tracked keywords from a Canonry project.",
|
|
688
|
-
access: "write",
|
|
689
|
-
tier: "setup",
|
|
690
|
-
inputSchema: keywordsInputSchema,
|
|
691
|
-
annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
|
|
692
|
-
openApiOperations: ["DELETE /api/v1/projects/{name}/keywords"],
|
|
693
|
-
handler: async (client, input) => {
|
|
694
|
-
await client.deleteKeywords(input.project, uniqueStrings(input.request.keywords));
|
|
695
|
-
}
|
|
696
|
-
}),
|
|
697
|
-
defineTool({
|
|
698
|
-
name: "canonry_competitors_add",
|
|
699
|
-
title: "Add competitors",
|
|
700
|
-
description: "Add tracked competitor domains to a Canonry project.",
|
|
701
|
-
access: "write",
|
|
702
|
-
tier: "setup",
|
|
703
|
-
inputSchema: competitorsInputSchema,
|
|
704
|
-
annotations: writeAnnotations({ idempotentHint: true }),
|
|
705
|
-
openApiOperations: ["POST /api/v1/projects/{name}/competitors"],
|
|
706
|
-
handler: async (client, input) => {
|
|
707
|
-
await client.appendCompetitors(input.project, uniqueStrings(input.request.competitors));
|
|
708
|
-
}
|
|
709
|
-
}),
|
|
710
|
-
defineTool({
|
|
711
|
-
name: "canonry_competitors_remove",
|
|
712
|
-
title: "Remove competitors",
|
|
713
|
-
description: "Remove tracked competitor domains from a Canonry project.",
|
|
714
|
-
access: "write",
|
|
715
|
-
tier: "setup",
|
|
716
|
-
inputSchema: competitorsInputSchema,
|
|
717
|
-
annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
|
|
718
|
-
openApiOperations: ["DELETE /api/v1/projects/{name}/competitors"],
|
|
719
|
-
handler: async (client, input) => {
|
|
720
|
-
await client.deleteCompetitors(input.project, uniqueStrings(input.request.competitors));
|
|
721
|
-
}
|
|
722
|
-
}),
|
|
723
|
-
defineTool({
|
|
724
|
-
name: "canonry_schedule_set",
|
|
725
|
-
title: "Set schedule",
|
|
726
|
-
description: "Create or replace the scheduled run configuration for a Canonry project.",
|
|
727
|
-
access: "write",
|
|
728
|
-
tier: "setup",
|
|
729
|
-
inputSchema: scheduleSetInputSchema,
|
|
730
|
-
annotations: writeAnnotations({ idempotentHint: true }),
|
|
731
|
-
openApiOperations: ["PUT /api/v1/projects/{name}/schedule"],
|
|
732
|
-
handler: (client, input) => client.putSchedule(input.project, input.schedule)
|
|
733
|
-
}),
|
|
734
|
-
defineTool({
|
|
735
|
-
name: "canonry_schedule_delete",
|
|
736
|
-
title: "Delete schedule",
|
|
737
|
-
description: "Delete the scheduled run configuration for a Canonry project.",
|
|
738
|
-
access: "write",
|
|
739
|
-
tier: "setup",
|
|
740
|
-
inputSchema: projectInputSchema,
|
|
741
|
-
annotations: writeAnnotations({ idempotentHint: false, destructiveHint: true }),
|
|
742
|
-
openApiOperations: ["DELETE /api/v1/projects/{name}/schedule"],
|
|
743
|
-
handler: async (client, input) => {
|
|
744
|
-
await client.deleteSchedule(input.project);
|
|
745
|
-
}
|
|
746
|
-
}),
|
|
747
|
-
defineTool({
|
|
748
|
-
name: "canonry_insight_dismiss",
|
|
749
|
-
title: "Dismiss insight",
|
|
750
|
-
description: "Dismiss an intelligence insight for a Canonry project.",
|
|
751
|
-
access: "write",
|
|
752
|
-
tier: "setup",
|
|
753
|
-
inputSchema: insightInputSchema,
|
|
754
|
-
annotations: writeAnnotations({ idempotentHint: true }),
|
|
755
|
-
openApiOperations: ["POST /api/v1/projects/{name}/insights/{id}/dismiss"],
|
|
756
|
-
handler: (client, input) => client.dismissInsight(input.project, input.insightId)
|
|
757
|
-
}),
|
|
758
|
-
defineTool({
|
|
759
|
-
name: "canonry_agent_webhook_attach",
|
|
760
|
-
title: "Attach agent webhook",
|
|
761
|
-
description: "Attach an external agent webhook to project run and insight events.",
|
|
762
|
-
access: "write",
|
|
763
|
-
tier: "core",
|
|
764
|
-
inputSchema: agentWebhookAttachInputSchema,
|
|
765
|
-
annotations: writeAnnotations({ idempotentHint: true }),
|
|
766
|
-
openApiOperations: ["GET /api/v1/projects/{name}/notifications", "POST /api/v1/projects/{name}/notifications"],
|
|
767
|
-
handler: async (client, input) => {
|
|
768
|
-
const existing = await client.listNotifications(input.project);
|
|
769
|
-
const agentNotification = existing.find((notification2) => notification2.source === "agent");
|
|
770
|
-
if (agentNotification) {
|
|
771
|
-
return { status: "already-attached", project: input.project, notificationId: agentNotification.id };
|
|
772
|
-
}
|
|
773
|
-
const request = notificationCreateRequestSchema.parse({
|
|
774
|
-
channel: "webhook",
|
|
775
|
-
url: input.url,
|
|
776
|
-
events: AGENT_WEBHOOK_EVENTS,
|
|
777
|
-
source: "agent"
|
|
778
|
-
});
|
|
779
|
-
const notification = await client.createNotification(input.project, request);
|
|
780
|
-
return { status: "attached", project: input.project, notificationId: notification.id };
|
|
781
|
-
}
|
|
782
|
-
}),
|
|
783
|
-
defineTool({
|
|
784
|
-
name: "canonry_agent_webhook_detach",
|
|
785
|
-
title: "Detach agent webhook",
|
|
786
|
-
description: "Detach the external agent webhook for a Canonry project.",
|
|
787
|
-
access: "write",
|
|
788
|
-
tier: "agent",
|
|
789
|
-
inputSchema: projectInputSchema,
|
|
790
|
-
annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
|
|
791
|
-
openApiOperations: ["GET /api/v1/projects/{name}/notifications", "DELETE /api/v1/projects/{name}/notifications/{id}"],
|
|
792
|
-
handler: async (client, input) => {
|
|
793
|
-
const existing = await client.listNotifications(input.project);
|
|
794
|
-
const agentNotification = existing.find((notification) => notification.source === "agent");
|
|
795
|
-
if (!agentNotification) {
|
|
796
|
-
return { status: "not-attached", project: input.project };
|
|
797
|
-
}
|
|
798
|
-
await client.deleteNotification(input.project, agentNotification.id);
|
|
799
|
-
return { status: "detached", project: input.project };
|
|
800
|
-
}
|
|
801
|
-
})
|
|
802
|
-
];
|
|
803
|
-
var CANONRY_MCP_TOOL_COUNT = canonryMcpTools.length;
|
|
804
|
-
var CANONRY_MCP_READ_TOOL_COUNT = canonryMcpTools.filter((tool) => tool.access === "read").length;
|
|
805
|
-
var CANONRY_MCP_CORE_TOOL_COUNT = canonryMcpTools.filter((tool) => tool.tier === "core").length;
|
|
806
|
-
|
|
807
20
|
// src/mcp/results.ts
|
|
808
21
|
import { ZodError } from "zod";
|
|
809
22
|
function jsonToolResult(value) {
|
|
@@ -922,9 +135,9 @@ var CANONRY_MCP_TOOLKITS = [
|
|
|
922
135
|
},
|
|
923
136
|
{
|
|
924
137
|
name: "agent",
|
|
925
|
-
title: "
|
|
926
|
-
description: "
|
|
927
|
-
whenToLoad: "Load when
|
|
138
|
+
title: "Aero agent lifecycle and memory",
|
|
139
|
+
description: "Manage the built-in Aero agent: durable project-scoped memory (list/set/forget), clear the rolling transcript, and detach the external-agent webhook.",
|
|
140
|
+
whenToLoad: "Load when reading or writing project-scoped Aero notes, clearing a stuck conversation, or removing an external agent webhook."
|
|
928
141
|
}
|
|
929
142
|
];
|
|
930
143
|
function isCanonryMcpToolkitName(value) {
|
|
@@ -1063,8 +276,8 @@ function createCanonryMcpServerWithCatalog(options = {}) {
|
|
|
1063
276
|
registerMetaTools(server, catalog);
|
|
1064
277
|
return { server, catalog };
|
|
1065
278
|
}
|
|
1066
|
-
var loadToolkitInputSchema =
|
|
1067
|
-
name:
|
|
279
|
+
var loadToolkitInputSchema = z.object({
|
|
280
|
+
name: z.enum(CANONRY_MCP_TOOLKIT_NAMES).describe("Toolkit name. List options with canonry_help.")
|
|
1068
281
|
});
|
|
1069
282
|
function registerMetaTools(server, catalog) {
|
|
1070
283
|
server.registerTool(
|