@2kw/ai-mcp-server 6.2.0-dev.30 → 6.2.0-dev.44

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.
@@ -291,6 +291,37 @@ export function register(server, client) {
291
291
  };
292
292
  }
293
293
  });
294
+ // ── get_agent_version_policy ────────────────────────────────────────────
295
+ server.tool("2kw_get_agent_version_policy", "What the policy gate would do to a call of each tool an agent version configures: the verdict (EXECUTE, RELAY, PAUSE_APPROVAL, JUDGE, BLOCK, FAIL), the composed action, the class and where it came from, and every policy statement behind it. Read-only — no run, no approval row, no judge call. Answers 'what happens if this agent calls that tool' without running the agent.", {
296
+ agentId: z.string().describe("The agent ID"),
297
+ versionId: z.string().describe("The agent version ID"),
298
+ tool: z
299
+ .string()
300
+ .optional()
301
+ .describe("Answer for this tool only; omit for every tool the version configures"),
302
+ installationId: z
303
+ .string()
304
+ .optional()
305
+ .describe("Resolve this installation's module tool catalog, the way a run of that installation would. Omit to answer for the agent's own tools only."),
306
+ }, async ({ agentId, versionId, tool, installationId }) => {
307
+ try {
308
+ const { data } = await client.GET("/v1/agents/{agentId}/versions/{versionId}/policy", {
309
+ params: {
310
+ path: { agentId, versionId },
311
+ query: { tool, installation: installationId },
312
+ },
313
+ });
314
+ return {
315
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
316
+ };
317
+ }
318
+ catch (error) {
319
+ return {
320
+ content: [{ type: "text", text: formatErrorForMcp(error) }],
321
+ isError: true,
322
+ };
323
+ }
324
+ });
294
325
  // ── deactivate_agent_version ────────────────────────────────────────────
295
326
  server.tool("2kw_deactivate_agent_version", "Soft-delete an agent version.", {
296
327
  agentId: z.string().describe("The agent ID"),
@@ -32,10 +32,27 @@ export function register(server, client) {
32
32
  scope: z.enum(["mine", "org"]).optional().describe("mine (default) or org"),
33
33
  page: z.number().int().min(0).optional().describe("Page number, starting at 0"),
34
34
  size: z.number().int().min(1).max(100).optional().describe("Page size, 1 to 100 (default 30)"),
35
- }, async ({ agentId, scope, page, size }) => {
35
+ status: z
36
+ .array(z.enum(["idle", "working", "paused", "failed"]))
37
+ .optional()
38
+ .describe("Only conversations in one of these states; paused means waiting on an approval or a client"),
39
+ activeAfter: z
40
+ .string()
41
+ .optional()
42
+ .describe("Only conversations active at or after this ISO-8601 date-time, e.g. 2026-09-19T08:00:00Z"),
43
+ }, async ({ agentId, scope, page, size, status, activeAfter }) => {
36
44
  try {
37
45
  const { data } = await client.GET("/v1/conversations", {
38
- params: { query: { agent_id: agentId, scope, page, size } },
46
+ params: {
47
+ query: {
48
+ agent_id: agentId,
49
+ scope,
50
+ page,
51
+ size,
52
+ status: status && status.length > 0 ? status.join(",") : undefined,
53
+ active_after: activeAfter,
54
+ },
55
+ },
39
56
  });
40
57
  return {
41
58
  content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
@@ -48,6 +65,21 @@ export function register(server, client) {
48
65
  };
49
66
  }
50
67
  });
68
+ // ── get_conversation_summary ─────────────────────────────────────────────
69
+ server.tool("2kw_get_conversation_summary", "Count the caller's own conversations by state: working, paused (waiting on an approval or a client) and failed in the past 24 hours. Cheaper than paging 2kw_list_conversations to count; use that tool with a status filter to see which conversations they are.", {}, async () => {
70
+ try {
71
+ const { data } = await client.GET("/v1/conversations/summary");
72
+ return {
73
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
74
+ };
75
+ }
76
+ catch (error) {
77
+ return {
78
+ content: [{ type: "text", text: formatErrorForMcp(error) }],
79
+ isError: true,
80
+ };
81
+ }
82
+ });
51
83
  server.tool("2kw_get_conversation", "Fetch a conversation by id.", { conversationId: z.string().describe("The conversation ID") }, async ({ conversationId }) => {
52
84
  try {
53
85
  const { data } = await client.GET("/v1/conversations/{conversationId}", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai-mcp-server",
3
- "version": "6.2.0-dev.30",
3
+ "version": "6.2.0-dev.44",
4
4
  "description": "MCP server for 2kw.ai — EU-hosted AI platform: OpenAI-compatible LLM gateway, schema-driven document extraction, transcription, agents with a knowledge base, and cost observability. 158 tools for Claude Code, Cursor, and Windsurf.",
5
5
  "mcpName": "ai.2kw/mcp-server",
6
6
  "keywords": [