hac-mcp 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hac-mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "MCP server for SAP Commerce Cloud HAC — FlexibleSearch, ImpEx, Groovy, CronJobs and more from any MCP client",
5
5
  "keywords": [
6
6
  "mcp",
@@ -20,7 +20,9 @@ function parseFlexSearchError(msg) {
20
20
 
21
21
  function parseUnknownTypeError(msg) {
22
22
  if (!msg) return null;
23
- const m = msg.match(/unknown type[:\s]+'?(\w+)'?/i) || msg.match(/[Tt]he type '(\w+)' is unknown/);
23
+ const m = msg.match(/unknown type[:\s]+'?(\w+)'?/i)
24
+ || msg.match(/[Tt]he type '(\w+)' is unknown/)
25
+ || msg.match(/type code '(\w+)' invalid/i);
24
26
  return m?.[1] ?? null;
25
27
  }
26
28
 
@@ -124,7 +126,7 @@ export const tool = {
124
126
  let detail = `Unknown type "${unknownType}".`;
125
127
  try {
126
128
  const types = await getTypeIndex(env);
127
- const suggestions = fuzzySearch(unknownType, types, { topN: 5 });
129
+ const suggestions = fuzzySearch(unknownType, types, { topN: 10 });
128
130
  if (suggestions.length) detail += ` Did you mean: ${suggestions.join(', ')}?`;
129
131
  } catch (_) {}
130
132
  mcpLog({ tool: TOOL, envName: env.name, preview: 'Query error', detail, isError: true, runId });