@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/CHANGELOG.md +6 -0
- package/dist/content.js +1 -1
- package/dist/content.js.map +1 -1
- package/dist/http-server.js +8 -7
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/server.js +8 -7
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1999,14 +1999,14 @@ function registerWidgets(server) {
|
|
|
1999
1999
|
for (const key of Object.keys(WIDGET_REGISTRY)) registerOne(server, key);
|
|
2000
2000
|
}
|
|
2001
2001
|
var DESCRIPTION = [
|
|
2002
|
-
"Extract structured, schema-validated JSON from a document: PDF, scan, image, DOCX, email, or photo. Returns the requested fields with per-field confidence scores.",
|
|
2002
|
+
"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.",
|
|
2003
2003
|
"",
|
|
2004
2004
|
"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.",
|
|
2005
2005
|
"NOT FOR: full plain text (use talonic_to_markdown) \xB7 finding documents (use talonic_search / talonic_filter).",
|
|
2006
2006
|
"BY NAME: if the user names a file, call talonic_search first to get its document_id, then call this.",
|
|
2007
2007
|
"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).",
|
|
2008
2008
|
"COST: each call uses credits; talonic_get_balance shows the remaining balance.",
|
|
2009
|
-
"RETURNS: data (the JSON), confidence.overall and confidence.fields (treat <0.7 as needs review), document metadata, extraction_id."
|
|
2009
|
+
"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."
|
|
2010
2010
|
].join("\n");
|
|
2011
2011
|
var inputSchema = {
|
|
2012
2012
|
file_data: z.string().optional().describe(
|
|
@@ -2779,7 +2779,7 @@ function registerSearch(server, getTalonic) {
|
|
|
2779
2779
|
var DESCRIPTION10 = [
|
|
2780
2780
|
"Get a browser upload link the user opens to add a file to their workspace. Returns the link plus a pre-allocated document_id.",
|
|
2781
2781
|
"",
|
|
2782
|
-
"USE WHEN: the user wants to upload a document and you cannot pass it directly
|
|
2782
|
+
"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.",
|
|
2783
2783
|
"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).",
|
|
2784
2784
|
"ARGS: filename (with extension).",
|
|
2785
2785
|
"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."
|
|
@@ -7381,7 +7381,7 @@ var LIST_TOOLS_DESCRIPTION = [
|
|
|
7381
7381
|
"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.",
|
|
7382
7382
|
"NOT FOR: discovering fields (talonic_list_fields / talonic_find_data) or documents (talonic_search) \u2014 those are shaped for you.",
|
|
7383
7383
|
"",
|
|
7384
|
-
"ARGS: `only_invocable` (default true \u2014 hide tools this
|
|
7384
|
+
"ARGS: `only_invocable` (default true \u2014 hide tools this credential cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
|
|
7385
7385
|
"RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }."
|
|
7386
7386
|
].join("\n");
|
|
7387
7387
|
var listAgentToolsInputSchema = {
|
|
@@ -7413,7 +7413,7 @@ async function handleListAgentTools(getToken, baseUrl, args) {
|
|
|
7413
7413
|
}
|
|
7414
7414
|
var INVOKE_DESCRIPTION = [
|
|
7415
7415
|
"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).",
|
|
7416
|
-
"READ-ONLY
|
|
7416
|
+
"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.",
|
|
7417
7417
|
"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).",
|
|
7418
7418
|
"",
|
|
7419
7419
|
"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.",
|
|
@@ -7972,7 +7972,7 @@ function registerAskTools(server, getToken, baseUrl) {
|
|
|
7972
7972
|
|
|
7973
7973
|
// package.json
|
|
7974
7974
|
var package_default = {
|
|
7975
|
-
version: "0.1.
|
|
7975
|
+
version: "0.1.93"};
|
|
7976
7976
|
|
|
7977
7977
|
// src/version.ts
|
|
7978
7978
|
var VERSION = package_default.version;
|
|
@@ -8001,7 +8001,8 @@ function buildServerInstructions(opts) {
|
|
|
8001
8001
|
"does not know the fields yet, auto_schema:true discovers them. Use talonic_to_markdown",
|
|
8002
8002
|
"for a document's full text.",
|
|
8003
8003
|
"If the user refers to a document by name (e.g. 'invoice.pdf'), call talonic_search to",
|
|
8004
|
-
"resolve the name to a document_id, then call the tool you need with
|
|
8004
|
+
"resolve the name to a document_id, then call talonic_extract (or the tool you need) with",
|
|
8005
|
+
"that id.",
|
|
8005
8006
|
"talonic_search matches literal keywords: query with one short term or an exact",
|
|
8006
8007
|
"filename; on an empty result, retry with a shorter keyword.",
|
|
8007
8008
|
"The Field Registry describes what data exists: talonic_find_data resolves a concept in",
|