@talonic/mcp 0.1.105 → 0.1.106

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/index.js CHANGED
@@ -2415,7 +2415,7 @@ var inputSchema = {
2415
2415
  instructions: z.string().optional().describe(
2416
2416
  "Natural-language guidance for the extractor, e.g. 'Focus on the billing section. Amounts are in EUR.'"
2417
2417
  ),
2418
- include_markdown: z.boolean().optional().describe("Include OCR-converted markdown in the response alongside structured data."),
2418
+ include_markdown: z.boolean().optional().describe("Also return the document's full text as markdown, alongside the fields."),
2419
2419
  include_provenance: z.boolean().optional().describe(
2420
2420
  "Include per-field provenance (source_text, section, page) showing where each value was found in the document."
2421
2421
  )
@@ -2464,7 +2464,7 @@ var outputSchema = {
2464
2464
  document: z.string().optional(),
2465
2465
  dashboard: z.string().optional()
2466
2466
  }).optional().describe("URLs for self, document, and human-readable dashboard view."),
2467
- markdown: z.string().optional().describe("OCR-converted markdown. Present only when `include_markdown: true`."),
2467
+ markdown: z.string().optional().describe("The document's full text as markdown. Present only when `include_markdown: true`."),
2468
2468
  cost: z.object({
2469
2469
  costCredits: z.number().describe("Credits consumed by this call."),
2470
2470
  costEur: z.number().describe("Approximate EUR cost of this call."),
@@ -2740,7 +2740,7 @@ function registerGetBalance(server, getTalonic) {
2740
2740
  var DESCRIPTION4 = [
2741
2741
  "Read Talonic's machine-readable credit pricing catalog: fixed per-unit rates so you can predict spend BEFORE running anything.",
2742
2742
  "",
2743
- "USE WHEN: estimating the cost of a planned extraction/structuring/matching job, or answering a pricing question. Public \u2014 works without spending credits.",
2743
+ "USE WHEN: estimating the cost of planned work (reading documents, extracting fields, matching records), or answering a pricing question. Public \u2014 works without spending credits.",
2744
2744
  "NOT FOR: the workspace's current balance (use talonic_get_balance) or what it has already spent (use talonic_get_usage).",
2745
2745
  "ARGS: none.",
2746
2746
  "RETURNS: currency, credits_per_eur, multipliers (e.g. batch 0.5x), and units[] \u2014 each { unit, label, credits, eur, free }."
@@ -2792,7 +2792,7 @@ function registerGetPricing(server, getTalonic) {
2792
2792
  var DESCRIPTION5 = [
2793
2793
  "Read the workspace's per-function credit consumption over a trailing window: where the credits actually went.",
2794
2794
  "",
2795
- "USE WHEN: the user asks what they have spent credits on, or you want to see which function (extraction, structuring, intelligence ops) dominates spend.",
2795
+ "USE WHEN: the user asks what they have spent credits on, or you want to see which kind of work (reading documents, structuring data, answering questions) takes most of the credits.",
2796
2796
  "NOT FOR: the remaining balance (use talonic_get_balance) or per-unit rates (use talonic_get_pricing).",
2797
2797
  "ARGS: days (optional, default 30, clamped 1-365).",
2798
2798
  "RETURNS: period_days, total_credits, and by_function[] \u2014 each { operation_type, operations, credits }, highest spend first."
@@ -7799,7 +7799,7 @@ var outputValue = z.object({
7799
7799
  var outputs = z.record(z.string().min(1), outputValue).describe(
7800
7800
  "Output field key to { value, confidence?, reasoning?, escalate?, quote?, document_id? }. Use only declared fields."
7801
7801
  );
7802
- var pipelineId = zUuid().optional().describe("Optional pipeline (run) UUID: only that pipeline's tasks.");
7802
+ var pipelineId = zUuid().optional().describe("Optional run UUID: only that run's tasks.");
7803
7803
  var listInput = { status, limit, cursor, pipeline_id: pipelineId };
7804
7804
  var idInput = { task_id: taskId };
7805
7805
  var heartbeatInput = { task_id: taskId, execution_epoch: executionEpoch };
@@ -7951,39 +7951,39 @@ var MUTATING = {
7951
7951
  };
7952
7952
  var DESCRIPTIONS = {
7953
7953
  list: [
7954
- "List Agent-stage tasks visible to this Talonic workspace credential.",
7954
+ "List the agent tasks waiting in this workspace: checks a Spec hands to an outside agent (your agent) instead of a person, one per document.",
7955
7955
  "",
7956
- "USE WHEN: looking for external-agent work to process; begin with status 'available'. To take a batch of one pipeline (e.g. 'take 10 tasks of pipeline X'), list with pipeline_id and status 'available', then claim each with talonic_claim_agent_task; a task another agent took returns HTTP 409, so skip it and take the next.",
7956
+ "USE WHEN: looking for work for your agent to do; begin with status 'available'. To take a batch from one run (e.g. 'take 10 tasks of run X'), list with pipeline_id and status 'available', then claim each with talonic_claim_agent_task; a task another agent took returns HTTP 409, so skip it and take the next.",
7957
7957
  "NOT FOR: reading the immutable task payload (use talonic_get_agent_task) or taking a lease (use talonic_claim_agent_task).",
7958
7958
  "ARGS: optional status, pipeline_id, limit, and cursor. RETURNS: metadata only plus pagination.next_cursor."
7959
7959
  ].join("\n"),
7960
7960
  get: [
7961
- "Fetch one Agent-stage task's immutable input snapshot, instructions, and declared output contract. This disclosure is audited.",
7961
+ "Read one agent task: its fixed input, instructions, and the output fields it expects. Each read is recorded against the task.",
7962
7962
  "",
7963
7963
  "USE WHEN: inspecting a listed task before deciding whether to process it.",
7964
7964
  "NOT FOR: acquiring the task (use talonic_claim_agent_task) or returning results (use talonic_submit_agent_task).",
7965
7965
  "ARGS: task_id. RETURNS: metadata, input_snapshot, output_contract, instructions, and timeout_fallthrough."
7966
7966
  ].join("\n"),
7967
7967
  claim: [
7968
- "Claim an available Agent-stage task, or reclaim it after its lease expires.",
7968
+ "Claim an available agent task so no one else works on it, or reclaim it after its lease expires.",
7969
7969
  "",
7970
7970
  "USE WHEN: ready to process a task. Save the returned execution_epoch and lease_expires_at.",
7971
7971
  "NOT FOR: merely inspecting work (use talonic_get_agent_task) or extending an active lease (use talonic_heartbeat_agent_task).",
7972
7972
  "A conflicting live claim returns HTTP 409. A successful claim returns the task payload: input_snapshot, instructions, and output_contract, whose entries carry each field's Spec rules (description) and allowed codes (enumValues). Review the documents against those rules."
7973
7973
  ].join("\n"),
7974
7974
  heartbeat: [
7975
- "Extend the lease on a claimed Agent-stage task.",
7975
+ "Extend the lease on a claimed agent task so you keep it while you work.",
7976
7976
  "",
7977
7977
  "USE WHEN: processing may continue past lease_expires_at; heartbeat before expiry using the epoch from claim.",
7978
7978
  "NOT FOR: acquiring a task (use talonic_claim_agent_task) or submitting finished outputs (use talonic_submit_agent_task).",
7979
7979
  "ARGS: task_id and execution_epoch. Stale or foreign claims return HTTP 409."
7980
7980
  ].join("\n"),
7981
7981
  submit: [
7982
- "Submit declared output fields for a claimed Agent-stage task and resume the parked document.",
7982
+ "Submit the output fields for a claimed agent task; the document then continues through its Spec.",
7983
7983
  "",
7984
7984
  "USE WHEN: processing is complete and every required output in output_contract is ready.",
7985
7985
  "NOT FOR: undeclared fields or partial lease maintenance (use talonic_heartbeat_agent_task).",
7986
- "ARGS: task_id, execution_epoch, outputs keyed exactly by declared field key, and optional summary. The platform validates all fields and types transactionally before writing anything."
7986
+ "ARGS: task_id, execution_epoch, outputs keyed exactly by declared field key, and optional summary. Talonic checks every field and type before writing anything: all are saved or none."
7987
7987
  ].join("\n")
7988
7988
  };
7989
7989
  function registerAgentTaskTools(server, getToken, baseUrl) {
@@ -8797,10 +8797,10 @@ var DESTRUCTIVE = {
8797
8797
  var AUTH_NOTE = "AUTH: a tlnc_ key needs a per-app 'decide' grant; an OAuth connector session needs the apps:decide scope (consented at connect) and a live workspace role of senior_member or above. A 403 (decide_grant_required, insufficient_scope, insufficient_tier) names what is missing \u2014 tell the user, do not retry.";
8798
8798
  var DESCRIPTIONS2 = {
8799
8799
  list: [
8800
- "List one External-mode app's decision tasks (runs parked for an outside agent to decide), newest first.",
8800
+ "List one External-mode app's decision tasks (runs waiting for an outside agent to decide), newest first.",
8801
8801
  "",
8802
8802
  "USE WHEN: looking for decisions to make for an app; begin with status 'available'. This is the polling alternative to the app.decision_task.offered webhook.",
8803
- "NOT FOR: Agent-stage document tasks (use talonic_list_agent_tasks), reading a task's input package (claim it, then talonic_read_decision_package), or taking a lease (talonic_claim_decision_task).",
8803
+ "NOT FOR: agent tasks on documents in a Spec (use talonic_list_agent_tasks), reading a task's input package (claim it, then talonic_read_decision_package), or taking a lease (talonic_claim_decision_task).",
8804
8804
  "ARGS: app_id, optional status, limit, cursor. RETURNS: task metadata only (id, run_id, status, execution_epoch, lease and sla_deadline_at timing) plus pagination.next_cursor.",
8805
8805
  AUTH_NOTE
8806
8806
  ].join("\n"),
@@ -8812,7 +8812,7 @@ var DESCRIPTIONS2 = {
8812
8812
  AUTH_NOTE
8813
8813
  ].join("\n"),
8814
8814
  package: [
8815
- "Read one page of a claimed decision task's frozen input package: the records the decision must be made from, with their provenance locators. Only the current claimant may read it; each page read is journaled onto the run.",
8815
+ "Read one page of a claimed decision task's fixed input: the records the decision must be made from, each with the locator to cite as evidence. Only the current claimant may read it; each page read is recorded on the run.",
8816
8816
  "",
8817
8817
  "USE WHEN: after a successful claim, walking pages from package.first_cursor while pagination.has_more is true. The first page also carries the source documents list. A mining_round package is one record { system_prompt, first_turn, tools }.",
8818
8818
  "NOT FOR: unclaimed tasks (HTTP 409; claim first) or listing tasks (talonic_list_decision_tasks).",
@@ -8828,7 +8828,7 @@ var DESCRIPTIONS2 = {
8828
8828
  AUTH_NOTE
8829
8829
  ].join("\n"),
8830
8830
  submit: [
8831
- "Submit the decision for a claimed decision task; the platform verifies it transactionally and resumes the run.",
8831
+ "Submit the decision for a claimed decision task; Talonic checks it before saving anything, then the run continues.",
8832
8832
  "",
8833
8833
  "USE WHEN: the decision is final. outcome must satisfy output_contract from the claim (plain JSON Schema, or the verdict_matrix / record_set envelope), evidence lists the package locators relied on (verbatim; [] only if the app allows unevidenced decisions), rationale is a short summary. Rejections are HTTP 422 with the reason and change nothing; the task stays claimed under your epoch, so fix and resubmit before the lease ends.",
8834
8834
  "NOT FOR: giving the task back undecided (talonic_release_decision_task) or declaring it undecidable (talonic_fail_decision_task). Stale epoch is HTTP 409.",
@@ -8844,7 +8844,7 @@ var DESCRIPTIONS2 = {
8844
8844
  AUTH_NOTE
8845
8845
  ].join("\n"),
8846
8846
  fail: [
8847
- "Report that the claimed decision task cannot be decided: raises a Human Review with your reason AND applies the app's declared fallback policy (rules decide, hold for review, or fail the run).",
8847
+ "Report that the claimed decision task cannot be decided: sends it to a person for review with your reason AND applies the app's declared fallback policy (rules decide, hold for review, or fail the run).",
8848
8848
  "",
8849
8849
  "USE WHEN: the package is insufficient or contradictory and no claimant could decide it. This ends the task (status 'failed').",
8850
8850
  "NOT FOR: temporary give-backs (talonic_release_decision_task) or a decision you can make with low confidence (submit it with confidence set).",
@@ -9163,7 +9163,7 @@ function registerMiningDriverTools(server, getToken, baseUrl, options = {}) {
9163
9163
  );
9164
9164
  }
9165
9165
  var DESCRIPTION11 = [
9166
- "Get the OCR-converted markdown text of a document.",
9166
+ "Get the full text of a document as markdown, including scanned pages.",
9167
9167
  "",
9168
9168
  "USE WHEN: the user wants the full text \u2014 'what does it say', summarise, or translate a document.",
9169
9169
  "NOT FOR: specific structured fields (use talonic_extract with a schema).",
@@ -9188,7 +9188,7 @@ var inputSchema10 = {
9188
9188
  };
9189
9189
  var outputSchema11 = {
9190
9190
  document_id: z.string().describe("ID of the document the markdown was extracted from."),
9191
- markdown: z.string().describe("OCR-converted markdown text content of the document."),
9191
+ markdown: z.string().describe("The document's full text as markdown."),
9192
9192
  cost: z.object({
9193
9193
  costCredits: z.number(),
9194
9194
  costEur: z.number(),
@@ -9269,11 +9269,11 @@ function registerToMarkdown(server, getTalonic, opts = {}) {
9269
9269
  }
9270
9270
  var MATURITIES = ["core", "proven", "candidate"];
9271
9271
  var maturityArg = z.enum(MATURITIES).optional().describe(
9272
- "Filter by maturity: `core` (universal, fully trusted \u2014 safe to build on), `proven` (recurring, stable id), `candidate` (newly discovered, may still be merged or renamed)."
9272
+ "Filter by maturity: `core` (established and trusted, safe to build on), `proven` (recurring, stable id), `candidate` (seen recently, may still be merged or renamed)."
9273
9273
  );
9274
9274
  var fieldIdArg = zUuid().optional().describe("Field UUID (from talonic_list_fields / talonic_search).");
9275
9275
  var fieldNameArg = z.string().min(1).optional().describe(
9276
- "Field NAME instead of an id \u2014 resolved through canonical name, synonyms, merge aliases and the registry's spelling fold, then followed to the live concept. Use the user's wording ('Invoice No', 'Vertragsnummer')."
9276
+ "Field NAME instead of an id \u2014 matched against the field's name, other spellings and synonyms, including fields that were merged into it. Use the user's wording ('Invoice No', 'Vertragsnummer')."
9277
9277
  );
9278
9278
  async function resolveFieldId(getToken, baseUrl, args) {
9279
9279
  if (args.field_id) return { id: args.field_id };
@@ -9286,18 +9286,20 @@ async function resolveFieldId(getToken, baseUrl, args) {
9286
9286
  };
9287
9287
  }
9288
9288
  var LIST_DESCRIPTION4 = [
9289
- "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.",
9289
+ "List the fields your workspace's documents carry (vendor name, invoice total, notice period \u2026), each with a stable id, how established it is (maturity), data type, synonyms and how often it occurs.",
9290
9290
  "",
9291
9291
  "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.",
9292
- "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.",
9292
+ "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. Many fields are one-off candidates; pass maturity core or proven unless the user asks for candidates.",
9293
9293
  "",
9294
- "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`.",
9294
+ "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: fields merged into another are hidden so you never see two ids for one field), `limit`, `cursor`.",
9295
9295
  "RETURNS: data[] of { id, canonical_name, display_name, data_type, maturity, tier, synonyms, description, occurrence_count, superseded_by, links } plus cursor pagination."
9296
9296
  ].join("\n");
9297
9297
  var listFieldsInputSchema = {
9298
9298
  search: z.string().optional().describe("Case-insensitive contains match on canonical_name / display_name."),
9299
9299
  maturity: maturityArg,
9300
- include_superseded: z.boolean().optional().describe("Include rows merged into a survivor (they carry `superseded_by`). Default false."),
9300
+ include_superseded: z.boolean().optional().describe(
9301
+ "Include fields merged into another one (they carry `superseded_by`). Default false."
9302
+ ),
9301
9303
  limit: z.number().int().min(1).max(100).optional().describe("Page size (default 20, max 100)."),
9302
9304
  cursor: z.string().optional().describe("Opaque cursor from pagination.next_cursor.")
9303
9305
  };
@@ -9315,20 +9317,18 @@ async function handleListFields(getToken, baseUrl, args) {
9315
9317
  );
9316
9318
  }
9317
9319
  var GET_DESCRIPTION3 = [
9318
- "Get the CONCEPT CARD for one Field Registry field: what it means (curated description + extraction instruction), its synonyms and aliases, maturity, where it occurs (document/occurrence counts, first/last seen, document-type spread), its value distribution (top values with counts, distinct count, examples), schema usage, and identity links (superseded_by, absorbed concepts).",
9320
+ "Describe one field: what it means, its synonyms and other names, maturity, where it occurs (document and occurrence counts, first and last seen, which document types), its values (top values with counts, distinct count, examples), which schemas use it, and the fields merged into it (superseded_by).",
9319
9321
  "",
9320
- "USE WHEN: you must decide whether a field is the right concept for a question, need example values or the value shape before writing a filter, or hold a field NAME from the user and need the live concept behind it.",
9322
+ "USE WHEN: you must decide whether a field is the right one for a question, need example values or the value shape before writing a filter, or hold a field NAME from the user and need the field behind it.",
9321
9323
  "NOT FOR: listing many fields (talonic_list_fields) or reading every value (talonic_field_values).",
9322
9324
  "",
9323
- "ARGS: exactly one of `field_id` or `name`. Names are resolved through canonical name \u2192 spelling fold \u2192 merge aliases \u2192 synonyms (then case-insensitive fallbacks) and followed to the live concept; the response says which arm matched. `include_history: true` appends the curation trail (merges, renames, maturity moves).",
9325
+ "ARGS: exactly one of `field_id` or `name`. A name is matched against field names, other spellings and synonyms and followed to the current field; `resolution` says how it matched. `include_history: true` adds the field's history (merges, renames, maturity changes).",
9324
9326
  "RETURNS: the card { id, canonical_name, maturity, data_type, definition, identity, occurrence, values, usage, links } plus `resolution` when a name was given and `history` when requested."
9325
9327
  ].join("\n");
9326
9328
  var getFieldInputSchema = {
9327
9329
  field_id: fieldIdArg,
9328
9330
  name: fieldNameArg,
9329
- include_history: z.boolean().optional().describe(
9330
- "Append the concept's curation history (tier changes, merges, renames), newest first."
9331
- )
9331
+ include_history: z.boolean().optional().describe("Add the field's history (maturity changes, merges, renames), newest first.")
9332
9332
  };
9333
9333
  async function handleGetField(getToken, baseUrl, args) {
9334
9334
  if (!args.field_id && !args.name) return validationError("Provide `field_id` or `name`.");
@@ -9356,9 +9356,9 @@ async function handleGetField(getToken, baseUrl, args) {
9356
9356
  });
9357
9357
  }
9358
9358
  var VALUES_DESCRIPTION = [
9359
- "Read a field's CURRENT VALUES across documents, with provenance \u2014 one row per bound occurrence: document id + filename + type, the value, confidence, the raw name it was captured under, the verbatim source text, and how confidently the raw name was matched to this concept (`resolved_by`).",
9359
+ "Read a field's CURRENT VALUES across documents, with evidence: one row per value, with the document id, filename and type, the value, its confidence, the label it appeared under in the document, the exact source text, and how the label was matched to this field (`resolved_by`).",
9360
9360
  "",
9361
- "USE WHEN: the user asks 'what are all the X across my documents', you need to tabulate or aggregate one concept across the corpus, or you want the evidence (source text + document) behind a value.",
9361
+ "USE WHEN: the user asks 'what are all the X across my documents', you need to tabulate or total one field across all documents, or you want the evidence (source text + document) behind a value.",
9362
9362
  "NOT FOR: multi-field row-shaped queries over documents (talonic_filter) or one document's full field set (talonic_get_document).",
9363
9363
  "",
9364
9364
  "ARGS: exactly one of `field_id` or `name`; optional `document_id` (one document), `value` (case-insensitive contains filter), `limit` (max 100), `cursor`.",
@@ -9464,13 +9464,13 @@ function unwrap(res) {
9464
9464
  }
9465
9465
  var documentIdsArg = z.array(zUuid()).max(1e3).optional().describe("Restrict to these document ids (hard filter, enforced server-side).");
9466
9466
  var FIND_DESCRIPTION = [
9467
- "Locate the REAL data behind a natural-language concept before querying anything: resolves a phrase ('payment volume per transaction', 'counterparty', 'Vertragslaufzeit') by meaning and by its words to the fields, values, documents and text passages that carry it \u2014 even when the field is captured under a different name.",
9467
+ "Find where the data behind a concept lives before querying anything: turns a phrase ('payment volume per transaction', 'counterparty', 'Vertragslaufzeit') into the fields, values, documents and text passages that carry it, matching what it means as well as its words, even when the field has a different name.",
9468
9468
  "",
9469
- "USE WHEN: the user asks about a concept and you are not sure which field holds it, when talonic_list_fields / talonic_search came back empty or ambiguous, or when the answer may live in document prose rather than a captured cell. Pass `account` whenever the question names one portfolio company (an account from talonic_list_accounts), so another company's figures cannot come back.",
9469
+ "USE WHEN: the user asks about a concept and you are not sure which field holds it, when talonic_list_fields / talonic_search came back empty or ambiguous, or when the answer may sit in a document's text rather than in a field. Pass `account` whenever the question names one portfolio company (an account from talonic_list_accounts), so another company's figures cannot come back.",
9470
9470
  "NOT FOR: reading a known field's values (talonic_field_values) or filtering by a known field (talonic_filter).",
9471
9471
  "",
9472
9472
  "ARGS: `query` (the concept, in the user's words), optional `concepts[]` (several concepts resolved to fields in one call; fields only, no text search), `top_k` (1\u201325, default 10), `document_ids` (hard scope), `account` (one account by name or alias, e.g. 'Filu'; narrows like document_ids; an unknown name returns an error listing the accounts).",
9473
- "RETURNS: four ranked groups \u2014 FIELDS (canonical_name, field ids/keys, maturity, occurrence_count, sample values with their documents), VALUES, DOCUMENTS and PASSAGES \u2014 every item a ready handle for the next call. Read-only."
9473
+ "RETURNS: four ranked groups \u2014 FIELDS (canonical_name, field ids/keys, maturity, occurrence_count, sample values with their documents), VALUES, DOCUMENTS and PASSAGES \u2014 every item ready to pass to the next call. Read-only."
9474
9474
  ].join("\n");
9475
9475
  var findDataInputSchema = {
9476
9476
  query: z.string().min(1).describe("The natural-language concept to locate."),
@@ -9505,14 +9505,14 @@ async function handleFindData(getToken, baseUrl, args) {
9505
9505
  }
9506
9506
  var DEDICATED = /* @__PURE__ */ new Set(["find_data"]);
9507
9507
  var LIST_TOOLS_DESCRIPTION = [
9508
- "List the platform's agent tool registry \u2014 every retrieval, provenance and analysis primitive the in-product Talonic agent runs on (find_data, describe_data, query_data for read-only SQL over the extracted data, get_document_markdown, workspace_overview, \u2026) with its input schema and whether THIS credential may invoke it.",
9508
+ "List Talonic's data tools: read-only look-ups and queries over the workspace (find_data, describe_data, query_data for a read-only SQL query over the extracted data, get_document_markdown, workspace_overview, \u2026), each with its input schema and whether THIS credential may call it.",
9509
9509
  "Target API: https://talonic.com/docs/api (GET /v1/agent/tools).",
9510
9510
  "",
9511
9511
  "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.",
9512
- "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).",
9512
+ "NOT FOR: answering the user's question about their documents \u2014 call talonic_ask, which answers in one call with citations. Also not for discovering fields (talonic_find_data) or documents (talonic_search).",
9513
9513
  "",
9514
9514
  "ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
9515
- "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."
9515
+ "RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }. Data tools that already have their own talonic_* tool (find_data) are left out; call the dedicated tool."
9516
9516
  ].join("\n");
9517
9517
  var listAgentToolsInputSchema = {
9518
9518
  only_invocable: z.boolean().optional().describe("Hide tools this credential cannot invoke. Default true."),
@@ -9543,12 +9543,12 @@ async function handleListAgentTools(getToken, baseUrl, args) {
9543
9543
  });
9544
9544
  }
9545
9545
  var INVOKE_DESCRIPTION = [
9546
- "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).",
9547
- "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.",
9548
- "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).",
9546
+ "Run ONE named data tool directly and get its exact output (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).",
9547
+ "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 read-only data tools (capability `data.read`). Tools that write are never invocable here, however you connected, so this tool reads and never changes workspace data.",
9548
+ "Target API: Talonic data tools \u2014 https://talonic.com/docs/api (POST /v1/agent/tools/{name}/invoke; input schemas from talonic_list_agent_tools).",
9549
9549
  "",
9550
9550
  "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.",
9551
- "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.",
9551
+ "NOT FOR: answering a question about the documents (talonic_ask returns one cited answer). Use this only for a query the user asked for, or when talonic_ask could not answer.",
9552
9552
  "",
9553
9553
  "ARGS: `name` (tool name), `args` (object matching the tool's input_schema), optional `document_ids` (hard scope for scope-aware tools).",
9554
9554
  "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."
@@ -9656,15 +9656,15 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
9656
9656
  );
9657
9657
  }
9658
9658
  var LIST_DESCRIPTION5 = [
9659
- "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.",
9659
+ "List the workspace's Specs. A Spec is a saved way of reading one kind of document: the fields it produces and the steps (reading, checks, look-ups, reviews) that fill them; 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.",
9660
9660
  "",
9661
- "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.",
9661
+ "USE WHEN: the user wants to run 'their invoice Spec' / 'our contract set-up', or you need a spec_id for talonic_run_spec / talonic_get_spec.",
9662
9662
  "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.",
9663
9663
  "ARGS: optional `search` (name contains, case-insensitive), `limit` (1\u2013100, default 20), `cursor` (from pagination.next_cursor), `order` (asc|desc by updated_at).",
9664
9664
  "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 } }."
9665
9665
  ].join("\n");
9666
9666
  var GET_DESCRIPTION4 = [
9667
- "Get one Spec's structure: identity and version state, the schema its output rows follow, `nodes[]` (the processing steps as the user configured them, in editing order), `phases[]` (the steps as they actually run, in run order; one configured validation step can run as several phases, so the two lists can differ), and `fields[]` (Spec field \u2194 schema field).",
9667
+ "Get one Spec's structure: identity and version state, the schema its output rows follow, `nodes[]` (the steps as the user set them up, in editing order), `phases[]` (the same steps in the order a run carries them out; one check can appear more than once, so the two lists can differ), and `fields[]` (Spec field \u2194 schema field).",
9668
9668
  "",
9669
9669
  "USE WHEN: you need to explain what a run will do, confirm a Spec is published (`version` non-null) before talonic_run_spec, or map field names to keys.",
9670
9670
  "NOT FOR: listing Specs (talonic_list_specs) or starting a run (talonic_run_spec).",
@@ -9714,10 +9714,10 @@ function registerSpecTools(server, getToken, baseUrl) {
9714
9714
  server.registerTool(
9715
9715
  "talonic_list_specs",
9716
9716
  {
9717
- title: "List pipelines",
9717
+ title: "List Specs",
9718
9718
  description: LIST_DESCRIPTION5,
9719
9719
  inputSchema: listSpecsInputSchema,
9720
- annotations: { title: "List pipelines", ...READ_ONLY6 },
9720
+ annotations: { title: "List Specs", ...READ_ONLY6 },
9721
9721
  _meta: widgetToolMeta("listSpecs")
9722
9722
  },
9723
9723
  async (args) => handleListSpecs(getToken, baseUrl, args)
@@ -9725,10 +9725,10 @@ function registerSpecTools(server, getToken, baseUrl) {
9725
9725
  server.registerTool(
9726
9726
  "talonic_get_spec",
9727
9727
  {
9728
- title: "Look up a pipeline",
9728
+ title: "Look up a Spec",
9729
9729
  description: GET_DESCRIPTION4,
9730
9730
  inputSchema: getSpecInputSchema,
9731
- annotations: { title: "Look up a pipeline", ...READ_ONLY6 },
9731
+ annotations: { title: "Look up a Spec", ...READ_ONLY6 },
9732
9732
  _meta: widgetToolMeta("getSpec")
9733
9733
  },
9734
9734
  async (args) => handleGetSpec(getToken, baseUrl, args)
@@ -9741,15 +9741,15 @@ function mapRunStatus(raw) {
9741
9741
  return "processing";
9742
9742
  }
9743
9743
  var RUN_DESCRIPTION3 = [
9744
- "Run a Spec \u2014 the customer's configured pipeline \u2014 over documents, in one call. Two inputs: `document_ids` (documents already in the workspace; for a new file, first talonic_request_upload \u2192 poll talonic_get_document until completed) OR `file_urls` (public https files, max 20; Talonic ingests them first). Consumes credits.",
9744
+ "Run one of the workspace's Specs over documents, in one call, and get one structured row per document. Two inputs: `document_ids` (documents already in the workspace; for a new file, first talonic_request_upload \u2192 poll talonic_get_document until completed) OR `file_urls` (public https files, max 20; Talonic fetches and reads them first). Consumes credits.",
9745
9745
  "",
9746
- "USE WHEN: the user wants to 'run the invoice pipeline on these documents', process files through their Spec, or produce the Spec's structured rows.",
9746
+ "USE WHEN: the user wants to 'run the invoice Spec on these documents', process files through their Spec, or produce the Spec's structured rows.",
9747
9747
  "NOT FOR: one-off extraction with an ad-hoc schema (talonic_extract), or checking progress (talonic_get_run) / reading rows (talonic_get_run_results).",
9748
- "ARGS: `spec_id` (talonic_list_specs); exactly one of `document_ids[]` (1\u2013500) or `file_urls[]` (1\u201320, https); optional `name`, `pipeline_mode` (`new` default | `append` to the Spec's existing pipeline); `batch_id` and flat `metadata` only with file_urls.",
9748
+ "ARGS: `spec_id` (talonic_list_specs); exactly one of `document_ids[]` (1\u2013500) or `file_urls[]` (1\u201320, https); optional `name`, `pipeline_mode` (`new` default | `append` to the Spec's current run); `batch_id` and flat `metadata` only with file_urls.",
9749
9749
  "RETURNS: RunEnvelope { run_kind ('pipeline'|'run'), run_id, pipeline_id, spec_id, status ('processing'|'completed'|'failed'), raw_status, input_count, documents?, message?, links }. Then poll talonic_get_run with the `pipeline_id` when run_kind is 'pipeline', or with the `run_id` when it is 'run', every 5\u201310 s until status is completed/failed, then talonic_get_run_results."
9750
9750
  ].join("\n");
9751
9751
  var GET_RUN_DESCRIPTION = [
9752
- "Poll a Spec run started by talonic_run_spec: normalised status plus document-level progress and, for pipelines, per-phase progress.",
9752
+ "Poll a Spec run started by talonic_run_spec: normalised status plus progress per document and, for run_kind 'pipeline', per step.",
9753
9753
  "",
9754
9754
  "USE WHEN: waiting for a run to finish \u2014 poll every 5\u201310 s; stop on `completed` or `failed`.",
9755
9755
  "NOT FOR: reading the structured rows (talonic_get_run_results) or starting a run (talonic_run_spec).",
@@ -9757,7 +9757,7 @@ var GET_RUN_DESCRIPTION = [
9757
9757
  "RETURNS: { run_kind, run_id, pipeline_id, spec_id, status, raw_status, input_count?, progress { total_documents, completed_documents, error_documents, phases?[] }, documents?[], error_message?, created_at, updated_at }."
9758
9758
  ].join("\n");
9759
9759
  var RESULTS_DESCRIPTION = [
9760
- "Read a Spec run's structured rows \u2014 one row per document with the Spec's fields as clean values (held/pending-review cells serialize null), plus the column definitions.",
9760
+ "Read a Spec run's structured rows \u2014 one row per document with the Spec's fields as clean values (values held for review come back null), plus the column definitions.",
9761
9761
  "",
9762
9762
  "USE WHEN: talonic_get_run reports `completed` (partial rows are also readable while `processing`).",
9763
9763
  "NOT FOR: progress (talonic_get_run) or per-field provenance of a single value (include: ['provenance'] here, or talonic_field_values).",
@@ -9773,7 +9773,7 @@ var runSpecInputSchema = {
9773
9773
  document_ids: documentIdsArg2,
9774
9774
  file_urls: fileUrlsArg,
9775
9775
  name: z.string().min(1).max(200).optional().describe("Display name for the run."),
9776
- pipeline_mode: z.enum(["new", "append"]).optional().describe("`new` (default) or `append` to the Spec's existing pipeline."),
9776
+ pipeline_mode: z.enum(["new", "append"]).optional().describe("`new` (default) or `append` to the Spec's current run."),
9777
9777
  batch_id: z.string().min(1).max(200).optional().describe("Caller grouping key (file_urls path only)."),
9778
9778
  metadata: metadataArg
9779
9779
  };
@@ -9783,7 +9783,7 @@ var runRefInputSchema = {
9783
9783
  };
9784
9784
  var resultsInputSchema = {
9785
9785
  run_id: uuid.optional().describe(
9786
- "The RunEnvelope's run_id. Alone: a run_kind 'run' submission (/v1/run). With pipeline_id: scopes the pipeline's rows to that submission."
9786
+ "The RunEnvelope's run_id. Alone: a run_kind 'run' submission (/v1/run). With pipeline_id: only the rows of that submission."
9787
9787
  ),
9788
9788
  pipeline_id: uuid.optional().describe(
9789
9789
  "The RunEnvelope's pipeline_id (run_kind 'pipeline'); rows come from /v1/pipelines/{id}/results."
@@ -9954,11 +9954,11 @@ function registerRunTools(server, getToken, baseUrl) {
9954
9954
  server.registerTool(
9955
9955
  "talonic_run_spec",
9956
9956
  {
9957
- title: "Run a pipeline",
9957
+ title: "Run a Spec",
9958
9958
  description: RUN_DESCRIPTION3,
9959
9959
  inputSchema: runSpecInputSchema,
9960
9960
  annotations: {
9961
- title: "Run a pipeline",
9961
+ title: "Run a Spec",
9962
9962
  readOnlyHint: false,
9963
9963
  destructiveHint: false,
9964
9964
  openWorldHint: true
@@ -9995,9 +9995,9 @@ var ASK_DEFAULT_WAIT_S = 45;
9995
9995
  var ASK_MAX_WAIT_S = 55;
9996
9996
  var POLL_HINT = "still processing \u2014 call talonic_get_answer with this ask_id in a few seconds";
9997
9997
  var ASK_DESCRIPTION = [
9998
- "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.",
9998
+ "Ask a natural-language question over the workspace's documents and get a cited, verified answer (markdown). Talonic looks across the extracted data and the documents' text, backs every claim that matters with a quote from a source document, and checks the answer before returning it. Consumes credits.",
9999
9999
  "",
10000
- "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.",
10000
+ "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 queries yourself; skip that exploration.",
10001
10001
  "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).",
10002
10002
  "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).",
10003
10003
  "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."
@@ -10014,7 +10014,7 @@ var uuid2 = zUuid();
10014
10014
  var scopeSchema = z.object({
10015
10015
  document_ids: z.array(uuid2).max(500).optional().describe("Only these documents."),
10016
10016
  schema_id: uuid2.optional().describe("Only documents extracted with this schema."),
10017
- pipeline_id: uuid2.optional().describe("Only documents of this pipeline run."),
10017
+ pipeline_id: uuid2.optional().describe("Only documents of this Spec run."),
10018
10018
  data_product_id: uuid2.optional().describe(
10019
10019
  "Only documents of this data product (a curated document collection; rarely needed)."
10020
10020
  ),
@@ -10027,11 +10027,13 @@ var scopeSchema = z.object({
10027
10027
  var askInputSchema = {
10028
10028
  question: z.string().min(1).max(4e3).describe("The question, in the user's words."),
10029
10029
  scope: scopeSchema,
10030
- conversation_id: uuid2.optional().describe("Continue this conversation; the agent sees prior turns."),
10030
+ conversation_id: uuid2.optional().describe("Continue this conversation; earlier questions and answers are taken into account."),
10031
10031
  output_format: z.object({
10032
10032
  instruction: z.string().max(1e3).optional(),
10033
10033
  template: z.string().max(4e3).optional()
10034
- }).optional().describe("Shape the answer (form only, never grounding)."),
10034
+ }).optional().describe(
10035
+ "Shape the answer's layout (a table, a list, a template); never changes which sources it rests on."
10036
+ ),
10035
10037
  wait_seconds: z.number().int().min(0).max(ASK_MAX_WAIT_S).optional().describe(
10036
10038
  `Seconds to wait for the answer before returning 'processing' (default ${ASK_DEFAULT_WAIT_S}, max ${ASK_MAX_WAIT_S}).`
10037
10039
  )
@@ -12232,7 +12234,7 @@ function registerToolGroups(server, keys, getToken, baseUrl) {
12232
12234
 
12233
12235
  // package.json
12234
12236
  var package_default = {
12235
- version: "0.1.105"};
12237
+ version: "0.1.106"};
12236
12238
 
12237
12239
  // src/version.ts
12238
12240
  var VERSION = package_default.version;