@talonic/mcp 0.1.10 → 0.1.12
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/README.md +48 -10
- package/dist/content.d.ts +9 -9
- package/dist/content.js +768 -178
- package/dist/content.js.map +1 -1
- package/dist/http-server.js +120 -38
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +91 -26
- package/dist/index.js.map +1 -1
- package/dist/server.js +91 -26
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,11 @@ The package is on npm. Every MCP client launches it the same way: a one-line `np
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
The `-y` flag skips the npm install prompt.
|
|
33
|
+
The `-y` flag skips the npm install prompt.
|
|
34
|
+
|
|
35
|
+
**Version pinning.** `@latest` is fine for trying things out and for personal use. For production deployments and CI, pin to a specific version (e.g. `@talonic/mcp@0.1.10`) so a future release cannot silently change tool descriptions, validation rules, or the response shape your agent depends on. Bump the pin manually after reviewing the CHANGELOG.
|
|
36
|
+
|
|
37
|
+
Talonic uses a single API key per workspace. The same key authorises all tools. There is no scoping mechanism in v0.1; treat the key like any other secret and store it in your client's secret store rather than in version control.
|
|
34
38
|
|
|
35
39
|
Per-client snippets are below.
|
|
36
40
|
|
|
@@ -101,15 +105,49 @@ Open Cowork settings → MCP Servers → Add. Use the same shape as Claude Deskt
|
|
|
101
105
|
|
|
102
106
|
Each tool's description is written for an LLM, with explicit USE WHEN / DO NOT USE WHEN sections. Agents pick the right tool reliably without further prompting. Briefly:
|
|
103
107
|
|
|
104
|
-
- **`talonic_extract
|
|
105
|
-
- **`talonic_search
|
|
106
|
-
- **`talonic_filter
|
|
107
|
-
- **`talonic_get_document
|
|
108
|
-
- **`talonic_to_markdown
|
|
109
|
-
- **`talonic_list_schemas
|
|
110
|
-
- **`talonic_save_schema
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
- **`talonic_extract`**, status: stable. Extract structured, schema-validated data from a document. Inputs: one of `file_data` + `filename` (recommended for chat clients, see below), `file_path`, `file_url`, or `document_id`, plus a `schema` or `schema_id`. Returns JSON with `data`, per-field `confidence`, and document metadata. Schema is required; the MCP layer rejects schema-less calls.
|
|
109
|
+
- **`talonic_search`**, status: stable. Omnisearch across documents, fields, sources, and schemas in the workspace. Use for conceptual or fuzzy queries.
|
|
110
|
+
- **`talonic_filter`**, status: stable. Filter documents by extracted field values using composable conditions (`eq`, `gt`, `between`, `contains`, `is_empty`, etc.). Accepts canonical field names (e.g. `vendor.name`) which the Talonic API resolves to ids server-side, or UUIDs directly. `is_not_empty` is intentionally not exposed in v0.1; see [Known limitations](#known-limitations-v01).
|
|
111
|
+
- **`talonic_get_document`**, status: stable. Fetch full metadata for a single document by id, including processing log and link URLs.
|
|
112
|
+
- **`talonic_to_markdown`**, status: stable. Get OCR-converted markdown for a document. Accepts `document_id` (cheapest), `file_data` + `filename`, `file_path`, or `file_url`.
|
|
113
|
+
- **`talonic_list_schemas`**, status: stable. List all saved schemas with their definitions. Returns both UUID and SCH-XXXXXXXX short id; either is accepted by `talonic_extract`.
|
|
114
|
+
- **`talonic_save_schema`**, status: stable. Save a schema definition to the workspace for reuse.
|
|
115
|
+
|
|
116
|
+
Two resources are also exposed for clients that browse them separately (Claude Desktop and Cowork render these in the UI):
|
|
117
|
+
- `talonic://schemas`: saved-schemas list.
|
|
118
|
+
- `talonic://webhooks/reference`: webhook event types, delivery behavior, signature verification algorithms, and retry policies. Use this when an agent needs to set up or troubleshoot a webhook integration without leaving the MCP context.
|
|
119
|
+
|
|
120
|
+
## Agent decision guide
|
|
121
|
+
|
|
122
|
+
Pick the right tool before you call. The wrong tool returns the wrong data, costs unnecessary credits, and slows the conversation.
|
|
123
|
+
|
|
124
|
+
**User has a file (or just dropped one in)**
|
|
125
|
+
- They want specific fields (vendor, total, dates, parties): `talonic_extract` with `schema` or `schema_id`.
|
|
126
|
+
- They want full text content for summarisation, translation, or analysis: `talonic_to_markdown`.
|
|
127
|
+
- They want both: `talonic_extract` with `include_markdown: true`, one upload.
|
|
128
|
+
|
|
129
|
+
**User is asking about existing documents**
|
|
130
|
+
- Conceptual or fuzzy ("any docs about indemnification"): `talonic_search`.
|
|
131
|
+
- Value-based on extracted fields ("invoices over 1000 EUR"): `talonic_filter`.
|
|
132
|
+
- They reference a `document_id`: `talonic_get_document` for metadata, `talonic_to_markdown` for text, `talonic_extract` to re-extract with a new schema. Re-using a `document_id` is cheaper than re-uploading.
|
|
133
|
+
|
|
134
|
+
**User is working with schemas**
|
|
135
|
+
- One-off extraction: pass schema inline.
|
|
136
|
+
- Same schema across many documents: `talonic_save_schema` once, then `talonic_extract` with `schema_id`.
|
|
137
|
+
- Discover existing schemas first: `talonic_list_schemas`.
|
|
138
|
+
- Iterate inline before saving. Avoid clutter.
|
|
139
|
+
|
|
140
|
+
**Confidence and human review**
|
|
141
|
+
- `confidence.overall` below ~0.7: tell the user the extraction may be unreliable, surface low-confidence fields, confirm before any downstream action.
|
|
142
|
+
- Per-field confidence below ~0.7: mark as "needs review", do not use silently in calculations or external API calls.
|
|
143
|
+
- Critical fields (amounts, legal terms, names, dates): confirm with user before acting, even at high confidence.
|
|
144
|
+
- Per-field provenance (page, bbox) is not surfaced in v0.1. Send users to `links.dashboard` to verify against the source.
|
|
145
|
+
|
|
146
|
+
**When not to call Talonic**
|
|
147
|
+
- General-knowledge or chat questions. Do not pre-emptively extract.
|
|
148
|
+
- The data is already in conversation history from a previous tool call. Re-use it.
|
|
149
|
+
- The user wants to discuss or revise an extraction you already produced. Reason over the previous result instead of re-extracting.
|
|
150
|
+
- Cost, EUR price, and remaining balance are not surfaced in v0.1 tool responses. If the user asks about cost or credit balance, point them to https://app.talonic.com.
|
|
113
151
|
|
|
114
152
|
## Drag-and-drop in chat clients
|
|
115
153
|
|
package/dist/content.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** HTTP method for API endpoint blocks. */
|
|
2
|
-
type HttpMethod =
|
|
2
|
+
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
3
3
|
/** A single parameter row in a param-table block. */
|
|
4
4
|
interface Param {
|
|
5
5
|
name: string;
|
|
@@ -17,32 +17,32 @@ interface Param {
|
|
|
17
17
|
* - `[text](url)` for links
|
|
18
18
|
*/
|
|
19
19
|
type DocBlock = {
|
|
20
|
-
type:
|
|
20
|
+
type: "heading";
|
|
21
21
|
level: 2 | 3;
|
|
22
22
|
id: string;
|
|
23
23
|
text: string;
|
|
24
24
|
} | {
|
|
25
|
-
type:
|
|
25
|
+
type: "paragraph";
|
|
26
26
|
text: string;
|
|
27
27
|
} | {
|
|
28
|
-
type:
|
|
28
|
+
type: "code";
|
|
29
29
|
language?: string;
|
|
30
30
|
title?: string;
|
|
31
31
|
code: string;
|
|
32
32
|
} | {
|
|
33
|
-
type:
|
|
34
|
-
variant?:
|
|
33
|
+
type: "callout";
|
|
34
|
+
variant?: "info" | "warning";
|
|
35
35
|
text: string;
|
|
36
36
|
} | {
|
|
37
|
-
type:
|
|
37
|
+
type: "param-table";
|
|
38
38
|
title?: string;
|
|
39
39
|
params: Param[];
|
|
40
40
|
} | {
|
|
41
|
-
type:
|
|
41
|
+
type: "list";
|
|
42
42
|
ordered?: boolean;
|
|
43
43
|
items: string[];
|
|
44
44
|
} | {
|
|
45
|
-
type:
|
|
45
|
+
type: "endpoint";
|
|
46
46
|
method: HttpMethod;
|
|
47
47
|
path: string;
|
|
48
48
|
summary: string;
|