@theronap/agnoclast-mcp 0.9.288 → 0.9.289
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/lib/server.mjs +36 -0
- package/package.json +1 -1
package/lib/server.mjs
CHANGED
|
@@ -6200,6 +6200,42 @@ function renderNudge(payload) {
|
|
|
6200
6200
|
},
|
|
6201
6201
|
)
|
|
6202
6202
|
|
|
6203
|
+
server.registerTool(
|
|
6204
|
+
'setup_status',
|
|
6205
|
+
{
|
|
6206
|
+
title: 'Set up Agnoclast',
|
|
6207
|
+
description: 'Use when the person asks you to set up Agnoclast, or asks what is left to set up. It says which step is next and whether you do it or they do, through a link. Call it again after each step. Pass use_case and goals only to record what they told you, which changes nothing but their own first steps.',
|
|
6208
|
+
inputSchema: {
|
|
6209
|
+
use_case: z.string().optional().describe('what they want it for; the checklist lists the choices'),
|
|
6210
|
+
goals: z.array(z.string()).optional().describe('where to start; the checklist lists the choices'),
|
|
6211
|
+
ai_app: z.string().optional().describe('optional: the AI they use'),
|
|
6212
|
+
ai_where: z.string().optional().describe('optional: where they use it'),
|
|
6213
|
+
ai_reach: z.string().optional().describe('optional: how much they let it do'),
|
|
6214
|
+
together: z.string().optional().describe('optional: solo or team'),
|
|
6215
|
+
},
|
|
6216
|
+
},
|
|
6217
|
+
async ({ use_case, goals, ai_app, ai_where, ai_reach, together }) => {
|
|
6218
|
+
const saving = use_case !== undefined || goals !== undefined
|
|
6219
|
+
let res
|
|
6220
|
+
try {
|
|
6221
|
+
res = await fetchCortex(`${BASE}/api/setup-status`, saving
|
|
6222
|
+
? {
|
|
6223
|
+
method: 'POST',
|
|
6224
|
+
headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
|
|
6225
|
+
body: JSON.stringify({ useCase: use_case, goals, together, ai: { app: ai_app, where: ai_where, reach: ai_reach } }),
|
|
6226
|
+
}
|
|
6227
|
+
: { headers: { Authorization: `Bearer ${TOKEN}` } })
|
|
6228
|
+
} catch (e) {
|
|
6229
|
+
return toolError(`Could not read setup: ${e.message}`)
|
|
6230
|
+
}
|
|
6231
|
+
if (!res.ok) {
|
|
6232
|
+
const d = classify(res.status, res.headers.get('content-type'), await res.text(), res.headers.get('x-vercel-id'))
|
|
6233
|
+
return toolError(`Could not read setup: ${d.message}`)
|
|
6234
|
+
}
|
|
6235
|
+
return { content: [{ type: 'text', text: (await res.json()).text }] }
|
|
6236
|
+
},
|
|
6237
|
+
)
|
|
6238
|
+
|
|
6203
6239
|
server.registerTool(
|
|
6204
6240
|
'token_activity',
|
|
6205
6241
|
{
|
package/package.json
CHANGED