@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/index.js
CHANGED
|
@@ -942,6 +942,8 @@ var DESCRIPTION2 = [
|
|
|
942
942
|
"- is_empty: presence check, no value needed. Returns documents where the field is null or missing.",
|
|
943
943
|
"- 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.",
|
|
944
944
|
"",
|
|
945
|
+
"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).",
|
|
946
|
+
"",
|
|
945
947
|
"SCHEMA TYPING:",
|
|
946
948
|
"- 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.",
|
|
947
949
|
"- **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.",
|
|
@@ -967,14 +969,21 @@ var operatorEnum = z.enum([
|
|
|
967
969
|
"is_empty",
|
|
968
970
|
"is_not_empty"
|
|
969
971
|
]);
|
|
972
|
+
var conditionValue = z.union([z.string(), z.number(), z.boolean()]);
|
|
970
973
|
var conditionSchema = z.object({
|
|
971
974
|
field: z.string().optional().describe(
|
|
972
|
-
"Canonical field name (e.g. 'vendor.name', 'policy.0_coverage_type'). The Talonic API resolves names to ids server-side.
|
|
975
|
+
"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."
|
|
976
|
+
),
|
|
977
|
+
field_id: z.string().optional().describe(
|
|
978
|
+
"Talonic field UUID. Provide EXACTLY ONE of `field` or `field_id` per condition \u2014 not both, not neither."
|
|
973
979
|
),
|
|
974
|
-
field_id: z.string().optional().describe("Talonic field UUID. Mutually exclusive with `field`."),
|
|
975
980
|
operator: operatorEnum.describe("Comparison operator. See description for the full list."),
|
|
976
|
-
value:
|
|
977
|
-
|
|
981
|
+
value: conditionValue.optional().describe(
|
|
982
|
+
"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`."
|
|
983
|
+
),
|
|
984
|
+
value_to: conditionValue.optional().describe(
|
|
985
|
+
"Upper bound. REQUIRED only for the `between` operator (paired with `value`); same type as `value`. Omit for all other operators."
|
|
986
|
+
)
|
|
978
987
|
});
|
|
979
988
|
var sortSchema = z.object({
|
|
980
989
|
field: z.string().optional(),
|
|
@@ -1746,7 +1755,7 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
1746
1755
|
|
|
1747
1756
|
// package.json
|
|
1748
1757
|
var package_default = {
|
|
1749
|
-
version: "0.1.
|
|
1758
|
+
version: "0.1.61"};
|
|
1750
1759
|
|
|
1751
1760
|
// src/version.ts
|
|
1752
1761
|
var VERSION = package_default.version;
|