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

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.
@@ -69,6 +69,36 @@ export function register(server, client) {
69
69
  };
70
70
  }
71
71
  });
72
+ // ── list_agent_catalog ──────────────────────────────────────────────────
73
+ server.tool("2kw_list_agent_catalog", "List published agents as id, name and description. This is the read a chat-only USER "
74
+ + "key may perform; 2kw_list_agents carries the operator configuration and needs VIEWER or above.", {
75
+ search: z.string().optional().describe("Filter agents by name"),
76
+ page: z.number().optional().default(0).describe("Page number (0-based)"),
77
+ size: z.number().optional().default(20).describe("Page size"),
78
+ }, async ({ search, page, size }) => {
79
+ try {
80
+ // No sort parameter: the catalog is always name-ascending (#814).
81
+ const { data } = await client.GET("/v1/agents/catalog", {
82
+ params: { query: { search, pageable: { page, size } } },
83
+ });
84
+ const result = data;
85
+ const lines = (result.content ?? []).map((a) => `- ${a.name} (id: ${a.id})${a.description ? ` — ${a.description}` : ""}`);
86
+ return {
87
+ content: [
88
+ {
89
+ type: "text",
90
+ text: `Published agents (${result.totalElements} total, page ${(result.number ?? 0) + 1}/${result.totalPages}):\n${lines.join("\n") || "(none)"}`,
91
+ },
92
+ ],
93
+ };
94
+ }
95
+ catch (error) {
96
+ return {
97
+ content: [{ type: "text", text: formatErrorForMcp(error) }],
98
+ isError: true,
99
+ };
100
+ }
101
+ });
72
102
  // ── get_agent ───────────────────────────────────────────────────────────
73
103
  server.tool("2kw_get_agent", "Get an agent by its ID.", { agentId: z.string().describe("The agent ID") }, async ({ agentId }) => {
74
104
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai-mcp-server",
3
- "version": "6.2.0-dev.44",
3
+ "version": "6.2.0",
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": [