@2kw/ai-mcp-server 8.3.1 → 8.4.0-dev.15

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.
@@ -245,7 +245,7 @@ export function register(server, client) {
245
245
  }
246
246
  });
247
247
  // ── list_models ─────────────────────────────────────────────────────────
248
- server.tool("2kw_list_models", "List available AI models and providers accessible through the Backbone AI gateway.", {}, async () => {
248
+ server.tool("2kw_list_models", "List available AI models and providers accessible through the 2kw.ai gateway.", {}, async () => {
249
249
  try {
250
250
  const { data } = await client.GET("/v1/models");
251
251
  const result = data;
@@ -191,10 +191,14 @@ export function register(server, client) {
191
191
  }
192
192
  });
193
193
  // ── list_conversation_items ──────────────────────────────────────────────
194
- server.tool("2kw_list_conversation_items", "Fetch a conversation's items in replay order, oldest first. A connector's question to the user and the user's answer are listed without their text: the user reads and answers them in chat.", { conversationId: z.string().describe("The conversation ID") }, async ({ conversationId }) => {
194
+ server.tool("2kw_list_conversation_items", "Fetch a conversation's items in replay order, oldest first, one page of responses at a time: while has_more is true, call again with after set to the response_id of the last item that has one (a batch summary entry has none). A connector's question to the user and the user's answer are listed without their text: the user reads and answers them in chat.", {
195
+ conversationId: z.string().describe("The conversation ID"),
196
+ after: z.string().optional().describe("The response_id of the last item already listed; omit for the first page"),
197
+ limit: z.number().int().min(1).max(100).optional().describe("Most responses per page (default 20)"),
198
+ }, async ({ conversationId, after, limit }) => {
195
199
  try {
196
200
  const { data } = await client.GET("/v1/conversations/{conversationId}/items", {
197
- params: { path: { conversationId } },
201
+ params: { path: { conversationId }, query: { after, limit } },
198
202
  });
199
203
  return {
200
204
  content: [{ type: "text", text: JSON.stringify(withoutInputContent(data), null, 2) }],
@@ -103,7 +103,8 @@ export function register(server, client) {
103
103
  content: [
104
104
  {
105
105
  type: "text",
106
- text: `Traces (${result.totalElements ?? 0} total, page ${(result.number ?? 0) + 1}/${result.totalPages ?? 1}):\n${lines.join("\n") || "(none)"}`,
106
+ // The list counts nothing (#1923): totalPages only says whether a next page exists.
107
+ text: `Traces (page ${(result.number ?? 0) + 1}${(result.number ?? 0) + 1 < (result.totalPages ?? 1) ? ", more on the next page" : ""}):\n${lines.join("\n") || "(none)"}`,
107
108
  },
108
109
  ],
109
110
  };
@@ -171,7 +172,7 @@ export function register(server, client) {
171
172
  content: [
172
173
  {
173
174
  type: "text",
174
- text: `Sessions (${result.totalElements ?? 0} total, page ${(result.number ?? 0) + 1}/${result.totalPages ?? 1}):\n${lines.join("\n") || "(none)"}`,
175
+ text: `Sessions (page ${(result.number ?? 0) + 1}${(result.number ?? 0) + 1 < (result.totalPages ?? 1) ? ", more on the next page" : ""}):\n${lines.join("\n") || "(none)"}`,
175
176
  },
176
177
  ],
177
178
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai-mcp-server",
3
- "version": "8.3.1",
3
+ "version": "8.4.0-dev.15",
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. 199 tools for Claude Code, Cursor, and Windsurf.",
5
5
  "mcpName": "ai.2kw/mcp-server",
6
6
  "keywords": [