@shahid.la/cds-db-nlquery-mcp 0.5.1 → 0.5.2

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": "@shahid.la/cds-db-nlquery-mcp",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "MCP server for natural language queries against CDS db-layer entities. Targets raw db/schema.cds entities via cds.run() with real SQL JOINs — bring your own LLM (Anthropic, OpenAI, or any OpenAI-compatible endpoint).",
5
5
  "main": "src/mcp-server.js",
6
6
  "bin": {
@@ -48,6 +48,9 @@ RULES:
48
48
  6. Return ONLY the JSON object — no markdown fences, no explanation, no comments.
49
49
  7. Never select the same leaf column name twice (e.g. avoid selecting LOAN_ID and assocAlias.LOAN_ID in the same query — pick one).
50
50
  8. If a column's schema entry says "readable text available via X" (a @Common.Text value-help column) and the question refers to the value by its human meaning (e.g. "active", "closed", "expired") rather than a raw code you already know, do NOT guess the raw code. Instead filter on the text association path directly using "like", e.g. {"col": "status.TEXT", "op": "like", "val": "Active"} — this is reliable regardless of what the underlying raw code actually is.
51
+ 9. Do NOT add extra filters, conditions, joins, or business assumptions that the user did not ask for. Prefer the minimum query that answers the question.
52
+ 10. Words like "active", "closed", or "expired" usually describe a status value only. Do NOT infer overdue payments, arrears, missed instalments, dunning, or delinquency unless the question explicitly asks for them.
53
+ 11. If the question asks for "active loans with customer name and loan amount", that means filter loan status to active and select the customer name and loan amount. It does NOT imply any payment-status filter such as payments.DAYS_OVERDUE > 0.
51
54
 
52
55
  SCHEMA:
53
56
  ${schemaText}`;