@talonic/mcp 0.1.96 → 0.1.98
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/CHANGELOG.md +14 -0
- package/dist/http-server.js +119 -74
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +119 -74
- package/dist/index.js.map +1 -1
- package/dist/server.js +119 -74
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
> The publish workflow assigns the version on release; after the push that publishes it, promote this block to `## [<version>] - <date>` (the changelog lock accepts the current package version living here until then).
|
|
11
11
|
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Questions go to `talonic_ask`.** In claude.ai the model answered a simple question by exploring the workspace itself: accounts, the field registry (13,000+ mostly one-off candidate fields), specs, schemas, `workspace_overview`, then a chain of `query_data` SQL attempts, about 20 calls and over a minute. `talonic_ask` runs that same toolset server-side and returns one cited answer, but the model skipped it because it costs credits and the SQL route is free. The server instructions and `talonic_ask` now name it the default for any question about document contents; `talonic_invoke_agent_tool`, `talonic_list_agent_tools`, `talonic_list_fields`, `talonic_list_specs`, `talonic_list_schemas` and `talonic_list_accounts` say they are not a warm-up for answering one. `talonic_list_fields` tells the model to pass `maturity: core|proven`.
|
|
15
|
+
- **Readable tool titles.** Claude shows each call as "Talonic: <title>"; titles drop the repeated "Talonic" and internal wording ("Invoke Platform Agent Tool" → "Query workspace data", "Poll a Spec run" → "Check run progress", …).
|
|
16
|
+
- **Cards show the spinning Talonic mark while loading** (Ink's mark and loop; still under `prefers-reduced-motion`).
|
|
17
|
+
|
|
18
|
+
## [0.1.97] - 2026-11-20
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Inline cards only for answers.** Once cards rendered in Claude (0.1.96), every tool call drew one, so a single question filled the chat with 20+ full-height cards of field lists, specs, schemas and raw SQL rows. Only ten tools now declare a card: `talonic_extract`, `talonic_ask`, `talonic_get_answer`, `talonic_get_run_results`, `talonic_request_upload`, `talonic_get_balance`, `talonic_get_usage`, `talonic_get_pricing`, `talonic_save_schema`, `talonic_create_account`. Lookups the model makes for itself show only the collapsed tool-call row. The run-results card shows 12 rows and 6 columns at most.
|
|
23
|
+
|
|
24
|
+
## [0.1.96] - 2026-11-20
|
|
25
|
+
|
|
12
26
|
### Added
|
|
13
27
|
|
|
14
28
|
- `talonic_list_apps`: the workspace's apps with id, description, mode and enabled state; supplies the `app_id` the decision-task tools need (no tool returned it before).
|
package/dist/http-server.js
CHANGED
|
@@ -460,15 +460,30 @@ var WIDGET_DESCRIPTIONS = {
|
|
|
460
460
|
releaseDecisionTask: "Confirmation that the decision task was released back to available for another claimant.",
|
|
461
461
|
failDecisionTask: "Confirmation that the task was reported undecidable: a Human Review is raised and the app's fallback applies."
|
|
462
462
|
};
|
|
463
|
+
var CARD_TOOL_KEYS = /* @__PURE__ */ new Set([
|
|
464
|
+
"extract",
|
|
465
|
+
"ask",
|
|
466
|
+
"getAnswer",
|
|
467
|
+
"getRunResults",
|
|
468
|
+
"requestUpload",
|
|
469
|
+
"getBalance",
|
|
470
|
+
"getUsage",
|
|
471
|
+
"getPricing",
|
|
472
|
+
"saveSchema",
|
|
473
|
+
"createAccount"
|
|
474
|
+
]);
|
|
463
475
|
function widgetToolMeta(key) {
|
|
464
476
|
const uri = WIDGET_URIS[key];
|
|
465
477
|
const status3 = TOOL_INVOCATION_STATUS[key];
|
|
466
|
-
|
|
467
|
-
ui: { resourceUri: uri },
|
|
468
|
-
"openai/outputTemplate": uri,
|
|
478
|
+
const meta = {
|
|
469
479
|
"openai/toolInvocation/invoking": status3.invoking,
|
|
470
480
|
"openai/toolInvocation/invoked": status3.invoked
|
|
471
481
|
};
|
|
482
|
+
if (CARD_TOOL_KEYS.has(key)) {
|
|
483
|
+
meta["ui"] = { resourceUri: uri };
|
|
484
|
+
meta["openai/outputTemplate"] = uri;
|
|
485
|
+
}
|
|
486
|
+
return meta;
|
|
472
487
|
}
|
|
473
488
|
function widgetKeyForUri(uri) {
|
|
474
489
|
for (const key of Object.keys(WIDGET_URIS)) {
|
|
@@ -583,6 +598,33 @@ var BASE_CSS = `
|
|
|
583
598
|
details.tree > summary { cursor: pointer; font-size: 13px; list-style: none; }
|
|
584
599
|
details.tree > summary::before { content: "\u25B8 "; color: var(--muted); }
|
|
585
600
|
details.tree[open] > summary::before { content: "\u25BE "; }
|
|
601
|
+
.loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--muted); }
|
|
602
|
+
.tl-mark { color: var(--accent); }
|
|
603
|
+
.tl-mark g, .tl-mark circle { transform-box: view-box; transform-origin: 0 0; }
|
|
604
|
+
.tl-layer { fill: none; stroke: currentColor; stroke-width: 20; stroke-linecap: round; }
|
|
605
|
+
.tl-spin { animation: tl-spin 4s infinite; }
|
|
606
|
+
.tl-core { animation: tl-core 4s infinite; }
|
|
607
|
+
.tl-arm { animation: tl-arm 4s infinite; animation-delay: calc(4s * var(--i) * -0.0075); }
|
|
608
|
+
@keyframes tl-spin {
|
|
609
|
+
0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
|
|
610
|
+
42% { transform: rotate(560deg); animation-timing-function: linear; }
|
|
611
|
+
58% { transform: rotate(860deg); animation-timing-function: cubic-bezier(.1, .6, .25, 1); }
|
|
612
|
+
100% { transform: rotate(1080deg); }
|
|
613
|
+
}
|
|
614
|
+
@keyframes tl-arm {
|
|
615
|
+
0%, 24% { transform: scale(1); animation-timing-function: cubic-bezier(.6, 0, .85, .3); }
|
|
616
|
+
48% { transform: scale(.06); animation-timing-function: linear; }
|
|
617
|
+
60% { transform: scale(.06); animation-timing-function: cubic-bezier(.2, 1.5, .35, 1); }
|
|
618
|
+
84%, 100% { transform: scale(1); }
|
|
619
|
+
}
|
|
620
|
+
@keyframes tl-core {
|
|
621
|
+
0%, 28% { transform: scale(1); animation-timing-function: cubic-bezier(.6, 0, .85, .3); }
|
|
622
|
+
48% { transform: scale(.5); animation-timing-function: ease-in-out; }
|
|
623
|
+
58% { transform: scale(.44); animation-timing-function: cubic-bezier(.2, 1.6, .4, 1); }
|
|
624
|
+
74% { transform: scale(1.1); animation-timing-function: ease-in-out; }
|
|
625
|
+
88%, 100% { transform: scale(1); }
|
|
626
|
+
}
|
|
627
|
+
@media (prefers-reduced-motion: reduce) { .tl-spin, .tl-core, .tl-arm { animation: none; } }
|
|
586
628
|
`;
|
|
587
629
|
var HELPERS_JS = `
|
|
588
630
|
var root = document.getElementById("root");
|
|
@@ -831,7 +873,7 @@ ${opts.css ?? ""}
|
|
|
831
873
|
</style>
|
|
832
874
|
</head>
|
|
833
875
|
<body>
|
|
834
|
-
<div id="root" class="root"><div class="
|
|
876
|
+
<div id="root" class="root"><div class="loading" role="status"><svg class="tl-mark" viewBox="-200 -200 400 400" width="36" height="36" aria-hidden="true" focusable="false"><g class="tl-layer"><g class="tl-spin"><circle class="tl-core" r="65.5" stroke-width="21"/><g transform="rotate(0)"><g class="tl-arm" style="--i:0"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(45)"><g class="tl-arm" style="--i:1"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(90)"><g class="tl-arm" style="--i:2"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(135)"><g class="tl-arm" style="--i:3"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(180)"><g class="tl-arm" style="--i:4"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(225)"><g class="tl-arm" style="--i:5"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(270)"><g class="tl-arm" style="--i:6"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g><g transform="rotate(315)"><g class="tl-arm" style="--i:7"><path d="M-15 -66C-36 -90 -30 -118 4 -133"/><circle cy="-155" r="22"/></g></g></g></g></svg><span>Loading\u2026</span></div></div>
|
|
835
877
|
<script>
|
|
836
878
|
(function () {
|
|
837
879
|
${HELPERS_JS}
|
|
@@ -1872,9 +1914,9 @@ var RENDER_BODY27 = `
|
|
|
1872
1914
|
var pg = payload.pagination && typeof payload.pagination === "object" ? payload.pagination : {};
|
|
1873
1915
|
if (!rows.length) { empty("No result rows yet."); return; }
|
|
1874
1916
|
function tone(s) { return s === "complete" || s === "completed" ? "good" : s === "error" ? "bad" : s === "partial" ? "warn" : "info"; }
|
|
1875
|
-
var shownCols = cols.slice(0,
|
|
1917
|
+
var shownCols = cols.slice(0, 6);
|
|
1876
1918
|
var head = '<tr><th>Document</th><th>Status</th>' + shownCols.map(function (c) { return '<th>' + esc(c.display_name || c.field_key || "") + '</th>'; }).join("") + '</tr>';
|
|
1877
|
-
var body = rows.slice(0,
|
|
1919
|
+
var body = rows.slice(0, 12).map(function (r) {
|
|
1878
1920
|
r = r && typeof r === "object" ? r : {};
|
|
1879
1921
|
var f = r.fields && typeof r.fields === "object" ? r.fields : {};
|
|
1880
1922
|
return '<tr><td class="val">' + esc(r.filename || shortId(r.document_id)) + '</td><td>' + chip(r.status, tone(r.status)) + '</td>'
|
|
@@ -1883,10 +1925,10 @@ var RENDER_BODY27 = `
|
|
|
1883
1925
|
var total = typeof pg.total === "number" ? pg.total : rows.length;
|
|
1884
1926
|
var held = typeof payload.pending_review_count === "number" ? payload.pending_review_count : 0;
|
|
1885
1927
|
var more = [];
|
|
1886
|
-
if (rows.length >
|
|
1887
|
-
if (cols.length >
|
|
1928
|
+
if (rows.length > 12) more.push("+" + (rows.length - 12) + " more rows");
|
|
1929
|
+
if (cols.length > 6) more.push("+" + (cols.length - 6) + " more columns");
|
|
1888
1930
|
root.innerHTML = ''
|
|
1889
|
-
+ '<div class="header"><div><div class="title">Run results</div><div class="subtitle">' + Math.min(rows.length,
|
|
1931
|
+
+ '<div class="header"><div><div class="title">Run results</div><div class="subtitle">' + Math.min(rows.length, 12) + ' of ' + total + ' rows' + (pg.has_more ? " \xB7 more available" : "") + '</div></div>'
|
|
1890
1932
|
+ '<div>' + chip(payload.status, payload.status === "completed" ? "good" : payload.status === "failed" ? "bad" : "info") + (held ? chip(held + " held for review", "warn") : "") + '</div></div>'
|
|
1891
1933
|
+ '<table><thead>' + head + '</thead><tbody>' + body + '</tbody></table>'
|
|
1892
1934
|
+ (more.length ? '<div class="muted small" style="margin-top:6px">' + esc(more.join(" \xB7 ")) + '</div>' : "");
|
|
@@ -2463,12 +2505,12 @@ function registerExtract(server, getTalonic, opts = {}) {
|
|
|
2463
2505
|
server.registerTool(
|
|
2464
2506
|
"talonic_extract",
|
|
2465
2507
|
{
|
|
2466
|
-
title: "Extract
|
|
2508
|
+
title: "Extract data",
|
|
2467
2509
|
description: DESCRIPTION,
|
|
2468
2510
|
inputSchema: opts.localFiles ? inputSchema : hostedInputSchema,
|
|
2469
2511
|
outputSchema,
|
|
2470
2512
|
annotations: {
|
|
2471
|
-
title: "Extract
|
|
2513
|
+
title: "Extract data",
|
|
2472
2514
|
readOnlyHint: false,
|
|
2473
2515
|
destructiveHint: false,
|
|
2474
2516
|
openWorldHint: true
|
|
@@ -2592,12 +2634,12 @@ function registerFilter(server, getTalonic) {
|
|
|
2592
2634
|
server.registerTool(
|
|
2593
2635
|
"talonic_filter",
|
|
2594
2636
|
{
|
|
2595
|
-
title: "Filter
|
|
2637
|
+
title: "Filter documents",
|
|
2596
2638
|
description: DESCRIPTION2,
|
|
2597
2639
|
inputSchema: inputSchema2,
|
|
2598
2640
|
outputSchema: outputSchema2,
|
|
2599
2641
|
annotations: {
|
|
2600
|
-
title: "Filter
|
|
2642
|
+
title: "Filter documents",
|
|
2601
2643
|
readOnlyHint: true,
|
|
2602
2644
|
destructiveHint: false,
|
|
2603
2645
|
openWorldHint: false
|
|
@@ -2638,12 +2680,12 @@ function registerGetBalance(server, getTalonic) {
|
|
|
2638
2680
|
server.registerTool(
|
|
2639
2681
|
"talonic_get_balance",
|
|
2640
2682
|
{
|
|
2641
|
-
title: "
|
|
2683
|
+
title: "Check credit balance",
|
|
2642
2684
|
description: DESCRIPTION3,
|
|
2643
2685
|
inputSchema: inputSchema3,
|
|
2644
2686
|
outputSchema: outputSchema3,
|
|
2645
2687
|
annotations: {
|
|
2646
|
-
title: "
|
|
2688
|
+
title: "Check credit balance",
|
|
2647
2689
|
readOnlyHint: true,
|
|
2648
2690
|
destructiveHint: false,
|
|
2649
2691
|
openWorldHint: false
|
|
@@ -2690,12 +2732,12 @@ function registerGetPricing(server, getTalonic) {
|
|
|
2690
2732
|
server.registerTool(
|
|
2691
2733
|
"talonic_get_pricing",
|
|
2692
2734
|
{
|
|
2693
|
-
title: "
|
|
2735
|
+
title: "Check pricing",
|
|
2694
2736
|
description: DESCRIPTION4,
|
|
2695
2737
|
inputSchema: inputSchema4,
|
|
2696
2738
|
outputSchema: outputSchema4,
|
|
2697
2739
|
annotations: {
|
|
2698
|
-
title: "
|
|
2740
|
+
title: "Check pricing",
|
|
2699
2741
|
readOnlyHint: true,
|
|
2700
2742
|
destructiveHint: false,
|
|
2701
2743
|
openWorldHint: false
|
|
@@ -2739,12 +2781,12 @@ function registerGetUsage(server, getTalonic) {
|
|
|
2739
2781
|
server.registerTool(
|
|
2740
2782
|
"talonic_get_usage",
|
|
2741
2783
|
{
|
|
2742
|
-
title: "
|
|
2784
|
+
title: "Check credit usage",
|
|
2743
2785
|
description: DESCRIPTION5,
|
|
2744
2786
|
inputSchema: inputSchema5,
|
|
2745
2787
|
outputSchema: outputSchema5,
|
|
2746
2788
|
annotations: {
|
|
2747
|
-
title: "
|
|
2789
|
+
title: "Check credit usage",
|
|
2748
2790
|
readOnlyHint: true,
|
|
2749
2791
|
destructiveHint: false,
|
|
2750
2792
|
openWorldHint: false
|
|
@@ -2830,12 +2872,12 @@ function registerGetDocument(server, getTalonic) {
|
|
|
2830
2872
|
server.registerTool(
|
|
2831
2873
|
"talonic_get_document",
|
|
2832
2874
|
{
|
|
2833
|
-
title: "
|
|
2875
|
+
title: "Look up a document",
|
|
2834
2876
|
description: DESCRIPTION6,
|
|
2835
2877
|
inputSchema: inputSchema6,
|
|
2836
2878
|
outputSchema: outputSchema6,
|
|
2837
2879
|
annotations: {
|
|
2838
|
-
title: "
|
|
2880
|
+
title: "Look up a document",
|
|
2839
2881
|
readOnlyHint: true,
|
|
2840
2882
|
destructiveHint: false,
|
|
2841
2883
|
openWorldHint: false
|
|
@@ -2849,7 +2891,7 @@ var DESCRIPTION7 = [
|
|
|
2849
2891
|
"List the saved schemas in the workspace as compact summaries (id, short_id, name, description, version, field_count).",
|
|
2850
2892
|
"",
|
|
2851
2893
|
"USE WHEN: 'what schemas do I have', or to find a reusable schema before extracting.",
|
|
2852
|
-
"NOT FOR: a one-off extraction with an inline schema (call talonic_extract directly).",
|
|
2894
|
+
"NOT FOR: a one-off extraction with an inline schema (call talonic_extract directly). Not a warm-up before answering a question about the documents: call talonic_ask for that.",
|
|
2853
2895
|
"ARGS: none.",
|
|
2854
2896
|
"RETURNS: data[] of schema summaries. Field definitions are omitted here; call talonic_get_schema with an id to see a schema's fields. Pass a schema's id/short_id to talonic_extract as `schema_id`."
|
|
2855
2897
|
].join("\n");
|
|
@@ -2900,12 +2942,12 @@ function registerListSchemas(server, getTalonic) {
|
|
|
2900
2942
|
server.registerTool(
|
|
2901
2943
|
"talonic_list_schemas",
|
|
2902
2944
|
{
|
|
2903
|
-
title: "List
|
|
2945
|
+
title: "List saved schemas",
|
|
2904
2946
|
description: DESCRIPTION7,
|
|
2905
2947
|
inputSchema: {},
|
|
2906
2948
|
outputSchema: outputSchema7,
|
|
2907
2949
|
annotations: {
|
|
2908
|
-
title: "List
|
|
2950
|
+
title: "List saved schemas",
|
|
2909
2951
|
readOnlyHint: true,
|
|
2910
2952
|
destructiveHint: false,
|
|
2911
2953
|
openWorldHint: false
|
|
@@ -2935,13 +2977,13 @@ function registerGetSchema(server, getTalonic) {
|
|
|
2935
2977
|
server.registerTool(
|
|
2936
2978
|
"talonic_get_schema",
|
|
2937
2979
|
{
|
|
2938
|
-
title: "
|
|
2980
|
+
title: "Read a schema's fields",
|
|
2939
2981
|
description: GET_DESCRIPTION,
|
|
2940
2982
|
inputSchema: {
|
|
2941
2983
|
schema_id: z.string().min(1).describe("Schema id (UUID) or short_id (SCH-XXXXXXXX) from talonic_list_schemas.")
|
|
2942
2984
|
},
|
|
2943
2985
|
annotations: {
|
|
2944
|
-
title: "
|
|
2986
|
+
title: "Read a schema's fields",
|
|
2945
2987
|
readOnlyHint: true,
|
|
2946
2988
|
destructiveHint: false,
|
|
2947
2989
|
idempotentHint: true,
|
|
@@ -3001,12 +3043,12 @@ function registerSaveSchema(server, getTalonic) {
|
|
|
3001
3043
|
server.registerTool(
|
|
3002
3044
|
"talonic_save_schema",
|
|
3003
3045
|
{
|
|
3004
|
-
title: "Save
|
|
3046
|
+
title: "Save a schema",
|
|
3005
3047
|
description: DESCRIPTION8,
|
|
3006
3048
|
inputSchema: inputSchema7,
|
|
3007
3049
|
outputSchema: outputSchema8,
|
|
3008
3050
|
annotations: {
|
|
3009
|
-
title: "Save
|
|
3051
|
+
title: "Save a schema",
|
|
3010
3052
|
readOnlyHint: false,
|
|
3011
3053
|
destructiveHint: false,
|
|
3012
3054
|
openWorldHint: false
|
|
@@ -3099,12 +3141,12 @@ function registerSearch(server, getTalonic) {
|
|
|
3099
3141
|
server.registerTool(
|
|
3100
3142
|
"talonic_search",
|
|
3101
3143
|
{
|
|
3102
|
-
title: "Search
|
|
3144
|
+
title: "Search documents",
|
|
3103
3145
|
description: DESCRIPTION9,
|
|
3104
3146
|
inputSchema: inputSchema8,
|
|
3105
3147
|
outputSchema: outputSchema9,
|
|
3106
3148
|
annotations: {
|
|
3107
|
-
title: "Search
|
|
3149
|
+
title: "Search documents",
|
|
3108
3150
|
readOnlyHint: true,
|
|
3109
3151
|
destructiveHint: false,
|
|
3110
3152
|
openWorldHint: false
|
|
@@ -3177,12 +3219,12 @@ function registerRequestUpload(server, getToken, baseUrl) {
|
|
|
3177
3219
|
server.registerTool(
|
|
3178
3220
|
"talonic_request_upload",
|
|
3179
3221
|
{
|
|
3180
|
-
title: "
|
|
3222
|
+
title: "Get an upload link",
|
|
3181
3223
|
description: DESCRIPTION10,
|
|
3182
3224
|
inputSchema: inputSchema9,
|
|
3183
3225
|
outputSchema: outputSchema10,
|
|
3184
3226
|
annotations: {
|
|
3185
|
-
title: "
|
|
3227
|
+
title: "Get an upload link",
|
|
3186
3228
|
readOnlyHint: false,
|
|
3187
3229
|
destructiveHint: false,
|
|
3188
3230
|
openWorldHint: false
|
|
@@ -3196,7 +3238,7 @@ var LIST_DESCRIPTION = [
|
|
|
3196
3238
|
"List the workspace's accounts: the companies (portfolio companies, clients, entities) whose documents it keeps apart.",
|
|
3197
3239
|
"",
|
|
3198
3240
|
"USE WHEN: before uploading a company's files (pass its name as `account` on talonic_request_upload), or to see which companies exist.",
|
|
3199
|
-
"NOT FOR: listing documents (talonic_search / talonic_filter) \xB7 creating an account (talonic_create_account).",
|
|
3241
|
+
"NOT FOR: listing documents (talonic_search / talonic_filter) \xB7 creating an account (talonic_create_account). Not a warm-up before answering a question about the documents: call talonic_ask for that.",
|
|
3200
3242
|
"ARGS: none.",
|
|
3201
3243
|
"RETURNS: data[] of { id, name, aliases[], description, created_at }."
|
|
3202
3244
|
].join("\n");
|
|
@@ -3246,13 +3288,13 @@ function registerAccounts(server, getToken, baseUrl) {
|
|
|
3246
3288
|
server.registerTool(
|
|
3247
3289
|
"talonic_list_accounts",
|
|
3248
3290
|
{
|
|
3249
|
-
title: "List
|
|
3291
|
+
title: "List companies",
|
|
3250
3292
|
description: LIST_DESCRIPTION,
|
|
3251
3293
|
inputSchema: {},
|
|
3252
3294
|
outputSchema: { data: z.array(z.object(accountShape)).describe("The workspace's accounts.") },
|
|
3253
3295
|
_meta: widgetToolMeta("listAccounts"),
|
|
3254
3296
|
annotations: {
|
|
3255
|
-
title: "List
|
|
3297
|
+
title: "List companies",
|
|
3256
3298
|
readOnlyHint: true,
|
|
3257
3299
|
destructiveHint: false,
|
|
3258
3300
|
openWorldHint: false
|
|
@@ -3263,7 +3305,7 @@ function registerAccounts(server, getToken, baseUrl) {
|
|
|
3263
3305
|
server.registerTool(
|
|
3264
3306
|
"talonic_create_account",
|
|
3265
3307
|
{
|
|
3266
|
-
title: "
|
|
3308
|
+
title: "Add a company",
|
|
3267
3309
|
description: CREATE_DESCRIPTION,
|
|
3268
3310
|
inputSchema: {
|
|
3269
3311
|
name: z.string().min(1).max(255).describe("Company name, e.g. 'Filu'."),
|
|
@@ -3273,7 +3315,7 @@ function registerAccounts(server, getToken, baseUrl) {
|
|
|
3273
3315
|
outputSchema: accountShape,
|
|
3274
3316
|
_meta: widgetToolMeta("createAccount"),
|
|
3275
3317
|
annotations: {
|
|
3276
|
-
title: "
|
|
3318
|
+
title: "Add a company",
|
|
3277
3319
|
readOnlyHint: false,
|
|
3278
3320
|
destructiveHint: false,
|
|
3279
3321
|
idempotentHint: false,
|
|
@@ -7385,13 +7427,13 @@ function registerAppsTools(server, getToken, baseUrl) {
|
|
|
7385
7427
|
server.registerTool(
|
|
7386
7428
|
"talonic_list_apps",
|
|
7387
7429
|
{
|
|
7388
|
-
title: "List
|
|
7430
|
+
title: "List apps",
|
|
7389
7431
|
description: LIST_APPS_DESCRIPTION,
|
|
7390
7432
|
inputSchema: {
|
|
7391
7433
|
enabled_only: z.boolean().optional().describe("Only enabled apps (default true). Pass false to include disabled ones.")
|
|
7392
7434
|
},
|
|
7393
7435
|
annotations: {
|
|
7394
|
-
title: "List
|
|
7436
|
+
title: "List apps",
|
|
7395
7437
|
readOnlyHint: true,
|
|
7396
7438
|
destructiveHint: false,
|
|
7397
7439
|
idempotentHint: true,
|
|
@@ -7795,12 +7837,12 @@ function registerToMarkdown(server, getTalonic, opts = {}) {
|
|
|
7795
7837
|
server.registerTool(
|
|
7796
7838
|
"talonic_to_markdown",
|
|
7797
7839
|
{
|
|
7798
|
-
title: "
|
|
7840
|
+
title: "Read document text",
|
|
7799
7841
|
description: DESCRIPTION11,
|
|
7800
7842
|
inputSchema: opts.localFiles ? inputSchema10 : hostedInputSchema,
|
|
7801
7843
|
outputSchema: outputSchema11,
|
|
7802
7844
|
annotations: {
|
|
7803
|
-
title: "
|
|
7845
|
+
title: "Read document text",
|
|
7804
7846
|
readOnlyHint: false,
|
|
7805
7847
|
destructiveHint: false,
|
|
7806
7848
|
openWorldHint: true
|
|
@@ -7832,7 +7874,7 @@ var LIST_DESCRIPTION3 = [
|
|
|
7832
7874
|
"List the workspace's Field Registry \u2014 the canonical concepts Talonic has discovered across every ingested document, each with a stable id, maturity level, data type, synonyms and occurrence count.",
|
|
7833
7875
|
"",
|
|
7834
7876
|
"USE WHEN: you need to know WHAT data exists before querying it, want to pick the right concept for a question, or need the exact field id for talonic_get_field / talonic_field_values.",
|
|
7835
|
-
"NOT FOR: locating a specific document (talonic_search) or filtering documents by a value (talonic_filter).",
|
|
7877
|
+
"NOT FOR: locating a specific document (talonic_search) or filtering documents by a value (talonic_filter). Not a warm-up before answering a question about the documents: call talonic_ask for that. The registry holds many one-off candidate fields; pass maturity core or proven unless the user asks for candidates.",
|
|
7836
7878
|
"",
|
|
7837
7879
|
"ARGS: `search` (case-insensitive contains on name), `maturity` (core | proven | candidate \u2014 prefer `core`/`proven` for anything you will build on), `include_superseded` (default false: rows merged into another concept are hidden so you never see two ids for one concept), `limit`, `cursor`.",
|
|
7838
7880
|
"RETURNS: data[] of { id, canonical_name, display_name, data_type, maturity, tier, synonyms, description, occurrence_count, superseded_by, links } plus cursor pagination."
|
|
@@ -7941,11 +7983,11 @@ function registerFieldTools(server, getToken, baseUrl) {
|
|
|
7941
7983
|
server.registerTool(
|
|
7942
7984
|
"talonic_list_fields",
|
|
7943
7985
|
{
|
|
7944
|
-
title: "List
|
|
7986
|
+
title: "List fields",
|
|
7945
7987
|
description: LIST_DESCRIPTION3,
|
|
7946
7988
|
inputSchema: listFieldsInputSchema,
|
|
7947
7989
|
annotations: {
|
|
7948
|
-
title: "List
|
|
7990
|
+
title: "List fields",
|
|
7949
7991
|
readOnlyHint: true,
|
|
7950
7992
|
destructiveHint: false,
|
|
7951
7993
|
idempotentHint: true,
|
|
@@ -7958,11 +8000,11 @@ function registerFieldTools(server, getToken, baseUrl) {
|
|
|
7958
8000
|
server.registerTool(
|
|
7959
8001
|
"talonic_get_field",
|
|
7960
8002
|
{
|
|
7961
|
-
title: "
|
|
8003
|
+
title: "Look up a field",
|
|
7962
8004
|
description: GET_DESCRIPTION2,
|
|
7963
8005
|
inputSchema: getFieldInputSchema,
|
|
7964
8006
|
annotations: {
|
|
7965
|
-
title: "
|
|
8007
|
+
title: "Look up a field",
|
|
7966
8008
|
readOnlyHint: true,
|
|
7967
8009
|
destructiveHint: false,
|
|
7968
8010
|
idempotentHint: true,
|
|
@@ -7975,11 +8017,11 @@ function registerFieldTools(server, getToken, baseUrl) {
|
|
|
7975
8017
|
server.registerTool(
|
|
7976
8018
|
"talonic_field_values",
|
|
7977
8019
|
{
|
|
7978
|
-
title: "Read
|
|
8020
|
+
title: "Read a field's values",
|
|
7979
8021
|
description: VALUES_DESCRIPTION,
|
|
7980
8022
|
inputSchema: fieldValuesInputSchema,
|
|
7981
8023
|
annotations: {
|
|
7982
|
-
title: "Read
|
|
8024
|
+
title: "Read a field's values",
|
|
7983
8025
|
readOnlyHint: true,
|
|
7984
8026
|
destructiveHint: false,
|
|
7985
8027
|
idempotentHint: true,
|
|
@@ -8046,7 +8088,7 @@ var LIST_TOOLS_DESCRIPTION = [
|
|
|
8046
8088
|
"Target API: https://talonic.com/docs/api (GET /v1/agent/tools).",
|
|
8047
8089
|
"",
|
|
8048
8090
|
"USE WHEN: you want a capability talonic_* tools do not cover directly (e.g. SQL over the structured data, a workspace overview, cohort discovery) \u2014 list here, then call talonic_invoke_agent_tool with the tool name and its args.",
|
|
8049
|
-
"NOT FOR:
|
|
8091
|
+
"NOT FOR: answering the user's question about their documents \u2014 call talonic_ask, which runs these same tools server-side in one call and returns a cited answer. Also not for discovering fields (talonic_find_data) or documents (talonic_search).",
|
|
8050
8092
|
"",
|
|
8051
8093
|
"ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
|
|
8052
8094
|
"RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }. Registry tools that already have their own talonic_* tool (find_data) are left out; call the dedicated tool."
|
|
@@ -8080,12 +8122,12 @@ async function handleListAgentTools(getToken, baseUrl, args) {
|
|
|
8080
8122
|
});
|
|
8081
8123
|
}
|
|
8082
8124
|
var INVOKE_DESCRIPTION = [
|
|
8083
|
-
"Invoke ONE named tool from the platform's agent tool registry directly, with no model in the loop
|
|
8125
|
+
"Invoke ONE named tool from the platform's agent tool registry directly, with no model in the loop (e.g. `query_data` for a read-only SQL SELECT over the extracted data, `describe_data` for the queryable field list, `get_document_markdown` to read a document's text).",
|
|
8084
8126
|
"READ-ONLY FOR EVERY CREDENTIAL: the platform runs each caller of this route, API key or OAuth session alike, as its least-privilege viewer role, which grants only the registry's read-only tools (capability `data.read`). Write-capable registry tools are never invocable here, however you connected, so this tool reads and never changes workspace data.",
|
|
8085
8127
|
"Target API: Talonic agent tool registry \u2014 https://talonic.com/docs/api (POST /v1/agent/tools/{name}/invoke; input schemas from talonic_list_agent_tools).",
|
|
8086
8128
|
"",
|
|
8087
8129
|
"USE WHEN: talonic_list_agent_tools showed a tool with can_invoke: true that does what you need. Pass exactly the `args` its input_schema declares.",
|
|
8088
|
-
"NOT FOR:
|
|
8130
|
+
"NOT FOR: answering a question about the documents (talonic_ask runs these tools server-side and returns one cited answer). Use this only for a query the user asked for, or when talonic_ask could not answer.",
|
|
8089
8131
|
"",
|
|
8090
8132
|
"ARGS: `name` (tool name), `args` (object matching the tool's input_schema), optional `document_ids` (hard scope for scope-aware tools).",
|
|
8091
8133
|
"RETURNS: { tool, result (the tool's parsed output), citations?, artifacts?, cards? }. Denied capabilities come back as an error naming the capability required; the platform re-checks every call."
|
|
@@ -8116,11 +8158,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
|
|
|
8116
8158
|
server.registerTool(
|
|
8117
8159
|
"talonic_find_data",
|
|
8118
8160
|
{
|
|
8119
|
-
title: "Find
|
|
8161
|
+
title: "Find where data lives",
|
|
8120
8162
|
description: FIND_DESCRIPTION,
|
|
8121
8163
|
inputSchema: findDataInputSchema,
|
|
8122
8164
|
annotations: {
|
|
8123
|
-
title: "Find
|
|
8165
|
+
title: "Find where data lives",
|
|
8124
8166
|
readOnlyHint: true,
|
|
8125
8167
|
destructiveHint: false,
|
|
8126
8168
|
idempotentHint: true,
|
|
@@ -8134,11 +8176,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
|
|
|
8134
8176
|
server.registerTool(
|
|
8135
8177
|
"talonic_list_agent_tools",
|
|
8136
8178
|
{
|
|
8137
|
-
title: "List
|
|
8179
|
+
title: "List data tools",
|
|
8138
8180
|
description: LIST_TOOLS_DESCRIPTION,
|
|
8139
8181
|
inputSchema: listAgentToolsInputSchema,
|
|
8140
8182
|
annotations: {
|
|
8141
|
-
title: "List
|
|
8183
|
+
title: "List data tools",
|
|
8142
8184
|
readOnlyHint: true,
|
|
8143
8185
|
destructiveHint: false,
|
|
8144
8186
|
idempotentHint: true,
|
|
@@ -8151,11 +8193,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
|
|
|
8151
8193
|
server.registerTool(
|
|
8152
8194
|
"talonic_invoke_agent_tool",
|
|
8153
8195
|
{
|
|
8154
|
-
title: "
|
|
8196
|
+
title: "Query workspace data",
|
|
8155
8197
|
description: INVOKE_DESCRIPTION,
|
|
8156
8198
|
inputSchema: invokeAgentToolInputSchema,
|
|
8157
8199
|
annotations: {
|
|
8158
|
-
title: "
|
|
8200
|
+
title: "Query workspace data",
|
|
8159
8201
|
readOnlyHint: true,
|
|
8160
8202
|
destructiveHint: false,
|
|
8161
8203
|
idempotentHint: false,
|
|
@@ -8170,7 +8212,7 @@ var LIST_DESCRIPTION4 = [
|
|
|
8170
8212
|
"List the workspace's Specs. A Spec is a saved extraction pipeline: an ordered list of processing steps plus the fields it produces; talonic_run_spec runs it over documents. Each row: id, name, description, schema_id (the schema the run's output rows follow \u2014 a DIFFERENT id from the Spec's), version / materialized_version (the published version runs use; null = never published), field_count, node_count, timestamps.",
|
|
8171
8213
|
"",
|
|
8172
8214
|
"USE WHEN: the user wants to run 'their pipeline' / 'the invoice Spec', or you need a spec_id for talonic_run_spec / talonic_get_spec.",
|
|
8173
|
-
"NOT FOR: ad-hoc extraction schemas (talonic_list_schemas) or discovering fields (talonic_list_fields).",
|
|
8215
|
+
"NOT FOR: ad-hoc extraction schemas (talonic_list_schemas) or discovering fields (talonic_list_fields). Not a warm-up before answering a question about the documents: call talonic_ask for that.",
|
|
8174
8216
|
"ARGS: optional `search` (name contains, case-insensitive), `limit` (1\u2013100, default 20), `cursor` (from pagination.next_cursor), `order` (asc|desc by updated_at).",
|
|
8175
8217
|
"RETURNS: { data[] of { id, name, description, schema_id, version, materialized_version, materialized_at, field_count, node_count, created_at, updated_at, links }, pagination { total, limit, has_more, next_cursor } }."
|
|
8176
8218
|
].join("\n");
|
|
@@ -8225,10 +8267,10 @@ function registerSpecTools(server, getToken, baseUrl) {
|
|
|
8225
8267
|
server.registerTool(
|
|
8226
8268
|
"talonic_list_specs",
|
|
8227
8269
|
{
|
|
8228
|
-
title: "List
|
|
8270
|
+
title: "List pipelines",
|
|
8229
8271
|
description: LIST_DESCRIPTION4,
|
|
8230
8272
|
inputSchema: listSpecsInputSchema,
|
|
8231
|
-
annotations: { title: "List
|
|
8273
|
+
annotations: { title: "List pipelines", ...READ_ONLY4 },
|
|
8232
8274
|
_meta: widgetToolMeta("listSpecs")
|
|
8233
8275
|
},
|
|
8234
8276
|
async (args) => handleListSpecs(getToken, baseUrl, args)
|
|
@@ -8236,10 +8278,10 @@ function registerSpecTools(server, getToken, baseUrl) {
|
|
|
8236
8278
|
server.registerTool(
|
|
8237
8279
|
"talonic_get_spec",
|
|
8238
8280
|
{
|
|
8239
|
-
title: "
|
|
8281
|
+
title: "Look up a pipeline",
|
|
8240
8282
|
description: GET_DESCRIPTION3,
|
|
8241
8283
|
inputSchema: getSpecInputSchema,
|
|
8242
|
-
annotations: { title: "
|
|
8284
|
+
annotations: { title: "Look up a pipeline", ...READ_ONLY4 },
|
|
8243
8285
|
_meta: widgetToolMeta("getSpec")
|
|
8244
8286
|
},
|
|
8245
8287
|
async (args) => handleGetSpec(getToken, baseUrl, args)
|
|
@@ -8465,11 +8507,11 @@ function registerRunTools(server, getToken, baseUrl) {
|
|
|
8465
8507
|
server.registerTool(
|
|
8466
8508
|
"talonic_run_spec",
|
|
8467
8509
|
{
|
|
8468
|
-
title: "Run a
|
|
8510
|
+
title: "Run a pipeline",
|
|
8469
8511
|
description: RUN_DESCRIPTION2,
|
|
8470
8512
|
inputSchema: runSpecInputSchema,
|
|
8471
8513
|
annotations: {
|
|
8472
|
-
title: "Run a
|
|
8514
|
+
title: "Run a pipeline",
|
|
8473
8515
|
readOnlyHint: false,
|
|
8474
8516
|
destructiveHint: false,
|
|
8475
8517
|
openWorldHint: true
|
|
@@ -8481,10 +8523,10 @@ function registerRunTools(server, getToken, baseUrl) {
|
|
|
8481
8523
|
server.registerTool(
|
|
8482
8524
|
"talonic_get_run",
|
|
8483
8525
|
{
|
|
8484
|
-
title: "
|
|
8526
|
+
title: "Check run progress",
|
|
8485
8527
|
description: GET_RUN_DESCRIPTION,
|
|
8486
8528
|
inputSchema: runRefInputSchema,
|
|
8487
|
-
annotations: { title: "
|
|
8529
|
+
annotations: { title: "Check run progress", ...READ_ONLY5 },
|
|
8488
8530
|
_meta: widgetToolMeta("getRun")
|
|
8489
8531
|
},
|
|
8490
8532
|
async (args) => handleGetRun(getToken, baseUrl, args)
|
|
@@ -8492,10 +8534,10 @@ function registerRunTools(server, getToken, baseUrl) {
|
|
|
8492
8534
|
server.registerTool(
|
|
8493
8535
|
"talonic_get_run_results",
|
|
8494
8536
|
{
|
|
8495
|
-
title: "Read
|
|
8537
|
+
title: "Read run results",
|
|
8496
8538
|
description: RESULTS_DESCRIPTION,
|
|
8497
8539
|
inputSchema: resultsInputSchema,
|
|
8498
|
-
annotations: { title: "Read
|
|
8540
|
+
annotations: { title: "Read run results", ...READ_ONLY5 },
|
|
8499
8541
|
_meta: widgetToolMeta("getRunResults")
|
|
8500
8542
|
},
|
|
8501
8543
|
async (args) => handleGetRunResults(getToken, baseUrl, args)
|
|
@@ -8508,7 +8550,7 @@ var POLL_HINT = "still processing \u2014 call talonic_get_answer with this ask_i
|
|
|
8508
8550
|
var ASK_DESCRIPTION = [
|
|
8509
8551
|
"Ask a natural-language question over the workspace's documents and get a cited, verified answer (markdown). The Talonic agent plans over the workspace's extracted fields, runs read-only SQL over extracted cells, reads document text, and grounds every load-bearing claim in a source span. Consumes credits.",
|
|
8510
8552
|
"",
|
|
8511
|
-
"USE WHEN: the user asks
|
|
8553
|
+
"USE WHEN (the default for questions): the user asks anything about what their documents contain \u2014 counts, totals, duplicates, comparisons, anomalies ('which vendors invoiced us twice in May?'), or a summary across documents. One call replaces exploring fields, schemas, specs and SQL yourself; skip that exploration.",
|
|
8512
8554
|
"NOT FOR: reading a known field's values (talonic_field_values, free) or filtering documents by a known value (talonic_filter, free); locating which field holds a concept (talonic_find_data).",
|
|
8513
8555
|
"ARGS: `question`; optional `scope` { document_ids[], schema_id, pipeline_id, data_product_id, document_type, source_id, tags[], ingested_after, ingested_before } (ANDed), `conversation_id` (continue a thread), `output_format` { instruction, template }, `wait_seconds` (0\u201355, default 45).",
|
|
8514
8556
|
"RETURNS: { ask_id, status ('completed'|'processing'|'error'), conversation_id, answer (markdown), citations[] { quote, document_id, kind, filename, app_url }, verification { verdict, checks_total, checks_unsupported, correction }, usage { tokens, credits_charged }, tool_calls, artifacts[], waited_ms }. If status is still 'processing' after the wait, call talonic_get_answer with the ask_id."
|
|
@@ -8608,11 +8650,11 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8608
8650
|
server.registerTool(
|
|
8609
8651
|
"talonic_ask",
|
|
8610
8652
|
{
|
|
8611
|
-
title: "Ask
|
|
8653
|
+
title: "Ask your documents",
|
|
8612
8654
|
description: ASK_DESCRIPTION,
|
|
8613
8655
|
inputSchema: askInputSchema,
|
|
8614
8656
|
annotations: {
|
|
8615
|
-
title: "Ask
|
|
8657
|
+
title: "Ask your documents",
|
|
8616
8658
|
readOnlyHint: false,
|
|
8617
8659
|
destructiveHint: false,
|
|
8618
8660
|
openWorldHint: false
|
|
@@ -8624,11 +8666,11 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8624
8666
|
server.registerTool(
|
|
8625
8667
|
"talonic_get_answer",
|
|
8626
8668
|
{
|
|
8627
|
-
title: "
|
|
8669
|
+
title: "Get the answer",
|
|
8628
8670
|
description: GET_ANSWER_DESCRIPTION,
|
|
8629
8671
|
inputSchema: { ask_id: uuid2.describe("From talonic_ask.") },
|
|
8630
8672
|
annotations: {
|
|
8631
|
-
title: "
|
|
8673
|
+
title: "Get the answer",
|
|
8632
8674
|
readOnlyHint: true,
|
|
8633
8675
|
destructiveHint: false,
|
|
8634
8676
|
idempotentHint: true,
|
|
@@ -8642,7 +8684,7 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8642
8684
|
|
|
8643
8685
|
// package.json
|
|
8644
8686
|
var package_default = {
|
|
8645
|
-
version: "0.1.
|
|
8687
|
+
version: "0.1.98"};
|
|
8646
8688
|
|
|
8647
8689
|
// src/version.ts
|
|
8648
8690
|
var VERSION = package_default.version;
|
|
@@ -8667,6 +8709,9 @@ function buildServerInstructions(opts) {
|
|
|
8667
8709
|
"schema-validated JSON with per-field confidence scores and source provenance, and",
|
|
8668
8710
|
"answers questions about the documents in the user's Talonic workspace.",
|
|
8669
8711
|
"Which tool for which question:",
|
|
8712
|
+
"(0) any question about what the documents contain (counts, totals, duplicates,",
|
|
8713
|
+
"comparisons, anomalies) -> talonic_ask FIRST, in one call; do not explore fields,",
|
|
8714
|
+
"schemas, specs or SQL to answer it yourself;",
|
|
8670
8715
|
"(1) a document by name or keyword -> talonic_search (literal keywords: one short term",
|
|
8671
8716
|
"or an exact filename; on an empty result retry with a shorter keyword), then use the",
|
|
8672
8717
|
"returned document_id;",
|