@talonic/mcp 0.1.92 → 0.1.93

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.
@@ -2014,14 +2014,14 @@ function registerWidgets(server) {
2014
2014
  for (const key of Object.keys(WIDGET_REGISTRY)) registerOne(server, key);
2015
2015
  }
2016
2016
  var DESCRIPTION = [
2017
- "Extract structured, schema-validated JSON from a document: PDF, scan, image, DOCX, email, or photo. Returns the requested fields with per-field confidence scores.",
2017
+ "Extract structured, schema-validated JSON from a document: PDF, scan, image, DOCX, email, or photo. Returns the requested fields with per-field confidence scores and, with include_provenance, the page and source text each value came from.",
2018
2018
  "",
2019
2019
  "USE WHEN: the user asks to extract data from a document, turn a PDF into JSON, pull fields from a file, or parse a scan / form / statement / receipt / report, for common (invoice, contract) or unusual document types.",
2020
2020
  "NOT FOR: full plain text (use talonic_to_markdown) \xB7 finding documents (use talonic_search / talonic_filter).",
2021
2021
  "BY NAME: if the user names a file, call talonic_search first to get its document_id, then call this.",
2022
2022
  "ARGS: define the fields you want with inline `schema` (JSON Schema, e.g. {type:'object',properties:{vendor_name:{type:'string'}}}) OR a saved `schema_id`, not both. Don't know the fields yet? Set `auto_schema:true` to let Talonic discover them (open capture) and return a suggested schema you can refine. Provide EXACTLY ONE document source: `document_id` (cheapest, a workspace doc), `file_url` (public URL), or `file_data`+`filename` (small local files only).",
2023
2023
  "COST: each call uses credits; talonic_get_balance shows the remaining balance.",
2024
- "RETURNS: data (the JSON), confidence.overall and confidence.fields (treat <0.7 as needs review), document metadata, extraction_id."
2024
+ "RETURNS: data (the JSON), confidence.overall and confidence.fields (treat <0.7 as needs review), provenance per field when include_provenance is set, document metadata, extraction_id."
2025
2025
  ].join("\n");
2026
2026
  var inputSchema = {
2027
2027
  file_data: z.string().optional().describe(
@@ -2794,7 +2794,7 @@ function registerSearch(server, getTalonic) {
2794
2794
  var DESCRIPTION10 = [
2795
2795
  "Get a browser upload link the user opens to add a file to their workspace. Returns the link plus a pre-allocated document_id.",
2796
2796
  "",
2797
- "USE WHEN: the user wants to upload a document and you cannot pass it directly \u2014 hosted/sandboxed clients (ChatGPT, Claude.ai) or files too large for tool-call arguments.",
2797
+ "USE WHEN: the user wants to upload a document and you cannot pass it directly: the client cannot attach file bytes to a tool call, or the file is too large for tool-call arguments.",
2798
2798
  "NOT FOR: a document already in the workspace (use its document_id) \xB7 a file already on a public URL (use file_url on talonic_extract).",
2799
2799
  "ARGS: filename (with extension).",
2800
2800
  "RETURNS: upload_url, document_id, expires_at. After the user uploads, poll talonic_get_document on that document_id until status is 'completed', then call talonic_extract. If status becomes ocr_failed, extraction_failed, or error, stop polling and report the failure to the user."
@@ -7408,7 +7408,7 @@ var LIST_TOOLS_DESCRIPTION = [
7408
7408
  "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.",
7409
7409
  "NOT FOR: discovering fields (talonic_list_fields / talonic_find_data) or documents (talonic_search) \u2014 those are shaped for you.",
7410
7410
  "",
7411
- "ARGS: `only_invocable` (default true \u2014 hide tools this key cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
7411
+ "ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
7412
7412
  "RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }."
7413
7413
  ].join("\n");
7414
7414
  var listAgentToolsInputSchema = {
@@ -7440,7 +7440,7 @@ async function handleListAgentTools(getToken, baseUrl, args) {
7440
7440
  }
7441
7441
  var INVOKE_DESCRIPTION = [
7442
7442
  "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).",
7443
- "READ-ONLY BY CONSTRUCTION: API-key credentials are restricted by the platform to the registry's read-only tools (capability `data.read`); write-capable registry tools are never invocable through this credential, so through an API-key credential this tool reads and never mutates workspace data.",
7443
+ "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.",
7444
7444
  "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).",
7445
7445
  "",
7446
7446
  "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.",
@@ -7999,7 +7999,7 @@ function registerAskTools(server, getToken, baseUrl) {
7999
7999
 
8000
8000
  // package.json
8001
8001
  var package_default = {
8002
- version: "0.1.92"};
8002
+ version: "0.1.93"};
8003
8003
 
8004
8004
  // src/version.ts
8005
8005
  var VERSION = package_default.version;
@@ -8028,7 +8028,8 @@ function buildServerInstructions(opts) {
8028
8028
  "does not know the fields yet, auto_schema:true discovers them. Use talonic_to_markdown",
8029
8029
  "for a document's full text.",
8030
8030
  "If the user refers to a document by name (e.g. 'invoice.pdf'), call talonic_search to",
8031
- "resolve the name to a document_id, then call the tool you need with that id.",
8031
+ "resolve the name to a document_id, then call talonic_extract (or the tool you need) with",
8032
+ "that id.",
8032
8033
  "talonic_search matches literal keywords: query with one short term or an exact",
8033
8034
  "filename; on an empty result, retry with a shorter keyword.",
8034
8035
  "The Field Registry describes what data exists: talonic_find_data resolves a concept in",