@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/dist/server.js CHANGED
@@ -576,6 +576,33 @@ var BASE_CSS = `
576
576
  details.tree > summary { cursor: pointer; font-size: 13px; list-style: none; }
577
577
  details.tree > summary::before { content: "\u25B8 "; color: var(--muted); }
578
578
  details.tree[open] > summary::before { content: "\u25BE "; }
579
+ .loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--muted); }
580
+ .tl-mark { color: var(--accent); }
581
+ .tl-mark g, .tl-mark circle { transform-box: view-box; transform-origin: 0 0; }
582
+ .tl-layer { fill: none; stroke: currentColor; stroke-width: 20; stroke-linecap: round; }
583
+ .tl-spin { animation: tl-spin 4s infinite; }
584
+ .tl-core { animation: tl-core 4s infinite; }
585
+ .tl-arm { animation: tl-arm 4s infinite; animation-delay: calc(4s * var(--i) * -0.0075); }
586
+ @keyframes tl-spin {
587
+ 0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
588
+ 42% { transform: rotate(560deg); animation-timing-function: linear; }
589
+ 58% { transform: rotate(860deg); animation-timing-function: cubic-bezier(.1, .6, .25, 1); }
590
+ 100% { transform: rotate(1080deg); }
591
+ }
592
+ @keyframes tl-arm {
593
+ 0%, 24% { transform: scale(1); animation-timing-function: cubic-bezier(.6, 0, .85, .3); }
594
+ 48% { transform: scale(.06); animation-timing-function: linear; }
595
+ 60% { transform: scale(.06); animation-timing-function: cubic-bezier(.2, 1.5, .35, 1); }
596
+ 84%, 100% { transform: scale(1); }
597
+ }
598
+ @keyframes tl-core {
599
+ 0%, 28% { transform: scale(1); animation-timing-function: cubic-bezier(.6, 0, .85, .3); }
600
+ 48% { transform: scale(.5); animation-timing-function: ease-in-out; }
601
+ 58% { transform: scale(.44); animation-timing-function: cubic-bezier(.2, 1.6, .4, 1); }
602
+ 74% { transform: scale(1.1); animation-timing-function: ease-in-out; }
603
+ 88%, 100% { transform: scale(1); }
604
+ }
605
+ @media (prefers-reduced-motion: reduce) { .tl-spin, .tl-core, .tl-arm { animation: none; } }
579
606
  `;
580
607
  var HELPERS_JS = `
581
608
  var root = document.getElementById("root");
@@ -824,7 +851,7 @@ ${opts.css ?? ""}
824
851
  </style>
825
852
  </head>
826
853
  <body>
827
- <div id="root" class="root"><div class="empty">Loading\u2026</div></div>
854
+ <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>
828
855
  <script>
829
856
  (function () {
830
857
  ${HELPERS_JS}
@@ -2448,12 +2475,12 @@ function registerExtract(server, getTalonic, opts = {}) {
2448
2475
  server.registerTool(
2449
2476
  "talonic_extract",
2450
2477
  {
2451
- title: "Extract Data from Document",
2478
+ title: "Extract data",
2452
2479
  description: DESCRIPTION,
2453
2480
  inputSchema: opts.localFiles ? inputSchema : hostedInputSchema,
2454
2481
  outputSchema,
2455
2482
  annotations: {
2456
- title: "Extract Data from Document",
2483
+ title: "Extract data",
2457
2484
  readOnlyHint: false,
2458
2485
  destructiveHint: false,
2459
2486
  openWorldHint: true
@@ -2577,12 +2604,12 @@ function registerFilter(server, getTalonic) {
2577
2604
  server.registerTool(
2578
2605
  "talonic_filter",
2579
2606
  {
2580
- title: "Filter Talonic Documents",
2607
+ title: "Filter documents",
2581
2608
  description: DESCRIPTION2,
2582
2609
  inputSchema: inputSchema2,
2583
2610
  outputSchema: outputSchema2,
2584
2611
  annotations: {
2585
- title: "Filter Talonic Documents",
2612
+ title: "Filter documents",
2586
2613
  readOnlyHint: true,
2587
2614
  destructiveHint: false,
2588
2615
  openWorldHint: false
@@ -2623,12 +2650,12 @@ function registerGetBalance(server, getTalonic) {
2623
2650
  server.registerTool(
2624
2651
  "talonic_get_balance",
2625
2652
  {
2626
- title: "Get Talonic Credit Balance",
2653
+ title: "Check credit balance",
2627
2654
  description: DESCRIPTION3,
2628
2655
  inputSchema: inputSchema3,
2629
2656
  outputSchema: outputSchema3,
2630
2657
  annotations: {
2631
- title: "Get Talonic Credit Balance",
2658
+ title: "Check credit balance",
2632
2659
  readOnlyHint: true,
2633
2660
  destructiveHint: false,
2634
2661
  openWorldHint: false
@@ -2675,12 +2702,12 @@ function registerGetPricing(server, getTalonic) {
2675
2702
  server.registerTool(
2676
2703
  "talonic_get_pricing",
2677
2704
  {
2678
- title: "Get Talonic Pricing",
2705
+ title: "Check pricing",
2679
2706
  description: DESCRIPTION4,
2680
2707
  inputSchema: inputSchema4,
2681
2708
  outputSchema: outputSchema4,
2682
2709
  annotations: {
2683
- title: "Get Talonic Pricing",
2710
+ title: "Check pricing",
2684
2711
  readOnlyHint: true,
2685
2712
  destructiveHint: false,
2686
2713
  openWorldHint: false
@@ -2724,12 +2751,12 @@ function registerGetUsage(server, getTalonic) {
2724
2751
  server.registerTool(
2725
2752
  "talonic_get_usage",
2726
2753
  {
2727
- title: "Get Talonic Usage",
2754
+ title: "Check credit usage",
2728
2755
  description: DESCRIPTION5,
2729
2756
  inputSchema: inputSchema5,
2730
2757
  outputSchema: outputSchema5,
2731
2758
  annotations: {
2732
- title: "Get Talonic Usage",
2759
+ title: "Check credit usage",
2733
2760
  readOnlyHint: true,
2734
2761
  destructiveHint: false,
2735
2762
  openWorldHint: false
@@ -2815,12 +2842,12 @@ function registerGetDocument(server, getTalonic) {
2815
2842
  server.registerTool(
2816
2843
  "talonic_get_document",
2817
2844
  {
2818
- title: "Get Talonic Document",
2845
+ title: "Look up a document",
2819
2846
  description: DESCRIPTION6,
2820
2847
  inputSchema: inputSchema6,
2821
2848
  outputSchema: outputSchema6,
2822
2849
  annotations: {
2823
- title: "Get Talonic Document",
2850
+ title: "Look up a document",
2824
2851
  readOnlyHint: true,
2825
2852
  destructiveHint: false,
2826
2853
  openWorldHint: false
@@ -2834,7 +2861,7 @@ var DESCRIPTION7 = [
2834
2861
  "List the saved schemas in the workspace as compact summaries (id, short_id, name, description, version, field_count).",
2835
2862
  "",
2836
2863
  "USE WHEN: 'what schemas do I have', or to find a reusable schema before extracting.",
2837
- "NOT FOR: a one-off extraction with an inline schema (call talonic_extract directly).",
2864
+ "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.",
2838
2865
  "ARGS: none.",
2839
2866
  "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`."
2840
2867
  ].join("\n");
@@ -2885,12 +2912,12 @@ function registerListSchemas(server, getTalonic) {
2885
2912
  server.registerTool(
2886
2913
  "talonic_list_schemas",
2887
2914
  {
2888
- title: "List Talonic Schemas",
2915
+ title: "List saved schemas",
2889
2916
  description: DESCRIPTION7,
2890
2917
  inputSchema: {},
2891
2918
  outputSchema: outputSchema7,
2892
2919
  annotations: {
2893
- title: "List Talonic Schemas",
2920
+ title: "List saved schemas",
2894
2921
  readOnlyHint: true,
2895
2922
  destructiveHint: false,
2896
2923
  openWorldHint: false
@@ -2920,13 +2947,13 @@ function registerGetSchema(server, getTalonic) {
2920
2947
  server.registerTool(
2921
2948
  "talonic_get_schema",
2922
2949
  {
2923
- title: "Get Talonic Schema",
2950
+ title: "Read a schema's fields",
2924
2951
  description: GET_DESCRIPTION,
2925
2952
  inputSchema: {
2926
2953
  schema_id: z.string().min(1).describe("Schema id (UUID) or short_id (SCH-XXXXXXXX) from talonic_list_schemas.")
2927
2954
  },
2928
2955
  annotations: {
2929
- title: "Get Talonic Schema",
2956
+ title: "Read a schema's fields",
2930
2957
  readOnlyHint: true,
2931
2958
  destructiveHint: false,
2932
2959
  idempotentHint: true,
@@ -2986,12 +3013,12 @@ function registerSaveSchema(server, getTalonic) {
2986
3013
  server.registerTool(
2987
3014
  "talonic_save_schema",
2988
3015
  {
2989
- title: "Save Talonic Schema",
3016
+ title: "Save a schema",
2990
3017
  description: DESCRIPTION8,
2991
3018
  inputSchema: inputSchema7,
2992
3019
  outputSchema: outputSchema8,
2993
3020
  annotations: {
2994
- title: "Save Talonic Schema",
3021
+ title: "Save a schema",
2995
3022
  readOnlyHint: false,
2996
3023
  destructiveHint: false,
2997
3024
  openWorldHint: false
@@ -3084,12 +3111,12 @@ function registerSearch(server, getTalonic) {
3084
3111
  server.registerTool(
3085
3112
  "talonic_search",
3086
3113
  {
3087
- title: "Search Talonic Workspace",
3114
+ title: "Search documents",
3088
3115
  description: DESCRIPTION9,
3089
3116
  inputSchema: inputSchema8,
3090
3117
  outputSchema: outputSchema9,
3091
3118
  annotations: {
3092
- title: "Search Talonic Workspace",
3119
+ title: "Search documents",
3093
3120
  readOnlyHint: true,
3094
3121
  destructiveHint: false,
3095
3122
  openWorldHint: false
@@ -3162,12 +3189,12 @@ function registerRequestUpload(server, getToken, baseUrl) {
3162
3189
  server.registerTool(
3163
3190
  "talonic_request_upload",
3164
3191
  {
3165
- title: "Request File Upload",
3192
+ title: "Get an upload link",
3166
3193
  description: DESCRIPTION10,
3167
3194
  inputSchema: inputSchema9,
3168
3195
  outputSchema: outputSchema10,
3169
3196
  annotations: {
3170
- title: "Request File Upload",
3197
+ title: "Get an upload link",
3171
3198
  readOnlyHint: false,
3172
3199
  destructiveHint: false,
3173
3200
  openWorldHint: false
@@ -3181,7 +3208,7 @@ var LIST_DESCRIPTION = [
3181
3208
  "List the workspace's accounts: the companies (portfolio companies, clients, entities) whose documents it keeps apart.",
3182
3209
  "",
3183
3210
  "USE WHEN: before uploading a company's files (pass its name as `account` on talonic_request_upload), or to see which companies exist.",
3184
- "NOT FOR: listing documents (talonic_search / talonic_filter) \xB7 creating an account (talonic_create_account).",
3211
+ "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.",
3185
3212
  "ARGS: none.",
3186
3213
  "RETURNS: data[] of { id, name, aliases[], description, created_at }."
3187
3214
  ].join("\n");
@@ -3231,13 +3258,13 @@ function registerAccounts(server, getToken, baseUrl) {
3231
3258
  server.registerTool(
3232
3259
  "talonic_list_accounts",
3233
3260
  {
3234
- title: "List Accounts",
3261
+ title: "List companies",
3235
3262
  description: LIST_DESCRIPTION,
3236
3263
  inputSchema: {},
3237
3264
  outputSchema: { data: z.array(z.object(accountShape)).describe("The workspace's accounts.") },
3238
3265
  _meta: widgetToolMeta("listAccounts"),
3239
3266
  annotations: {
3240
- title: "List Accounts",
3267
+ title: "List companies",
3241
3268
  readOnlyHint: true,
3242
3269
  destructiveHint: false,
3243
3270
  openWorldHint: false
@@ -3248,7 +3275,7 @@ function registerAccounts(server, getToken, baseUrl) {
3248
3275
  server.registerTool(
3249
3276
  "talonic_create_account",
3250
3277
  {
3251
- title: "Create Account",
3278
+ title: "Add a company",
3252
3279
  description: CREATE_DESCRIPTION,
3253
3280
  inputSchema: {
3254
3281
  name: z.string().min(1).max(255).describe("Company name, e.g. 'Filu'."),
@@ -3258,7 +3285,7 @@ function registerAccounts(server, getToken, baseUrl) {
3258
3285
  outputSchema: accountShape,
3259
3286
  _meta: widgetToolMeta("createAccount"),
3260
3287
  annotations: {
3261
- title: "Create Account",
3288
+ title: "Add a company",
3262
3289
  readOnlyHint: false,
3263
3290
  destructiveHint: false,
3264
3291
  idempotentHint: false,
@@ -7480,13 +7507,13 @@ function registerAppsTools(server, getToken, baseUrl) {
7480
7507
  server.registerTool(
7481
7508
  "talonic_list_apps",
7482
7509
  {
7483
- title: "List Apps",
7510
+ title: "List apps",
7484
7511
  description: LIST_APPS_DESCRIPTION,
7485
7512
  inputSchema: {
7486
7513
  enabled_only: z.boolean().optional().describe("Only enabled apps (default true). Pass false to include disabled ones.")
7487
7514
  },
7488
7515
  annotations: {
7489
- title: "List Apps",
7516
+ title: "List apps",
7490
7517
  readOnlyHint: true,
7491
7518
  destructiveHint: false,
7492
7519
  idempotentHint: true,
@@ -7860,12 +7887,12 @@ function registerToMarkdown(server, getTalonic, opts = {}) {
7860
7887
  server.registerTool(
7861
7888
  "talonic_to_markdown",
7862
7889
  {
7863
- title: "Document to Markdown",
7890
+ title: "Read document text",
7864
7891
  description: DESCRIPTION11,
7865
7892
  inputSchema: opts.localFiles ? inputSchema10 : hostedInputSchema,
7866
7893
  outputSchema: outputSchema11,
7867
7894
  annotations: {
7868
- title: "Document to Markdown",
7895
+ title: "Read document text",
7869
7896
  readOnlyHint: false,
7870
7897
  destructiveHint: false,
7871
7898
  openWorldHint: true
@@ -7897,7 +7924,7 @@ var LIST_DESCRIPTION3 = [
7897
7924
  "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.",
7898
7925
  "",
7899
7926
  "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.",
7900
- "NOT FOR: locating a specific document (talonic_search) or filtering documents by a value (talonic_filter).",
7927
+ "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.",
7901
7928
  "",
7902
7929
  "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`.",
7903
7930
  "RETURNS: data[] of { id, canonical_name, display_name, data_type, maturity, tier, synonyms, description, occurrence_count, superseded_by, links } plus cursor pagination."
@@ -8006,11 +8033,11 @@ function registerFieldTools(server, getToken, baseUrl) {
8006
8033
  server.registerTool(
8007
8034
  "talonic_list_fields",
8008
8035
  {
8009
- title: "List Registry Fields",
8036
+ title: "List fields",
8010
8037
  description: LIST_DESCRIPTION3,
8011
8038
  inputSchema: listFieldsInputSchema,
8012
8039
  annotations: {
8013
- title: "List Registry Fields",
8040
+ title: "List fields",
8014
8041
  readOnlyHint: true,
8015
8042
  destructiveHint: false,
8016
8043
  idempotentHint: true,
@@ -8023,11 +8050,11 @@ function registerFieldTools(server, getToken, baseUrl) {
8023
8050
  server.registerTool(
8024
8051
  "talonic_get_field",
8025
8052
  {
8026
- title: "Get Field Concept Card",
8053
+ title: "Look up a field",
8027
8054
  description: GET_DESCRIPTION2,
8028
8055
  inputSchema: getFieldInputSchema,
8029
8056
  annotations: {
8030
- title: "Get Field Concept Card",
8057
+ title: "Look up a field",
8031
8058
  readOnlyHint: true,
8032
8059
  destructiveHint: false,
8033
8060
  idempotentHint: true,
@@ -8040,11 +8067,11 @@ function registerFieldTools(server, getToken, baseUrl) {
8040
8067
  server.registerTool(
8041
8068
  "talonic_field_values",
8042
8069
  {
8043
- title: "Read Field Values",
8070
+ title: "Read a field's values",
8044
8071
  description: VALUES_DESCRIPTION,
8045
8072
  inputSchema: fieldValuesInputSchema,
8046
8073
  annotations: {
8047
- title: "Read Field Values",
8074
+ title: "Read a field's values",
8048
8075
  readOnlyHint: true,
8049
8076
  destructiveHint: false,
8050
8077
  idempotentHint: true,
@@ -8111,7 +8138,7 @@ var LIST_TOOLS_DESCRIPTION = [
8111
8138
  "Target API: https://talonic.com/docs/api (GET /v1/agent/tools).",
8112
8139
  "",
8113
8140
  "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.",
8114
- "NOT FOR: discovering fields (talonic_list_fields / talonic_find_data) or documents (talonic_search) \u2014 those are shaped for you.",
8141
+ "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).",
8115
8142
  "",
8116
8143
  "ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
8117
8144
  "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."
@@ -8145,12 +8172,12 @@ async function handleListAgentTools(getToken, baseUrl, args) {
8145
8172
  });
8146
8173
  }
8147
8174
  var INVOKE_DESCRIPTION = [
8148
- "Invoke ONE named tool from the platform's agent tool registry directly, with no model in the loop \u2014 you choose the arguments. This is how an external agent uses Talonic's retrieval and provenance while driving control flow itself (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).",
8175
+ "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).",
8149
8176
  "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.",
8150
8177
  "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).",
8151
8178
  "",
8152
8179
  "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.",
8153
- "NOT FOR: anything a dedicated talonic_* tool already does (prefer those \u2014 they are shaped for you).",
8180
+ "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.",
8154
8181
  "",
8155
8182
  "ARGS: `name` (tool name), `args` (object matching the tool's input_schema), optional `document_ids` (hard scope for scope-aware tools).",
8156
8183
  "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."
@@ -8181,11 +8208,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
8181
8208
  server.registerTool(
8182
8209
  "talonic_find_data",
8183
8210
  {
8184
- title: "Find Data by Concept",
8211
+ title: "Find where data lives",
8185
8212
  description: FIND_DESCRIPTION,
8186
8213
  inputSchema: findDataInputSchema,
8187
8214
  annotations: {
8188
- title: "Find Data by Concept",
8215
+ title: "Find where data lives",
8189
8216
  readOnlyHint: true,
8190
8217
  destructiveHint: false,
8191
8218
  idempotentHint: true,
@@ -8199,11 +8226,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
8199
8226
  server.registerTool(
8200
8227
  "talonic_list_agent_tools",
8201
8228
  {
8202
- title: "List Platform Agent Tools",
8229
+ title: "List data tools",
8203
8230
  description: LIST_TOOLS_DESCRIPTION,
8204
8231
  inputSchema: listAgentToolsInputSchema,
8205
8232
  annotations: {
8206
- title: "List Platform Agent Tools",
8233
+ title: "List data tools",
8207
8234
  readOnlyHint: true,
8208
8235
  destructiveHint: false,
8209
8236
  idempotentHint: true,
@@ -8216,11 +8243,11 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
8216
8243
  server.registerTool(
8217
8244
  "talonic_invoke_agent_tool",
8218
8245
  {
8219
- title: "Invoke Platform Agent Tool",
8246
+ title: "Query workspace data",
8220
8247
  description: INVOKE_DESCRIPTION,
8221
8248
  inputSchema: invokeAgentToolInputSchema,
8222
8249
  annotations: {
8223
- title: "Invoke Platform Agent Tool",
8250
+ title: "Query workspace data",
8224
8251
  readOnlyHint: true,
8225
8252
  destructiveHint: false,
8226
8253
  idempotentHint: false,
@@ -8235,7 +8262,7 @@ var LIST_DESCRIPTION4 = [
8235
8262
  "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.",
8236
8263
  "",
8237
8264
  "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.",
8238
- "NOT FOR: ad-hoc extraction schemas (talonic_list_schemas) or discovering fields (talonic_list_fields).",
8265
+ "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.",
8239
8266
  "ARGS: optional `search` (name contains, case-insensitive), `limit` (1\u2013100, default 20), `cursor` (from pagination.next_cursor), `order` (asc|desc by updated_at).",
8240
8267
  "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 } }."
8241
8268
  ].join("\n");
@@ -8290,10 +8317,10 @@ function registerSpecTools(server, getToken, baseUrl) {
8290
8317
  server.registerTool(
8291
8318
  "talonic_list_specs",
8292
8319
  {
8293
- title: "List Specs",
8320
+ title: "List pipelines",
8294
8321
  description: LIST_DESCRIPTION4,
8295
8322
  inputSchema: listSpecsInputSchema,
8296
- annotations: { title: "List Specs", ...READ_ONLY4 },
8323
+ annotations: { title: "List pipelines", ...READ_ONLY4 },
8297
8324
  _meta: widgetToolMeta("listSpecs")
8298
8325
  },
8299
8326
  async (args) => handleListSpecs(getToken, baseUrl, args)
@@ -8301,10 +8328,10 @@ function registerSpecTools(server, getToken, baseUrl) {
8301
8328
  server.registerTool(
8302
8329
  "talonic_get_spec",
8303
8330
  {
8304
- title: "Get a Spec's structure",
8331
+ title: "Look up a pipeline",
8305
8332
  description: GET_DESCRIPTION3,
8306
8333
  inputSchema: getSpecInputSchema,
8307
- annotations: { title: "Get a Spec's structure", ...READ_ONLY4 },
8334
+ annotations: { title: "Look up a pipeline", ...READ_ONLY4 },
8308
8335
  _meta: widgetToolMeta("getSpec")
8309
8336
  },
8310
8337
  async (args) => handleGetSpec(getToken, baseUrl, args)
@@ -8530,11 +8557,11 @@ function registerRunTools(server, getToken, baseUrl) {
8530
8557
  server.registerTool(
8531
8558
  "talonic_run_spec",
8532
8559
  {
8533
- title: "Run a Spec pipeline",
8560
+ title: "Run a pipeline",
8534
8561
  description: RUN_DESCRIPTION2,
8535
8562
  inputSchema: runSpecInputSchema,
8536
8563
  annotations: {
8537
- title: "Run a Spec pipeline",
8564
+ title: "Run a pipeline",
8538
8565
  readOnlyHint: false,
8539
8566
  destructiveHint: false,
8540
8567
  openWorldHint: true
@@ -8546,10 +8573,10 @@ function registerRunTools(server, getToken, baseUrl) {
8546
8573
  server.registerTool(
8547
8574
  "talonic_get_run",
8548
8575
  {
8549
- title: "Poll a Spec run",
8576
+ title: "Check run progress",
8550
8577
  description: GET_RUN_DESCRIPTION,
8551
8578
  inputSchema: runRefInputSchema,
8552
- annotations: { title: "Poll a Spec run", ...READ_ONLY5 },
8579
+ annotations: { title: "Check run progress", ...READ_ONLY5 },
8553
8580
  _meta: widgetToolMeta("getRun")
8554
8581
  },
8555
8582
  async (args) => handleGetRun(getToken, baseUrl, args)
@@ -8557,10 +8584,10 @@ function registerRunTools(server, getToken, baseUrl) {
8557
8584
  server.registerTool(
8558
8585
  "talonic_get_run_results",
8559
8586
  {
8560
- title: "Read a Spec run's rows",
8587
+ title: "Read run results",
8561
8588
  description: RESULTS_DESCRIPTION,
8562
8589
  inputSchema: resultsInputSchema,
8563
- annotations: { title: "Read a Spec run's rows", ...READ_ONLY5 },
8590
+ annotations: { title: "Read run results", ...READ_ONLY5 },
8564
8591
  _meta: widgetToolMeta("getRunResults")
8565
8592
  },
8566
8593
  async (args) => handleGetRunResults(getToken, baseUrl, args)
@@ -8573,7 +8600,7 @@ var POLL_HINT = "still processing \u2014 call talonic_get_answer with this ask_i
8573
8600
  var ASK_DESCRIPTION = [
8574
8601
  "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.",
8575
8602
  "",
8576
- "USE WHEN: the user asks an open question about their documents ('which vendors invoiced us twice in May?'), wants a summary across documents, or the answer needs reasoning over several fields.",
8603
+ "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.",
8577
8604
  "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).",
8578
8605
  "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).",
8579
8606
  "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."
@@ -8673,11 +8700,11 @@ function registerAskTools(server, getToken, baseUrl) {
8673
8700
  server.registerTool(
8674
8701
  "talonic_ask",
8675
8702
  {
8676
- title: "Ask a question over the workspace",
8703
+ title: "Ask your documents",
8677
8704
  description: ASK_DESCRIPTION,
8678
8705
  inputSchema: askInputSchema,
8679
8706
  annotations: {
8680
- title: "Ask a question over the workspace",
8707
+ title: "Ask your documents",
8681
8708
  readOnlyHint: false,
8682
8709
  destructiveHint: false,
8683
8710
  openWorldHint: false
@@ -8689,11 +8716,11 @@ function registerAskTools(server, getToken, baseUrl) {
8689
8716
  server.registerTool(
8690
8717
  "talonic_get_answer",
8691
8718
  {
8692
- title: "Poll an ask for its answer",
8719
+ title: "Get the answer",
8693
8720
  description: GET_ANSWER_DESCRIPTION,
8694
8721
  inputSchema: { ask_id: uuid2.describe("From talonic_ask.") },
8695
8722
  annotations: {
8696
- title: "Poll an ask for its answer",
8723
+ title: "Get the answer",
8697
8724
  readOnlyHint: true,
8698
8725
  destructiveHint: false,
8699
8726
  idempotentHint: true,
@@ -8707,7 +8734,7 @@ function registerAskTools(server, getToken, baseUrl) {
8707
8734
 
8708
8735
  // package.json
8709
8736
  var package_default = {
8710
- version: "0.1.97"};
8737
+ version: "0.1.99"};
8711
8738
 
8712
8739
  // src/version.ts
8713
8740
  var VERSION = package_default.version;
@@ -8732,6 +8759,9 @@ function buildServerInstructions(opts) {
8732
8759
  "schema-validated JSON with per-field confidence scores and source provenance, and",
8733
8760
  "answers questions about the documents in the user's Talonic workspace.",
8734
8761
  "Which tool for which question:",
8762
+ "(0) any question about what the documents contain (counts, totals, duplicates,",
8763
+ "comparisons, anomalies) -> talonic_ask FIRST, in one call; do not explore fields,",
8764
+ "schemas, specs or SQL to answer it yourself;",
8735
8765
  "(1) a document by name or keyword -> talonic_search (literal keywords: one short term",
8736
8766
  "or an exact filename; on an empty result retry with a shorter keyword), then use the",
8737
8767
  "returned document_id;",