consult-mcp 0.2.0 → 0.2.1
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/server.js +6 -3
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -28,6 +28,8 @@ const cwdSchema = z
|
|
|
28
28
|
.string()
|
|
29
29
|
.optional()
|
|
30
30
|
.describe("Directory the advisor can read. Defaults to the directory this server was started in");
|
|
31
|
+
// Advisors only read files; replies differ between calls and come from the advisor's model provider.
|
|
32
|
+
const ADVISOR_HINTS = { readOnlyHint: true, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
31
33
|
const errorMessage = (err) => (err instanceof Error ? err.message : String(err));
|
|
32
34
|
function structured(result) {
|
|
33
35
|
return {
|
|
@@ -66,7 +68,7 @@ export function createServer({ ask, listAgents, defaultCwd, progressIntervalMs =
|
|
|
66
68
|
session_id: z.string().optional().describe("session_id from an earlier reply, to ask a follow-up"),
|
|
67
69
|
cwd: cwdSchema,
|
|
68
70
|
},
|
|
69
|
-
annotations:
|
|
71
|
+
annotations: ADVISOR_HINTS,
|
|
70
72
|
}, async (args, extra) => {
|
|
71
73
|
try {
|
|
72
74
|
const work = ask({
|
|
@@ -93,7 +95,7 @@ export function createServer({ ask, listAgents, defaultCwd, progressIntervalMs =
|
|
|
93
95
|
effort: effortSchema,
|
|
94
96
|
cwd: cwdSchema,
|
|
95
97
|
},
|
|
96
|
-
annotations:
|
|
98
|
+
annotations: ADVISOR_HINTS,
|
|
97
99
|
}, async (args, extra) => {
|
|
98
100
|
const agents = [...new Set(args.agents)];
|
|
99
101
|
const pending = new Set(agents);
|
|
@@ -121,7 +123,8 @@ export function createServer({ ask, listAgents, defaultCwd, progressIntervalMs =
|
|
|
121
123
|
server.registerTool("list_agents", {
|
|
122
124
|
title: "List agents",
|
|
123
125
|
description: "Show which agent CLIs are installed on this machine, their versions and the models you can pass to ask_agent.",
|
|
124
|
-
|
|
126
|
+
inputSchema: {},
|
|
127
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
125
128
|
}, async () => {
|
|
126
129
|
const agents = await listAgents();
|
|
127
130
|
return { content: [{ type: "text", text: JSON.stringify(agents, null, 2) }], structuredContent: { agents } };
|
package/package.json
CHANGED