@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.
package/dist/index.js CHANGED
@@ -1996,14 +1996,14 @@ function registerWidgets(server) {
1996
1996
  for (const key of Object.keys(WIDGET_REGISTRY)) registerOne(server, key);
1997
1997
  }
1998
1998
  var DESCRIPTION = [
1999
- "Extract structured, schema-validated JSON from a document: PDF, scan, image, DOCX, email, or photo. Returns the requested fields with per-field confidence scores.",
1999
+ "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.",
2000
2000
  "",
2001
2001
  "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.",
2002
2002
  "NOT FOR: full plain text (use talonic_to_markdown) \xB7 finding documents (use talonic_search / talonic_filter).",
2003
2003
  "BY NAME: if the user names a file, call talonic_search first to get its document_id, then call this.",
2004
2004
  "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).",
2005
2005
  "COST: each call uses credits; talonic_get_balance shows the remaining balance.",
2006
- "RETURNS: data (the JSON), confidence.overall and confidence.fields (treat <0.7 as needs review), document metadata, extraction_id."
2006
+ "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."
2007
2007
  ].join("\n");
2008
2008
  var inputSchema = {
2009
2009
  file_data: z.string().optional().describe(
@@ -2776,7 +2776,7 @@ function registerSearch(server, getTalonic) {
2776
2776
  var DESCRIPTION10 = [
2777
2777
  "Get a browser upload link the user opens to add a file to their workspace. Returns the link plus a pre-allocated document_id.",
2778
2778
  "",
2779
- "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.",
2779
+ "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.",
2780
2780
  "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).",
2781
2781
  "ARGS: filename (with extension).",
2782
2782
  "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."
@@ -7279,7 +7279,7 @@ var LIST_TOOLS_DESCRIPTION = [
7279
7279
  "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.",
7280
7280
  "NOT FOR: discovering fields (talonic_list_fields / talonic_find_data) or documents (talonic_search) \u2014 those are shaped for you.",
7281
7281
  "",
7282
- "ARGS: `only_invocable` (default true \u2014 hide tools this key cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
7282
+ "ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
7283
7283
  "RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }."
7284
7284
  ].join("\n");
7285
7285
  var listAgentToolsInputSchema = {
@@ -7311,7 +7311,7 @@ async function handleListAgentTools(getToken, baseUrl, args) {
7311
7311
  }
7312
7312
  var INVOKE_DESCRIPTION = [
7313
7313
  "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).",
7314
- "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.",
7314
+ "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.",
7315
7315
  "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).",
7316
7316
  "",
7317
7317
  "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.",
@@ -7870,7 +7870,7 @@ function registerAskTools(server, getToken, baseUrl) {
7870
7870
 
7871
7871
  // package.json
7872
7872
  var package_default = {
7873
- version: "0.1.92"};
7873
+ version: "0.1.93"};
7874
7874
 
7875
7875
  // src/version.ts
7876
7876
  var VERSION = package_default.version;
@@ -7899,7 +7899,8 @@ function buildServerInstructions(opts) {
7899
7899
  "does not know the fields yet, auto_schema:true discovers them. Use talonic_to_markdown",
7900
7900
  "for a document's full text.",
7901
7901
  "If the user refers to a document by name (e.g. 'invoice.pdf'), call talonic_search to",
7902
- "resolve the name to a document_id, then call the tool you need with that id.",
7902
+ "resolve the name to a document_id, then call talonic_extract (or the tool you need) with",
7903
+ "that id.",
7903
7904
  "talonic_search matches literal keywords: query with one short term or an exact",
7904
7905
  "filename; on an empty result, retry with a shorter keyword.",
7905
7906
  "The Field Registry describes what data exists: talonic_find_data resolves a concept in",