@talonic/mcp 0.1.59 → 0.1.61
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/dist/http-server.js +15 -6
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/server.js +14 -5
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -944,6 +944,8 @@ var DESCRIPTION2 = [
|
|
|
944
944
|
"- is_empty: presence check, no value needed. Returns documents where the field is null or missing.",
|
|
945
945
|
"- is_not_empty: presence check, no value needed. Returns documents where the field has a materialized value. Results reflect data within seconds of extraction completing.",
|
|
946
946
|
"",
|
|
947
|
+
"CONDITION SHAPE: each condition needs EXACTLY ONE of `field` or `field_id` (not both, not neither), an `operator`, and usually a `value`. Exceptions: `is_empty` / `is_not_empty` take NO value; `between` needs BOTH `value` (lower bound) and `value_to` (upper bound). `value`/`value_to` are a string, number, or boolean matching the field's data type (numbers for numeric fields, ISO 'YYYY-MM-DD' strings for dates).",
|
|
948
|
+
"",
|
|
947
949
|
"SCHEMA TYPING:",
|
|
948
950
|
"- Numeric operators (`gt`, `gte`, `lt`, `lte`, `between`) only resolve correctly when the schema field is typed as `number`. A field typed as `string` that holds numeric content (e.g. '\u20AC1,500.00') will silently return zero matches even after extraction. Pick the right type at schema design time.",
|
|
949
951
|
"- **Preventive check:** call `talonic_search` first and inspect `fieldMatches[].dataType` / `fields[].dataType` on the field you intend to filter. If `dataType !== 'number'`, do NOT use a numeric operator on it \u2014 either pick a different field, switch to a string-friendly operator (`eq`, `contains`), or warn the user that the schema field needs a `data_type` change before the filter can succeed.",
|
|
@@ -969,14 +971,21 @@ var operatorEnum = z.enum([
|
|
|
969
971
|
"is_empty",
|
|
970
972
|
"is_not_empty"
|
|
971
973
|
]);
|
|
974
|
+
var conditionValue = z.union([z.string(), z.number(), z.boolean()]);
|
|
972
975
|
var conditionSchema = z.object({
|
|
973
976
|
field: z.string().optional().describe(
|
|
974
|
-
"Canonical field name (e.g. 'vendor.name', 'policy.0_coverage_type'). The Talonic API resolves names to ids server-side.
|
|
977
|
+
"Canonical field name (e.g. 'vendor.name', 'policy.0_coverage_type'). Provide EXACTLY ONE of `field` or `field_id` per condition \u2014 not both, not neither. The Talonic API resolves names to ids server-side."
|
|
978
|
+
),
|
|
979
|
+
field_id: z.string().optional().describe(
|
|
980
|
+
"Talonic field UUID. Provide EXACTLY ONE of `field` or `field_id` per condition \u2014 not both, not neither."
|
|
975
981
|
),
|
|
976
|
-
field_id: z.string().optional().describe("Talonic field UUID. Mutually exclusive with `field`."),
|
|
977
982
|
operator: operatorEnum.describe("Comparison operator. See description for the full list."),
|
|
978
|
-
value:
|
|
979
|
-
|
|
983
|
+
value: conditionValue.optional().describe(
|
|
984
|
+
"Comparison value, typed to match the field (number for numeric fields, string for text and ISO 'YYYY-MM-DD' dates, boolean for flags). REQUIRED for every operator EXCEPT `is_empty` / `is_not_empty` (which take no value). For `between`, this is the lower bound \u2014 pair it with `value_to`."
|
|
985
|
+
),
|
|
986
|
+
value_to: conditionValue.optional().describe(
|
|
987
|
+
"Upper bound. REQUIRED only for the `between` operator (paired with `value`); same type as `value`. Omit for all other operators."
|
|
988
|
+
)
|
|
980
989
|
});
|
|
981
990
|
var sortSchema = z.object({
|
|
982
991
|
field: z.string().optional(),
|
|
@@ -1748,7 +1757,7 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
1748
1757
|
|
|
1749
1758
|
// package.json
|
|
1750
1759
|
var package_default = {
|
|
1751
|
-
version: "0.1.
|
|
1760
|
+
version: "0.1.61"};
|
|
1752
1761
|
|
|
1753
1762
|
// src/version.ts
|
|
1754
1763
|
var VERSION = package_default.version;
|