@talonic/mcp 0.1.59 → 0.1.60
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 +14 -5
- 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/http-server.js
CHANGED
|
@@ -948,6 +948,8 @@ var DESCRIPTION2 = [
|
|
|
948
948
|
"- is_empty: presence check, no value needed. Returns documents where the field is null or missing.",
|
|
949
949
|
"- 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.",
|
|
950
950
|
"",
|
|
951
|
+
"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).",
|
|
952
|
+
"",
|
|
951
953
|
"SCHEMA TYPING:",
|
|
952
954
|
"- 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.",
|
|
953
955
|
"- **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.",
|
|
@@ -973,14 +975,21 @@ var operatorEnum = z.enum([
|
|
|
973
975
|
"is_empty",
|
|
974
976
|
"is_not_empty"
|
|
975
977
|
]);
|
|
978
|
+
var conditionValue = z.union([z.string(), z.number(), z.boolean()]);
|
|
976
979
|
var conditionSchema = z.object({
|
|
977
980
|
field: z.string().optional().describe(
|
|
978
|
-
"Canonical field name (e.g. 'vendor.name', 'policy.0_coverage_type'). The Talonic API resolves names to ids server-side.
|
|
981
|
+
"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."
|
|
982
|
+
),
|
|
983
|
+
field_id: z.string().optional().describe(
|
|
984
|
+
"Talonic field UUID. Provide EXACTLY ONE of `field` or `field_id` per condition \u2014 not both, not neither."
|
|
979
985
|
),
|
|
980
|
-
field_id: z.string().optional().describe("Talonic field UUID. Mutually exclusive with `field`."),
|
|
981
986
|
operator: operatorEnum.describe("Comparison operator. See description for the full list."),
|
|
982
|
-
value:
|
|
983
|
-
|
|
987
|
+
value: conditionValue.optional().describe(
|
|
988
|
+
"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`."
|
|
989
|
+
),
|
|
990
|
+
value_to: conditionValue.optional().describe(
|
|
991
|
+
"Upper bound. REQUIRED only for the `between` operator (paired with `value`); same type as `value`. Omit for all other operators."
|
|
992
|
+
)
|
|
984
993
|
});
|
|
985
994
|
var sortSchema = z.object({
|
|
986
995
|
field: z.string().optional(),
|
|
@@ -1752,7 +1761,7 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
1752
1761
|
|
|
1753
1762
|
// package.json
|
|
1754
1763
|
var package_default = {
|
|
1755
|
-
version: "0.1.
|
|
1764
|
+
version: "0.1.60"};
|
|
1756
1765
|
|
|
1757
1766
|
// src/version.ts
|
|
1758
1767
|
var VERSION = package_default.version;
|