@2kw/ai-mcp-server 5.2.0 → 5.3.0-dev.7

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.
@@ -2,6 +2,11 @@ import { z } from "zod";
2
2
  import { formatErrorForMcp } from "../errors.js";
3
3
  import { ensureOpenAiCompatible } from "../schema-compat.js";
4
4
  /* ── helpers ─────────────────────────────────────────────────────────────── */
5
+ /** Renders a structured schema-safety warning (#269) as one indented line, plus its fix hint. */
6
+ function formatLintWarning(warning) {
7
+ const head = ` - [${warning.rule}] ${warning.pointer || "(root)"}: ${warning.message}`;
8
+ return warning.suggestion ? `${head}\n ${warning.suggestion}` : head;
9
+ }
5
10
  function formatTestResult(result) {
6
11
  const parts = [];
7
12
  parts.push(`Success: ${result.success}`);
@@ -42,8 +47,9 @@ export function register(server, client) {
42
47
  if (result?.errors && result.errors.length > 0) {
43
48
  parts.push(`\nErrors:\n${result.errors.map((e) => ` - ${e}`).join("\n")}`);
44
49
  }
45
- if (result?.warnings && result.warnings.length > 0) {
46
- parts.push(`\nWarnings:\n${result.warnings.map((w) => ` - ${w}`).join("\n")}`);
50
+ const warnings = (result?.warnings ?? []);
51
+ if (warnings.length > 0) {
52
+ parts.push(`\nSchema-safety warnings:\n${warnings.map(formatLintWarning).join("\n")}`);
47
53
  }
48
54
  return {
49
55
  content: [{ type: "text", text: parts.join("\n") }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai-mcp-server",
3
- "version": "5.2.0",
3
+ "version": "5.3.0-dev.7",
4
4
  "description": "MCP server for 2kw.ai — EU-hosted AI platform: OpenAI-compatible LLM gateway, schema-driven document extraction, transcription, and cost observability. 86 tools for Claude Code, Cursor, and Windsurf.",
5
5
  "mcpName": "ai.2kw/mcp-server",
6
6
  "keywords": [