@talonic/mcp 0.1.97 → 0.1.99
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 +18 -0
- package/dist/http-server.js +96 -66
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +96 -66
- package/dist/index.js.map +1 -1
- package/dist/server.js +96 -66
- package/dist/server.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -573,6 +573,33 @@ var BASE_CSS = `
|
|
|
573
573
|
details.tree > summary { cursor: pointer; font-size: 13px; list-style: none; }
|
|
574
574
|
details.tree > summary::before { content: "\u25B8 "; color: var(--muted); }
|
|
575
575
|
details.tree[open] > summary::before { content: "\u25BE "; }
|
|
576
|
+
.loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--muted); }
|
|
577
|
+
.tl-mark { color: var(--accent); }
|
|
578
|
+
.tl-mark g, .tl-mark circle { transform-box: view-box; transform-origin: 0 0; }
|
|
579
|
+
.tl-layer { fill: none; stroke: currentColor; stroke-width: 20; stroke-linecap: round; }
|
|
580
|
+
.tl-spin { animation: tl-spin 4s infinite; }
|
|
581
|
+
.tl-core { animation: tl-core 4s infinite; }
|
|
582
|
+
.tl-arm { animation: tl-arm 4s infinite; animation-delay: calc(4s * var(--i) * -0.0075); }
|
|
583
|
+
@keyframes tl-spin {
|
|
584
|
+
0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
|
|
585
|
+
42% { transform: rotate(560deg); animation-timing-function: linear; }
|
|
586
|
+
58% { transform: rotate(860deg); animation-timing-function: cubic-bezier(.1, .6, .25, 1); }
|
|
587
|
+
100% { transform: rotate(1080deg); }
|
|
588
|
+
}
|
|
589
|
+
@keyframes tl-arm {
|
|
590
|
+
0%, 24% { transform: scale(1); animation-timing-function: cubic-bezier(.6, 0, .85, .3); }
|
|
591
|
+
48% { transform: scale(.06); animation-timing-function: linear; }
|
|
592
|
+
60% { transform: scale(.06); animation-timing-function: cubic-bezier(.2, 1.5, .35, 1); }
|
|
593
|
+
84%, 100% { transform: scale(1); }
|
|
594
|
+
}
|
|
595
|
+
@keyframes tl-core {
|
|
596
|
+
0%, 28% { transform: scale(1); animation-timing-function: cubic-bezier(.6, 0, .85, .3); }
|
|
597
|
+
48% { transform: scale(.5); animation-timing-function: ease-in-out; }
|
|
598
|
+
58% { transform: scale(.44); animation-timing-function: cubic-bezier(.2, 1.6, .4, 1); }
|
|
599
|
+
74% { transform: scale(1.1); animation-timing-function: ease-in-out; }
|
|
600
|
+
88%, 100% { transform: scale(1); }
|
|
601
|
+
}
|
|
602
|
+
@media (prefers-reduced-motion: reduce) { .tl-spin, .tl-core, .tl-arm { animation: none; } }
|
|
576
603
|
`;
|
|
577
604
|
var HELPERS_JS = `
|
|
578
605
|
var root = document.getElementById("root");
|
|
@@ -821,7 +848,7 @@ ${opts.css ?? ""}
|
|
|
821
848
|
</style>
|
|
822
849
|
</head>
|
|
823
850
|
<body>
|
|
824
|
-
<div id="root" class="root"><div class="
|
|
851
|
+
<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>
|
|
825
852
|
<script>
|
|
826
853
|
(function () {
|
|
827
854
|
${HELPERS_JS}
|
|
@@ -2445,12 +2472,12 @@ function registerExtract(server, getTalonic, opts = {}) {
|
|
|
2445
2472
|
server.registerTool(
|
|
2446
2473
|
"talonic_extract",
|
|
2447
2474
|
{
|
|
2448
|
-
title: "Extract
|
|
2475
|
+
title: "Extract data",
|
|
2449
2476
|
description: DESCRIPTION,
|
|
2450
2477
|
inputSchema: opts.localFiles ? inputSchema : hostedInputSchema,
|
|
2451
2478
|
outputSchema,
|
|
2452
2479
|
annotations: {
|
|
2453
|
-
title: "Extract
|
|
2480
|
+
title: "Extract data",
|
|
2454
2481
|
readOnlyHint: false,
|
|
2455
2482
|
destructiveHint: false,
|
|
2456
2483
|
openWorldHint: true
|
|
@@ -2574,12 +2601,12 @@ function registerFilter(server, getTalonic) {
|
|
|
2574
2601
|
server.registerTool(
|
|
2575
2602
|
"talonic_filter",
|
|
2576
2603
|
{
|
|
2577
|
-
title: "Filter
|
|
2604
|
+
title: "Filter documents",
|
|
2578
2605
|
description: DESCRIPTION2,
|
|
2579
2606
|
inputSchema: inputSchema2,
|
|
2580
2607
|
outputSchema: outputSchema2,
|
|
2581
2608
|
annotations: {
|
|
2582
|
-
title: "Filter
|
|
2609
|
+
title: "Filter documents",
|
|
2583
2610
|
readOnlyHint: true,
|
|
2584
2611
|
destructiveHint: false,
|
|
2585
2612
|
openWorldHint: false
|
|
@@ -2620,12 +2647,12 @@ function registerGetBalance(server, getTalonic) {
|
|
|
2620
2647
|
server.registerTool(
|
|
2621
2648
|
"talonic_get_balance",
|
|
2622
2649
|
{
|
|
2623
|
-
title: "
|
|
2650
|
+
title: "Check credit balance",
|
|
2624
2651
|
description: DESCRIPTION3,
|
|
2625
2652
|
inputSchema: inputSchema3,
|
|
2626
2653
|
outputSchema: outputSchema3,
|
|
2627
2654
|
annotations: {
|
|
2628
|
-
title: "
|
|
2655
|
+
title: "Check credit balance",
|
|
2629
2656
|
readOnlyHint: true,
|
|
2630
2657
|
destructiveHint: false,
|
|
2631
2658
|
openWorldHint: false
|
|
@@ -2672,12 +2699,12 @@ function registerGetPricing(server, getTalonic) {
|
|
|
2672
2699
|
server.registerTool(
|
|
2673
2700
|
"talonic_get_pricing",
|
|
2674
2701
|
{
|
|
2675
|
-
title: "
|
|
2702
|
+
title: "Check pricing",
|
|
2676
2703
|
description: DESCRIPTION4,
|
|
2677
2704
|
inputSchema: inputSchema4,
|
|
2678
2705
|
outputSchema: outputSchema4,
|
|
2679
2706
|
annotations: {
|
|
2680
|
-
title: "
|
|
2707
|
+
title: "Check pricing",
|
|
2681
2708
|
readOnlyHint: true,
|
|
2682
2709
|
destructiveHint: false,
|
|
2683
2710
|
openWorldHint: false
|
|
@@ -2721,12 +2748,12 @@ function registerGetUsage(server, getTalonic) {
|
|
|
2721
2748
|
server.registerTool(
|
|
2722
2749
|
"talonic_get_usage",
|
|
2723
2750
|
{
|
|
2724
|
-
title: "
|
|
2751
|
+
title: "Check credit usage",
|
|
2725
2752
|
description: DESCRIPTION5,
|
|
2726
2753
|
inputSchema: inputSchema5,
|
|
2727
2754
|
outputSchema: outputSchema5,
|
|
2728
2755
|
annotations: {
|
|
2729
|
-
title: "
|
|
2756
|
+
title: "Check credit usage",
|
|
2730
2757
|
readOnlyHint: true,
|
|
2731
2758
|
destructiveHint: false,
|
|
2732
2759
|
openWorldHint: false
|
|
@@ -2812,12 +2839,12 @@ function registerGetDocument(server, getTalonic) {
|
|
|
2812
2839
|
server.registerTool(
|
|
2813
2840
|
"talonic_get_document",
|
|
2814
2841
|
{
|
|
2815
|
-
title: "
|
|
2842
|
+
title: "Look up a document",
|
|
2816
2843
|
description: DESCRIPTION6,
|
|
2817
2844
|
inputSchema: inputSchema6,
|
|
2818
2845
|
outputSchema: outputSchema6,
|
|
2819
2846
|
annotations: {
|
|
2820
|
-
title: "
|
|
2847
|
+
title: "Look up a document",
|
|
2821
2848
|
readOnlyHint: true,
|
|
2822
2849
|
destructiveHint: false,
|
|
2823
2850
|
openWorldHint: false
|
|
@@ -2831,7 +2858,7 @@ var DESCRIPTION7 = [
|
|
|
2831
2858
|
"List the saved schemas in the workspace as compact summaries (id, short_id, name, description, version, field_count).",
|
|
2832
2859
|
"",
|
|
2833
2860
|
"USE WHEN: 'what schemas do I have', or to find a reusable schema before extracting.",
|
|
2834
|
-
"NOT FOR: a one-off extraction with an inline schema (call talonic_extract directly).",
|
|
2861
|
+
"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.",
|
|
2835
2862
|
"ARGS: none.",
|
|
2836
2863
|
"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`."
|
|
2837
2864
|
].join("\n");
|
|
@@ -2882,12 +2909,12 @@ function registerListSchemas(server, getTalonic) {
|
|
|
2882
2909
|
server.registerTool(
|
|
2883
2910
|
"talonic_list_schemas",
|
|
2884
2911
|
{
|
|
2885
|
-
title: "List
|
|
2912
|
+
title: "List saved schemas",
|
|
2886
2913
|
description: DESCRIPTION7,
|
|
2887
2914
|
inputSchema: {},
|
|
2888
2915
|
outputSchema: outputSchema7,
|
|
2889
2916
|
annotations: {
|
|
2890
|
-
title: "List
|
|
2917
|
+
title: "List saved schemas",
|
|
2891
2918
|
readOnlyHint: true,
|
|
2892
2919
|
destructiveHint: false,
|
|
2893
2920
|
openWorldHint: false
|
|
@@ -2917,13 +2944,13 @@ function registerGetSchema(server, getTalonic) {
|
|
|
2917
2944
|
server.registerTool(
|
|
2918
2945
|
"talonic_get_schema",
|
|
2919
2946
|
{
|
|
2920
|
-
title: "
|
|
2947
|
+
title: "Read a schema's fields",
|
|
2921
2948
|
description: GET_DESCRIPTION,
|
|
2922
2949
|
inputSchema: {
|
|
2923
2950
|
schema_id: z.string().min(1).describe("Schema id (UUID) or short_id (SCH-XXXXXXXX) from talonic_list_schemas.")
|
|
2924
2951
|
},
|
|
2925
2952
|
annotations: {
|
|
2926
|
-
title: "
|
|
2953
|
+
title: "Read a schema's fields",
|
|
2927
2954
|
readOnlyHint: true,
|
|
2928
2955
|
destructiveHint: false,
|
|
2929
2956
|
idempotentHint: true,
|
|
@@ -2983,12 +3010,12 @@ function registerSaveSchema(server, getTalonic) {
|
|
|
2983
3010
|
server.registerTool(
|
|
2984
3011
|
"talonic_save_schema",
|
|
2985
3012
|
{
|
|
2986
|
-
title: "Save
|
|
3013
|
+
title: "Save a schema",
|
|
2987
3014
|
description: DESCRIPTION8,
|
|
2988
3015
|
inputSchema: inputSchema7,
|
|
2989
3016
|
outputSchema: outputSchema8,
|
|
2990
3017
|
annotations: {
|
|
2991
|
-
title: "Save
|
|
3018
|
+
title: "Save a schema",
|
|
2992
3019
|
readOnlyHint: false,
|
|
2993
3020
|
destructiveHint: false,
|
|
2994
3021
|
openWorldHint: false
|
|
@@ -3081,12 +3108,12 @@ function registerSearch(server, getTalonic) {
|
|
|
3081
3108
|
server.registerTool(
|
|
3082
3109
|
"talonic_search",
|
|
3083
3110
|
{
|
|
3084
|
-
title: "Search
|
|
3111
|
+
title: "Search documents",
|
|
3085
3112
|
description: DESCRIPTION9,
|
|
3086
3113
|
inputSchema: inputSchema8,
|
|
3087
3114
|
outputSchema: outputSchema9,
|
|
3088
3115
|
annotations: {
|
|
3089
|
-
title: "Search
|
|
3116
|
+
title: "Search documents",
|
|
3090
3117
|
readOnlyHint: true,
|
|
3091
3118
|
destructiveHint: false,
|
|
3092
3119
|
openWorldHint: false
|
|
@@ -3159,12 +3186,12 @@ function registerRequestUpload(server, getToken, baseUrl) {
|
|
|
3159
3186
|
server.registerTool(
|
|
3160
3187
|
"talonic_request_upload",
|
|
3161
3188
|
{
|
|
3162
|
-
title: "
|
|
3189
|
+
title: "Get an upload link",
|
|
3163
3190
|
description: DESCRIPTION10,
|
|
3164
3191
|
inputSchema: inputSchema9,
|
|
3165
3192
|
outputSchema: outputSchema10,
|
|
3166
3193
|
annotations: {
|
|
3167
|
-
title: "
|
|
3194
|
+
title: "Get an upload link",
|
|
3168
3195
|
readOnlyHint: false,
|
|
3169
3196
|
destructiveHint: false,
|
|
3170
3197
|
openWorldHint: false
|
|
@@ -3178,7 +3205,7 @@ var LIST_DESCRIPTION = [
|
|
|
3178
3205
|
"List the workspace's accounts: the companies (portfolio companies, clients, entities) whose documents it keeps apart.",
|
|
3179
3206
|
"",
|
|
3180
3207
|
"USE WHEN: before uploading a company's files (pass its name as `account` on talonic_request_upload), or to see which companies exist.",
|
|
3181
|
-
"NOT FOR: listing documents (talonic_search / talonic_filter) \xB7 creating an account (talonic_create_account).",
|
|
3208
|
+
"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.",
|
|
3182
3209
|
"ARGS: none.",
|
|
3183
3210
|
"RETURNS: data[] of { id, name, aliases[], description, created_at }."
|
|
3184
3211
|
].join("\n");
|
|
@@ -3228,13 +3255,13 @@ function registerAccounts(server, getToken, baseUrl) {
|
|
|
3228
3255
|
server.registerTool(
|
|
3229
3256
|
"talonic_list_accounts",
|
|
3230
3257
|
{
|
|
3231
|
-
title: "List
|
|
3258
|
+
title: "List companies",
|
|
3232
3259
|
description: LIST_DESCRIPTION,
|
|
3233
3260
|
inputSchema: {},
|
|
3234
3261
|
outputSchema: { data: z.array(z.object(accountShape)).describe("The workspace's accounts.") },
|
|
3235
3262
|
_meta: widgetToolMeta("listAccounts"),
|
|
3236
3263
|
annotations: {
|
|
3237
|
-
title: "List
|
|
3264
|
+
title: "List companies",
|
|
3238
3265
|
readOnlyHint: true,
|
|
3239
3266
|
destructiveHint: false,
|
|
3240
3267
|
openWorldHint: false
|
|
@@ -3245,7 +3272,7 @@ function registerAccounts(server, getToken, baseUrl) {
|
|
|
3245
3272
|
server.registerTool(
|
|
3246
3273
|
"talonic_create_account",
|
|
3247
3274
|
{
|
|
3248
|
-
title: "
|
|
3275
|
+
title: "Add a company",
|
|
3249
3276
|
description: CREATE_DESCRIPTION,
|
|
3250
3277
|
inputSchema: {
|
|
3251
3278
|
name: z.string().min(1).max(255).describe("Company name, e.g. 'Filu'."),
|
|
@@ -3255,7 +3282,7 @@ function registerAccounts(server, getToken, baseUrl) {
|
|
|
3255
3282
|
outputSchema: accountShape,
|
|
3256
3283
|
_meta: widgetToolMeta("createAccount"),
|
|
3257
3284
|
annotations: {
|
|
3258
|
-
title: "
|
|
3285
|
+
title: "Add a company",
|
|
3259
3286
|
readOnlyHint: false,
|
|
3260
3287
|
destructiveHint: false,
|
|
3261
3288
|
idempotentHint: false,
|
|
@@ -7367,13 +7394,13 @@ function registerAppsTools(server, getToken, baseUrl) {
|
|
|
7367
7394
|
server.registerTool(
|
|
7368
7395
|
"talonic_list_apps",
|
|
7369
7396
|
{
|
|
7370
|
-
title: "List
|
|
7397
|
+
title: "List apps",
|
|
7371
7398
|
description: LIST_APPS_DESCRIPTION,
|
|
7372
7399
|
inputSchema: {
|
|
7373
7400
|
enabled_only: z.boolean().optional().describe("Only enabled apps (default true). Pass false to include disabled ones.")
|
|
7374
7401
|
},
|
|
7375
7402
|
annotations: {
|
|
7376
|
-
title: "List
|
|
7403
|
+
title: "List apps",
|
|
7377
7404
|
readOnlyHint: true,
|
|
7378
7405
|
destructiveHint: false,
|
|
7379
7406
|
idempotentHint: true,
|
|
@@ -7747,12 +7774,12 @@ function registerToMarkdown(server, getTalonic, opts = {}) {
|
|
|
7747
7774
|
server.registerTool(
|
|
7748
7775
|
"talonic_to_markdown",
|
|
7749
7776
|
{
|
|
7750
|
-
title: "
|
|
7777
|
+
title: "Read document text",
|
|
7751
7778
|
description: DESCRIPTION11,
|
|
7752
7779
|
inputSchema: opts.localFiles ? inputSchema10 : hostedInputSchema,
|
|
7753
7780
|
outputSchema: outputSchema11,
|
|
7754
7781
|
annotations: {
|
|
7755
|
-
title: "
|
|
7782
|
+
title: "Read document text",
|
|
7756
7783
|
readOnlyHint: false,
|
|
7757
7784
|
destructiveHint: false,
|
|
7758
7785
|
openWorldHint: true
|
|
@@ -7784,7 +7811,7 @@ var LIST_DESCRIPTION3 = [
|
|
|
7784
7811
|
"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.",
|
|
7785
7812
|
"",
|
|
7786
7813
|
"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.",
|
|
7787
|
-
"NOT FOR: locating a specific document (talonic_search) or filtering documents by a value (talonic_filter).",
|
|
7814
|
+
"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.",
|
|
7788
7815
|
"",
|
|
7789
7816
|
"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`.",
|
|
7790
7817
|
"RETURNS: data[] of { id, canonical_name, display_name, data_type, maturity, tier, synonyms, description, occurrence_count, superseded_by, links } plus cursor pagination."
|
|
@@ -7893,11 +7920,11 @@ function registerFieldTools(server, getToken, baseUrl) {
|
|
|
7893
7920
|
server.registerTool(
|
|
7894
7921
|
"talonic_list_fields",
|
|
7895
7922
|
{
|
|
7896
|
-
title: "List
|
|
7923
|
+
title: "List fields",
|
|
7897
7924
|
description: LIST_DESCRIPTION3,
|
|
7898
7925
|
inputSchema: listFieldsInputSchema,
|
|
7899
7926
|
annotations: {
|
|
7900
|
-
title: "List
|
|
7927
|
+
title: "List fields",
|
|
7901
7928
|
readOnlyHint: true,
|
|
7902
7929
|
destructiveHint: false,
|
|
7903
7930
|
idempotentHint: true,
|
|
@@ -7910,11 +7937,11 @@ function registerFieldTools(server, getToken, baseUrl) {
|
|
|
7910
7937
|
server.registerTool(
|
|
7911
7938
|
"talonic_get_field",
|
|
7912
7939
|
{
|
|
7913
|
-
title: "
|
|
7940
|
+
title: "Look up a field",
|
|
7914
7941
|
description: GET_DESCRIPTION2,
|
|
7915
7942
|
inputSchema: getFieldInputSchema,
|
|
7916
7943
|
annotations: {
|
|
7917
|
-
title: "
|
|
7944
|
+
title: "Look up a field",
|
|
7918
7945
|
readOnlyHint: true,
|
|
7919
7946
|
destructiveHint: false,
|
|
7920
7947
|
idempotentHint: true,
|
|
@@ -7927,11 +7954,11 @@ function registerFieldTools(server, getToken, baseUrl) {
|
|
|
7927
7954
|
server.registerTool(
|
|
7928
7955
|
"talonic_field_values",
|
|
7929
7956
|
{
|
|
7930
|
-
title: "Read
|
|
7957
|
+
title: "Read a field's values",
|
|
7931
7958
|
description: VALUES_DESCRIPTION,
|
|
7932
7959
|
inputSchema: fieldValuesInputSchema,
|
|
7933
7960
|
annotations: {
|
|
7934
|
-
title: "Read
|
|
7961
|
+
title: "Read a field's values",
|
|
7935
7962
|
readOnlyHint: true,
|
|
7936
7963
|
destructiveHint: false,
|
|
7937
7964
|
idempotentHint: true,
|
|
@@ -7998,7 +8025,7 @@ var LIST_TOOLS_DESCRIPTION = [
|
|
|
7998
8025
|
"Target API: https://talonic.com/docs/api (GET /v1/agent/tools).",
|
|
7999
8026
|
"",
|
|
8000
8027
|
"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.",
|
|
8001
|
-
"NOT FOR:
|
|
8028
|
+
"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).",
|
|
8002
8029
|
"",
|
|
8003
8030
|
"ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
|
|
8004
8031
|
"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."
|
|
@@ -8032,12 +8059,12 @@ async function handleListAgentTools(getToken, baseUrl, args) {
|
|
|
8032
8059
|
});
|
|
8033
8060
|
}
|
|
8034
8061
|
var INVOKE_DESCRIPTION = [
|
|
8035
|
-
"Invoke ONE named tool from the platform's agent tool registry directly, with no model in the loop
|
|
8062
|
+
"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).",
|
|
8036
8063
|
"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.",
|
|
8037
8064
|
"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).",
|
|
8038
8065
|
"",
|
|
8039
8066
|
"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.",
|
|
8040
|
-
"NOT FOR:
|
|
8067
|
+
"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.",
|
|
8041
8068
|
"",
|
|
8042
8069
|
"ARGS: `name` (tool name), `args` (object matching the tool's input_schema), optional `document_ids` (hard scope for scope-aware tools).",
|
|
8043
8070
|
"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."
|
|
@@ -8068,11 +8095,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
|
|
|
8068
8095
|
server.registerTool(
|
|
8069
8096
|
"talonic_find_data",
|
|
8070
8097
|
{
|
|
8071
|
-
title: "Find
|
|
8098
|
+
title: "Find where data lives",
|
|
8072
8099
|
description: FIND_DESCRIPTION,
|
|
8073
8100
|
inputSchema: findDataInputSchema,
|
|
8074
8101
|
annotations: {
|
|
8075
|
-
title: "Find
|
|
8102
|
+
title: "Find where data lives",
|
|
8076
8103
|
readOnlyHint: true,
|
|
8077
8104
|
destructiveHint: false,
|
|
8078
8105
|
idempotentHint: true,
|
|
@@ -8086,11 +8113,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
|
|
|
8086
8113
|
server.registerTool(
|
|
8087
8114
|
"talonic_list_agent_tools",
|
|
8088
8115
|
{
|
|
8089
|
-
title: "List
|
|
8116
|
+
title: "List data tools",
|
|
8090
8117
|
description: LIST_TOOLS_DESCRIPTION,
|
|
8091
8118
|
inputSchema: listAgentToolsInputSchema,
|
|
8092
8119
|
annotations: {
|
|
8093
|
-
title: "List
|
|
8120
|
+
title: "List data tools",
|
|
8094
8121
|
readOnlyHint: true,
|
|
8095
8122
|
destructiveHint: false,
|
|
8096
8123
|
idempotentHint: true,
|
|
@@ -8103,11 +8130,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
|
|
|
8103
8130
|
server.registerTool(
|
|
8104
8131
|
"talonic_invoke_agent_tool",
|
|
8105
8132
|
{
|
|
8106
|
-
title: "
|
|
8133
|
+
title: "Query workspace data",
|
|
8107
8134
|
description: INVOKE_DESCRIPTION,
|
|
8108
8135
|
inputSchema: invokeAgentToolInputSchema,
|
|
8109
8136
|
annotations: {
|
|
8110
|
-
title: "
|
|
8137
|
+
title: "Query workspace data",
|
|
8111
8138
|
readOnlyHint: true,
|
|
8112
8139
|
destructiveHint: false,
|
|
8113
8140
|
idempotentHint: false,
|
|
@@ -8122,7 +8149,7 @@ var LIST_DESCRIPTION4 = [
|
|
|
8122
8149
|
"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.",
|
|
8123
8150
|
"",
|
|
8124
8151
|
"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.",
|
|
8125
|
-
"NOT FOR: ad-hoc extraction schemas (talonic_list_schemas) or discovering fields (talonic_list_fields).",
|
|
8152
|
+
"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.",
|
|
8126
8153
|
"ARGS: optional `search` (name contains, case-insensitive), `limit` (1\u2013100, default 20), `cursor` (from pagination.next_cursor), `order` (asc|desc by updated_at).",
|
|
8127
8154
|
"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 } }."
|
|
8128
8155
|
].join("\n");
|
|
@@ -8177,10 +8204,10 @@ function registerSpecTools(server, getToken, baseUrl) {
|
|
|
8177
8204
|
server.registerTool(
|
|
8178
8205
|
"talonic_list_specs",
|
|
8179
8206
|
{
|
|
8180
|
-
title: "List
|
|
8207
|
+
title: "List pipelines",
|
|
8181
8208
|
description: LIST_DESCRIPTION4,
|
|
8182
8209
|
inputSchema: listSpecsInputSchema,
|
|
8183
|
-
annotations: { title: "List
|
|
8210
|
+
annotations: { title: "List pipelines", ...READ_ONLY4 },
|
|
8184
8211
|
_meta: widgetToolMeta("listSpecs")
|
|
8185
8212
|
},
|
|
8186
8213
|
async (args) => handleListSpecs(getToken, baseUrl, args)
|
|
@@ -8188,10 +8215,10 @@ function registerSpecTools(server, getToken, baseUrl) {
|
|
|
8188
8215
|
server.registerTool(
|
|
8189
8216
|
"talonic_get_spec",
|
|
8190
8217
|
{
|
|
8191
|
-
title: "
|
|
8218
|
+
title: "Look up a pipeline",
|
|
8192
8219
|
description: GET_DESCRIPTION3,
|
|
8193
8220
|
inputSchema: getSpecInputSchema,
|
|
8194
|
-
annotations: { title: "
|
|
8221
|
+
annotations: { title: "Look up a pipeline", ...READ_ONLY4 },
|
|
8195
8222
|
_meta: widgetToolMeta("getSpec")
|
|
8196
8223
|
},
|
|
8197
8224
|
async (args) => handleGetSpec(getToken, baseUrl, args)
|
|
@@ -8417,11 +8444,11 @@ function registerRunTools(server, getToken, baseUrl) {
|
|
|
8417
8444
|
server.registerTool(
|
|
8418
8445
|
"talonic_run_spec",
|
|
8419
8446
|
{
|
|
8420
|
-
title: "Run a
|
|
8447
|
+
title: "Run a pipeline",
|
|
8421
8448
|
description: RUN_DESCRIPTION2,
|
|
8422
8449
|
inputSchema: runSpecInputSchema,
|
|
8423
8450
|
annotations: {
|
|
8424
|
-
title: "Run a
|
|
8451
|
+
title: "Run a pipeline",
|
|
8425
8452
|
readOnlyHint: false,
|
|
8426
8453
|
destructiveHint: false,
|
|
8427
8454
|
openWorldHint: true
|
|
@@ -8433,10 +8460,10 @@ function registerRunTools(server, getToken, baseUrl) {
|
|
|
8433
8460
|
server.registerTool(
|
|
8434
8461
|
"talonic_get_run",
|
|
8435
8462
|
{
|
|
8436
|
-
title: "
|
|
8463
|
+
title: "Check run progress",
|
|
8437
8464
|
description: GET_RUN_DESCRIPTION,
|
|
8438
8465
|
inputSchema: runRefInputSchema,
|
|
8439
|
-
annotations: { title: "
|
|
8466
|
+
annotations: { title: "Check run progress", ...READ_ONLY5 },
|
|
8440
8467
|
_meta: widgetToolMeta("getRun")
|
|
8441
8468
|
},
|
|
8442
8469
|
async (args) => handleGetRun(getToken, baseUrl, args)
|
|
@@ -8444,10 +8471,10 @@ function registerRunTools(server, getToken, baseUrl) {
|
|
|
8444
8471
|
server.registerTool(
|
|
8445
8472
|
"talonic_get_run_results",
|
|
8446
8473
|
{
|
|
8447
|
-
title: "Read
|
|
8474
|
+
title: "Read run results",
|
|
8448
8475
|
description: RESULTS_DESCRIPTION,
|
|
8449
8476
|
inputSchema: resultsInputSchema,
|
|
8450
|
-
annotations: { title: "Read
|
|
8477
|
+
annotations: { title: "Read run results", ...READ_ONLY5 },
|
|
8451
8478
|
_meta: widgetToolMeta("getRunResults")
|
|
8452
8479
|
},
|
|
8453
8480
|
async (args) => handleGetRunResults(getToken, baseUrl, args)
|
|
@@ -8460,7 +8487,7 @@ var POLL_HINT = "still processing \u2014 call talonic_get_answer with this ask_i
|
|
|
8460
8487
|
var ASK_DESCRIPTION = [
|
|
8461
8488
|
"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.",
|
|
8462
8489
|
"",
|
|
8463
|
-
"USE WHEN: the user asks
|
|
8490
|
+
"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.",
|
|
8464
8491
|
"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).",
|
|
8465
8492
|
"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).",
|
|
8466
8493
|
"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."
|
|
@@ -8560,11 +8587,11 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8560
8587
|
server.registerTool(
|
|
8561
8588
|
"talonic_ask",
|
|
8562
8589
|
{
|
|
8563
|
-
title: "Ask
|
|
8590
|
+
title: "Ask your documents",
|
|
8564
8591
|
description: ASK_DESCRIPTION,
|
|
8565
8592
|
inputSchema: askInputSchema,
|
|
8566
8593
|
annotations: {
|
|
8567
|
-
title: "Ask
|
|
8594
|
+
title: "Ask your documents",
|
|
8568
8595
|
readOnlyHint: false,
|
|
8569
8596
|
destructiveHint: false,
|
|
8570
8597
|
openWorldHint: false
|
|
@@ -8576,11 +8603,11 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8576
8603
|
server.registerTool(
|
|
8577
8604
|
"talonic_get_answer",
|
|
8578
8605
|
{
|
|
8579
|
-
title: "
|
|
8606
|
+
title: "Get the answer",
|
|
8580
8607
|
description: GET_ANSWER_DESCRIPTION,
|
|
8581
8608
|
inputSchema: { ask_id: uuid2.describe("From talonic_ask.") },
|
|
8582
8609
|
annotations: {
|
|
8583
|
-
title: "
|
|
8610
|
+
title: "Get the answer",
|
|
8584
8611
|
readOnlyHint: true,
|
|
8585
8612
|
destructiveHint: false,
|
|
8586
8613
|
idempotentHint: true,
|
|
@@ -8594,7 +8621,7 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
8594
8621
|
|
|
8595
8622
|
// package.json
|
|
8596
8623
|
var package_default = {
|
|
8597
|
-
version: "0.1.
|
|
8624
|
+
version: "0.1.99"};
|
|
8598
8625
|
|
|
8599
8626
|
// src/version.ts
|
|
8600
8627
|
var VERSION = package_default.version;
|
|
@@ -8619,6 +8646,9 @@ function buildServerInstructions(opts) {
|
|
|
8619
8646
|
"schema-validated JSON with per-field confidence scores and source provenance, and",
|
|
8620
8647
|
"answers questions about the documents in the user's Talonic workspace.",
|
|
8621
8648
|
"Which tool for which question:",
|
|
8649
|
+
"(0) any question about what the documents contain (counts, totals, duplicates,",
|
|
8650
|
+
"comparisons, anomalies) -> talonic_ask FIRST, in one call; do not explore fields,",
|
|
8651
|
+
"schemas, specs or SQL to answer it yourself;",
|
|
8622
8652
|
"(1) a document by name or keyword -> talonic_search (literal keywords: one short term",
|
|
8623
8653
|
"or an exact filename; on an empty result retry with a shorter keyword), then use the",
|
|
8624
8654
|
"returned document_id;",
|