@2kw/ai-mcp-server 6.2.0-dev.23 → 6.2.0-dev.42
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/tools/ai-gateway.js
CHANGED
|
@@ -12,7 +12,7 @@ export function agentModelReference(agent, agentModel) {
|
|
|
12
12
|
}
|
|
13
13
|
export function register(server, client) {
|
|
14
14
|
// ── chat ────────────────────────────────────────────────────────────────
|
|
15
|
-
server.tool("2kw_chat", "Send a chat completion request through Backbone's OpenAI-compatible AI gateway. Supports
|
|
15
|
+
server.tool("2kw_chat", "Send a chat completion request through Backbone's OpenAI-compatible AI gateway. Supports OpenAI, Azure OpenAI, Anthropic, xAI, Mistral and Ollama. Model format: 'provider/model' (e.g. 'openai/gpt-4o', 'anthropic/claude-sonnet-4-5-20250929'). Always non-streaming.", {
|
|
16
16
|
model: z.string().describe("Model identifier in 'provider/model' format"),
|
|
17
17
|
messages: z
|
|
18
18
|
.array(z.object({
|
|
@@ -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
|
-
|
|
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: {
|
|
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/dist/tools/providers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { formatErrorForMcp } from "../errors.js";
|
|
3
|
+
// The API enum also has VERTEX_AI, but the gateway cannot build a model for it yet (#118).
|
|
3
4
|
const ProviderType = z.enum([
|
|
4
5
|
"OPENAI",
|
|
5
6
|
"AZURE_OPENAI",
|
|
6
7
|
"ANTHROPIC",
|
|
7
8
|
"XAI",
|
|
8
9
|
"MISTRAL",
|
|
9
|
-
"VERTEX_AI",
|
|
10
10
|
"OLLAMA",
|
|
11
11
|
]);
|
|
12
12
|
export function register(server, client) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2kw/ai-mcp-server",
|
|
3
|
-
"version": "6.2.0-dev.
|
|
3
|
+
"version": "6.2.0-dev.42",
|
|
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": [
|