@talonic/docs 0.21.32 → 0.21.34

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/content.js CHANGED
@@ -19270,9 +19270,9 @@ var sections32 = [
19270
19270
  seoTitle: "Get Resolution Results: Original vs Resolved \u2014 Talonic Docs",
19271
19271
  description: "Read a resolution run's per-field results with GET /v1/resolutions/{id}/results: original vs resolved values, the resolution step applied, and confidence.",
19272
19272
  content: [
19273
- { type: "paragraph", text: "Retrieve the **resolution results** for a run. Each entry in `data` reports resolved output for the run's documents: the raw extracted value alongside the canonical value resolution produced, the `resolution_step` (strategy) that made the match, and a `confidence` score. Result rows exist from the moment the run is created \u2014 one per source document, initially empty \u2014 and fill in as execution progresses, so an early read returning sparse rows is normal, not an error." },
19273
+ { type: "paragraph", text: "Retrieve the **resolution results** for a run. `data` holds one row per document **and field**: the raw extracted value alongside the canonical value resolution produced, the `resolution_step` (strategy) that made the match, and a `confidence` score. Rows appear as documents finish resolving, so an early read during `processing` returns only the documents flushed so far; a document that has not produced any field yet contributes no rows." },
19274
19274
  { type: "paragraph", text: "Rows are returned oldest-first (`created_at` ascending) with no pagination. Results are also filtered by source visibility: rows whose document is hidden from you under your organization's source visibility rules are dropped from the response entirely, so two API keys can legitimately see different row counts for the same run." },
19275
- { type: "callout", variant: "info", text: "The resolution_step field indicates which strategy produced the resolved value: lookup (reference table match), transfer (registry transfer), compute (deterministic computation), or null if no resolution was applied to the value." },
19275
+ { type: "callout", variant: "info", text: "resolution_step names the strategy that produced the resolved value \u2014 for example lookup (reference table match), registry_transfer, deterministic_compute, or source_extraction when the extracted value stood as-is. It is null when the engine recorded no method for the cell." },
19276
19276
  {
19277
19277
  type: "endpoint",
19278
19278
  method: "GET",
@@ -19302,13 +19302,15 @@ var sections32 = [
19302
19302
  title: "Response fields",
19303
19303
  params: [
19304
19304
  { name: "data", type: "array", description: "Array of resolution result objects, ordered by created_at ascending." },
19305
- { name: "data[].id", type: "string", description: "Result UUID." },
19305
+ { name: "data[].id", type: "string", description: "Row identifier: the document result UUID and the field key joined by a colon." },
19306
+ { name: "data[].result_id", type: "string", description: "UUID of the per-document result row this field belongs to." },
19306
19307
  { name: "data[].resolution_run_id", type: "string", description: "Parent resolution run UUID." },
19307
19308
  { name: "data[].document_id", type: "string", description: "Document UUID this result belongs to." },
19308
- { name: "data[].field_name", type: "string | null", description: "Field key that was resolved." },
19309
- { name: "data[].original_value", type: "string | null", description: "Raw extracted value before resolution." },
19310
- { name: "data[].resolved_value", type: "string | null", description: "Canonical value after resolution." },
19311
- { name: "data[].resolution_step", type: "string | null", description: "Strategy that produced the resolved value (lookup, transfer, compute), or null." },
19309
+ { name: "data[].status", type: "string", description: "The document result's status: pending, processing, completed, or failed." },
19310
+ { name: "data[].field_name", type: "string", description: "Field key that was resolved." },
19311
+ { name: "data[].original_value", type: "any | null", description: "Raw extracted value before resolution." },
19312
+ { name: "data[].resolved_value", type: "any | null", description: "Canonical value after resolution." },
19313
+ { name: "data[].resolution_step", type: "string | null", description: "Strategy that produced the resolved value (for example lookup, registry_transfer, deterministic_compute, source_extraction), or null." },
19312
19314
  { name: "data[].confidence", type: "number | null", description: "Confidence score for the resolved value (0-1), or null when not applicable." },
19313
19315
  { name: "data[].created_at", type: "string", description: "ISO 8601 timestamp." }
19314
19316
  ]
@@ -19319,9 +19321,11 @@ var sections32 = [
19319
19321
  code: `{
19320
19322
  "data": [
19321
19323
  {
19322
- "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
19324
+ "id": "c3d4e5f6-a7b8-9012-cdef-123456789012:country",
19325
+ "result_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
19323
19326
  "resolution_run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
19324
19327
  "document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
19328
+ "status": "completed",
19325
19329
  "field_name": "country",
19326
19330
  "original_value": "Deutschland",
19327
19331
  "resolved_value": "DE",
@@ -19332,7 +19336,7 @@ var sections32 = [
19332
19336
  ]
19333
19337
  }`
19334
19338
  },
19335
- { type: "paragraph", text: "Use `resolution_step` to understand how each value was normalized: `lookup` indicates a direct reference table match, `transfer` means the value was carried from the field registry, and `compute` means a deterministic formula produced the result. A `null` `resolved_value` means no strategy matched \u2014 the raw extracted value stands. Recurring unmatched values are the signal to extend your reference tables before the next run." },
19339
+ { type: "paragraph", text: "Use `resolution_step` to understand how each value was normalized: `lookup` indicates a direct reference table match, `registry_transfer` means the value was carried from the field registry, `deterministic_compute` means a formula produced the result, and `source_extraction` means the extracted value stood as-is. A `null` `resolved_value` means no strategy produced a value for the field. Recurring unmatched values are the signal to extend your reference tables before the next run." },
19336
19340
  { type: "paragraph", text: "Read results only after [`GET /v1/resolutions/{id}`](get-resolution) reports `completed` when you need the final picture \u2014 during `processing` the endpoint serves whatever has been flushed so far, which is useful for progress display but not for downstream consumption. For delivery-shaped output (dialect renames, suppressed fields, casts applied), configure the run's schema with a dialect and consume the run through your delivery destinations instead of re-implementing that shaping client-side." },
19337
19341
  { type: "heading", level: 2, id: "get-resolution-results-errors", text: "Errors" },
19338
19342
  {
@@ -19354,7 +19358,7 @@ var sections32 = [
19354
19358
  ],
19355
19359
  faq: [
19356
19360
  { question: "What does it mean when resolved_value is null?", answer: "No resolution strategy could match the original value to a canonical form, so the field keeps its raw extracted value. Recurring unmatched values are the signal to add entries to your reference tables \u2014 the next run created after the edit picks them up." },
19357
- { question: "Why does the endpoint return rows before the run is completed?", answer: "Result rows are pre-created when the resolution is created (one per source document) and filled in as batches flush during execution. Partial reads are useful for progress display; wait for the run status to reach completed before consuming results downstream." },
19361
+ { question: "Why does the endpoint return rows before the run is completed?", answer: "Per-document results are flushed in batches during execution, and each flushed document contributes one row per field. Partial reads are useful for progress display; wait for the run status to reach completed before consuming results downstream." },
19358
19362
  { question: "Why do I see fewer rows than the source run has documents?", answer: "Results are filtered by your organization's source visibility rules: rows for documents hidden from your API key's user are dropped from the response. A key minted by a user with broader visibility can see more rows for the same run." },
19359
19363
  { question: "Can I use resolution results in a data product?", answer: "Yes. Pass the completed resolution run's UUID in the run_ids array of POST /v1/data-products to assemble the resolved values into a data product ready for export or delivery." }
19360
19364
  ],
@@ -23363,7 +23367,7 @@ var sections38 = [
23363
23367
  { type: "paragraph", text: "This namespace is **Benchmarks** (the `/v1/validation` namespace): measuring how accurately a completed job run extracted data, by comparing its output against manually verified expected values. It is not the in-pipeline validation checks (see the Structuring API) that gate individual results before delivery \u2014 those keep the Validation name. `GET /v1/validation/ground-truth` lists the **golden samples** those accuracy measurements run against." },
23364
23368
  { type: "paragraph", text: "A **golden sample** (shown as Ground Truth in the platform) is a curated set of verified document-field value pairs: each entry names a `document_id`, a `field_name`, and the `expected_value` a correct extraction should produce. Every golden sample is bound to exactly one schema via `user_schema_id` \u2014 the schema whose fields the expected values describe \u2014 so a validation run always compares like with like. API payloads reference a dataset through the `golden_sample_id` field." },
23365
23369
  { type: "paragraph", text: "Do not confuse golden samples with the benchmark datasets under [`/v1/quality/ground-truth`](list-quality-datasets). Both store verified values, but a `/v1/quality` dataset holds one `expected_data` object per document and feeds repeatable benchmark runs, while a golden sample holds individual per-field expected values and scores **one specific Structuring Run** (a job run) via `POST /v1/validation/runs`." },
23366
- { type: "paragraph", text: "The list returns every golden sample in your organization, newest first, in a single response \u2014 there are no pagination parameters on this endpoint. Note that `entry_count` is a reserved field and currently always `null` through the public API; to count a dataset's entries, fetch the [detail endpoint](get-ground-truth) and measure its `values` array. Golden samples are curated in the Talonic platform (Review → Benchmarks); through the public API you list them, inspect their expected values, delete them, and run benchmarks against them." },
23370
+ { type: "paragraph", text: "The list returns every golden sample in your organization, newest first, in a single response \u2014 there are no pagination parameters on this endpoint. `entry_count` is the number of expected values stored on the sample (one per document-field pair). Golden samples are curated in the Talonic platform (Review → Benchmarks); through the public API you list them, inspect their expected values, delete them, and run benchmarks against them." },
23367
23371
  { type: "paragraph", text: "A typical integration lists datasets, picks the one matching the schema of the Structuring Run it wants to score, then passes its `id` as `golden_sample_id` to [`POST /v1/validation/runs`](create-validation-run). Because each dataset is schema-bound, filter client-side on `user_schema_id` to find the dataset that matches the run you are validating." },
23368
23372
  { type: "callout", variant: "info", text: "Golden samples are reusable. Curate a dataset once and benchmark against it repeatedly as you refine your schemas and extraction pipeline \u2014 each validation run references the dataset, it never consumes it." },
23369
23373
  {
@@ -23448,7 +23452,7 @@ var sections38 = [
23448
23452
  content: [
23449
23453
  { type: "paragraph", text: "`GET /v1/validation/ground-truth/{id}` retrieves the full detail of a **golden sample** (Ground Truth dataset), including every manually verified expected value entry; `DELETE` on the same path permanently removes it. These datasets are the reference side of Benchmarks: accuracy measurement of extraction output, distinct from the in-pipeline checks that gate results before delivery." },
23450
23454
  { type: "paragraph", text: "Call GET before starting a validation run to verify that expected values are correct and complete. The `values` array contains every document-field pair with its `expected_value`, `document_id`, and `field_name`, ordered oldest-first. Review these to ensure the benchmark data reflects your current extraction requirements \u2014 a stale expected value shows up later as a false mismatch in run results, and a systematically wrong one silently caps the best score any run can achieve." },
23451
- { type: "paragraph", text: "The `values` array is filtered by document visibility: if source IAM rules hide a document from the user who minted your API key, that document's expected values are omitted from the response. `user_schema_id` confirms which schema the dataset is bound to (it is always set), and `entry_count` is reserved \u2014 currently always `null` through the public API, so use `values.length` as the authoritative entry count." },
23455
+ { type: "paragraph", text: "The `values` array is filtered by document visibility: if source IAM rules hide a document from the user who minted your API key, that document's expected values are omitted from the response. `user_schema_id` confirms which schema the dataset is bound to (it is always set). `entry_count` on the detail response is `null`; `values.length` is the count after visibility filtering, and the list endpoint reports the unfiltered total." },
23452
23456
  { type: "paragraph", text: "Deleting a golden sample is destructive beyond the dataset itself: **validation runs that reference the dataset are removed with it** (the reference cascades), along with their per-field results. Export or record any scores you need before deleting. To update individual entries, recreate the dataset in the Talonic platform with corrected values and point new validation runs at it." },
23453
23457
  { type: "callout", variant: "warning", text: "DELETE cascades: removing a golden sample also removes the validation runs that were scored against it, including their per-field results. This is not a soft delete \u2014 capture any accuracy history you need before calling it." },
23454
23458
  {
@@ -23550,8 +23554,8 @@ var sections38 = [
23550
23554
  description: "List validation runs with GET /v1/validation/runs. Each run scores a job run against a golden sample dataset; poll status and drill into per-field results.",
23551
23555
  content: [
23552
23556
  { type: "paragraph", text: "A **validation run** is a benchmark: it compares the structured output of one job run (a **Structuring Run** in the platform) against a golden sample dataset and produces per-field comparison records. `GET /v1/validation/runs` lists the newest 100 validation runs for your organization, most recent first. This is Benchmarks \u2014 accuracy measurement after the fact \u2014 not the in-pipeline validation checks that gate results before delivery." },
23553
- { type: "paragraph", text: "Each run carries a `status` from the lifecycle `pending` → `queued` → `processing` → `completed` (or `failed`). Runs created through the public API start in `pending`; runs launched from the platform's Benchmarks surface move through `processing` as comparisons execute. There is no `running` status \u2014 poll for `completed` or `failed` as the terminal states." },
23554
- { type: "paragraph", text: 'The `accuracy` and `total_comparisons` fields in this response are **reserved and currently always `null`** through the public API, regardless of run status \u2014 the engine stores its scores internally in a different shape. To measure accuracy programmatically, fetch [`GET /v1/validation/runs/{id}/results`](get-validation-results) and compute over the per-field rows (for example, the share of `match_type: "exact"` rows), or read the score in the platform UI.' },
23557
+ { type: "paragraph", text: "Each run carries a `status` from the lifecycle `pending` → `queued` → `processing` → `completed` (or `failed`). Runs created through the public API execute in the request and come back already `completed` or `failed`; only runs created from older clients can still sit in `pending`. There is no `running` status." },
23558
+ { type: "paragraph", text: "`accuracy` is the run's weighted score across all fields and documents (0-1) and `total_comparisons` is the number of document-field pairs compared; both are `null` until the run completes. `field_accuracy` carries the per-field breakdown (match-type counts and a per-field score), and `matched_documents` / `unmatched_golden` / `unmatched_dataset` show how many documents were paired. For row-level detail, fetch [`GET /v1/validation/runs/{id}/results`](get-validation-results)." },
23555
23559
  { type: "paragraph", text: "The list includes every validation run in the organization, not only API-created ones: benchmarks launched from the platform (golden-sample comparisons, CSV comparisons, unified and LLM-judge runs) appear here too, serialized to the same shape. Use `dataspace_run_id` to correlate a run with the job it scored and `golden_sample_id` to correlate it with its dataset; both come back `null` on run types that do not use them (a CSV comparison has no job run, for example)." },
23556
23560
  { type: "callout", variant: "info", text: "The list returns up to 100 runs ordered by `created_at` descending, with no pagination. Delete obsolete runs with `DELETE /v1/validation/runs/{id}` if older runs you still need fall outside the window." },
23557
23561
  {
@@ -23580,8 +23584,13 @@ var sections38 = [
23580
23584
  { name: "data[].status", type: "string", description: "Run status: pending, queued, processing, completed, or failed." },
23581
23585
  { name: "data[].dataspace_run_id", type: "string | null", description: "UUID of the job run (Structuring Run) being validated." },
23582
23586
  { name: "data[].golden_sample_id", type: "string | null", description: "UUID of the golden sample dataset." },
23583
- { name: "data[].accuracy", type: "null", description: "Reserved. Currently always null through the public API \u2014 compute scores from the results endpoint." },
23584
- { name: "data[].total_comparisons", type: "null", description: "Reserved. Currently always null through the public API \u2014 count rows on the results endpoint." },
23587
+ { name: "data[].accuracy", type: "number | null", description: "Weighted accuracy across all fields and documents (0-1). Null until the run completes." },
23588
+ { name: "data[].total_comparisons", type: "integer | null", description: "Number of document-field pairs compared. Null until the run completes." },
23589
+ { name: "data[].matched_documents", type: "integer", description: "Documents paired between the job run and the golden sample." },
23590
+ { name: "data[].unmatched_golden", type: "integer", description: "Golden sample documents with no corresponding job-run document." },
23591
+ { name: "data[].unmatched_dataset", type: "integer", description: "Job-run documents with no corresponding golden sample document." },
23592
+ { name: "data[].field_accuracy", type: "object | null", description: "Per-field breakdown: total, exact, partial, mismatch, missing_actual, missing_expected, both_empty, accuracy." },
23593
+ { name: "data[].error_message", type: "string | null", description: "Why a failed run failed." },
23585
23594
  { name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
23586
23595
  { name: "data[].completed_at", type: "string | null", description: "ISO 8601 completion timestamp." },
23587
23596
  { name: "data[].links", type: "object", description: "Related resource URLs (self, results)." }
@@ -23598,8 +23607,13 @@ var sections38 = [
23598
23607
  "status": "completed",
23599
23608
  "dataspace_run_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
23600
23609
  "golden_sample_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
23601
- "accuracy": null,
23602
- "total_comparisons": null,
23610
+ "accuracy": 0.9412,
23611
+ "total_comparisons": 68,
23612
+ "matched_documents": 17,
23613
+ "unmatched_golden": 0,
23614
+ "unmatched_dataset": 2,
23615
+ "field_accuracy": { "invoice_number": { "total": 17, "exact": 17, "partial": 0, "mismatch": 0, "missing_actual": 0, "missing_expected": 0, "both_empty": 0, "accuracy": 1 } },
23616
+ "error_message": null,
23603
23617
  "created_at": "2024-09-14T10:32:00.000Z",
23604
23618
  "completed_at": "2024-09-14T10:35:00.000Z",
23605
23619
  "links": {
@@ -23627,9 +23641,9 @@ var sections38 = [
23627
23641
  ],
23628
23642
  faq: [
23629
23643
  { question: "How many validation runs are returned?", answer: "Up to 100 runs are returned, ordered by created_at descending, in a single response without pagination. Older runs beyond the newest 100 are not listed." },
23630
- { question: "Why is accuracy always null in the list response?", answer: "The accuracy and total_comparisons fields are reserved and not populated by the current public serializer, even for completed runs. Compute scores from the per-field rows on GET /v1/validation/runs/{id}/results, or read them in the platform UI." },
23644
+ { question: "Why is accuracy null on a run?", answer: "The run has not completed. accuracy and total_comparisons are filled in when the comparison finishes; a failed run keeps them null and explains itself in error_message." },
23631
23645
  { question: "What is dataspace_run_id in the response?", answer: "It is the UUID of the job run (Structuring Run) whose output was validated. golden_sample_id identifies the golden sample dataset the output was compared against." },
23632
- { question: "What statuses can a validation run have?", answer: "pending (created, not yet executing), queued and processing (the engine is comparing), then completed or failed. API-created runs start in pending; there is no running status." },
23646
+ { question: "What statuses can a validation run have?", answer: "pending, queued and processing while the engine is comparing, then completed or failed. Runs created through the public API execute in the request and return already completed or failed; there is no running status." },
23633
23647
  { question: "Can I filter the run list by job or dataset?", answer: "No \u2014 the endpoint takes no query parameters. Fetch the newest 100 runs and filter client-side on dataspace_run_id or golden_sample_id. If runs you need regularly fall outside the 100-run window, delete superseded runs to keep the window useful." }
23634
23648
  ],
23635
23649
  mentions: ["validation runs", "accuracy tracking", "golden_sample_id", "dataspace_run_id", "run status", "Structuring Run"]
@@ -23642,10 +23656,10 @@ var sections38 = [
23642
23656
  description: "Start a validation run with POST /v1/validation/runs, registering a benchmark of one job run against a golden sample for per-field extraction accuracy.",
23643
23657
  content: [
23644
23658
  { type: "paragraph", text: "`POST /v1/validation/runs` registers a **validation run**: a benchmark that compares the output of one **job run** (Structuring Run) against a **golden sample** of verified expected values. When the run executes, the engine classifies every document-field pair as `exact`, `partial`, or `mismatch` (plus missing-value categories), and an optional LLM judge pass adds semantic verdicts. This measures accuracy after extraction, unlike the in-pipeline checks that gate results before delivery." },
23645
- { type: "paragraph", text: 'The endpoint validates both references before inserting: `dataspace_run_id` is checked first (404 `"Job run ... not found."`), then `golden_sample_id` (404 `"Golden sample ... not found."`); both must be UUID v4 or the request fails with `400 VALIDATION_ERROR`. On success the run is created with `status: "pending"` and returned immediately \u2014 the API call records the benchmark request, it does not perform the comparison in-band.' },
23646
- { type: "paragraph", text: "Execution is driven by the platform's Benchmarks engine, so a run created here can stay `pending` until a comparison is launched for it from the platform (Review → Benchmarks). If you need scores on a schedule, launch benchmarks from the platform and use the API to list runs and pull per-field results. Poll [`GET /v1/validation/runs/{id}`](get-validation-run) for the `completed` or `failed` terminal states." },
23659
+ { type: "paragraph", text: 'The endpoint validates both references before inserting: `dataspace_run_id` is checked first (404 `"Job run ... not found."`), then `golden_sample_id` (404 `"Golden sample ... not found."`); both must be UUID v4 or the request fails with `400 VALIDATION_ERROR`. The job run must be `completed` (a 400 `validation_error` otherwise) and must use the same schema as the golden sample. On success the comparison runs in the request and the run is returned already `completed`, with `accuracy`, `total_comparisons` and `field_accuracy` populated; if the engine hits an error the run is returned as `failed` with `error_message`.' },
23660
+ { type: "paragraph", text: "This is the same engine the platform's Benchmarks surface (Review → Benchmarks) runs, so scores from the API and the dashboard agree. A golden sample with a few hundred values compares in well under a second; the request returns when the comparison is done, so there is nothing to poll." },
23647
23661
  { type: "paragraph", text: "For a meaningful benchmark, validate a **completed** Structuring Run whose schema matches the golden sample's `user_schema_id` \u2014 the engine compares field names defined by that schema, so a schema mismatch produces mostly missing comparisons rather than an error at creation time. If `name` is omitted, the run is named `Validation YYYY-MM-DD` from the creation date; use explicit names when creating several runs a day, since the list endpoint has no filters." },
23648
- { type: "callout", variant: "warning", text: "Creating a run through the API does not start the comparison: the run is registered in `pending` status and executes when a benchmark is launched for it from the platform. Do not build a tight poll loop that expects `completed` within seconds of the POST." },
23662
+ { type: "callout", variant: "info", text: "Runs are cheap and independent. Create one per job run you want scored and compare them over time with [`GET /v1/validation/runs`](list-validation-runs)." },
23649
23663
  {
23650
23664
  type: "endpoint",
23651
23665
  method: "POST",
@@ -23693,11 +23707,13 @@ var sections38 = [
23693
23707
  params: [
23694
23708
  { name: "id", type: "string", description: "Validation run UUID." },
23695
23709
  { name: "name", type: "string", description: "Run name." },
23696
- { name: "status", type: "string", description: "Initial status, always pending." },
23710
+ { name: "status", type: "string", description: "completed, or failed when the engine hit an error (see error_message)." },
23697
23711
  { name: "dataspace_run_id", type: "string", description: "UUID of the job run being validated." },
23698
23712
  { name: "golden_sample_id", type: "string", description: "UUID of the golden sample dataset." },
23699
- { name: "accuracy", type: "null", description: "Reserved \u2014 currently always null through the public API." },
23700
- { name: "total_comparisons", type: "null", description: "Reserved \u2014 currently always null through the public API." },
23713
+ { name: "accuracy", type: "number | null", description: "Weighted accuracy across all fields and documents (0-1); null on a failed run." },
23714
+ { name: "total_comparisons", type: "integer | null", description: "Number of document-field pairs compared; null on a failed run." },
23715
+ { name: "field_accuracy", type: "object | null", description: "Per-field breakdown with match-type counts and a per-field score." },
23716
+ { name: "error_message", type: "string | null", description: "Why a failed run failed." },
23701
23717
  { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
23702
23718
  { name: "completed_at", type: "string | null", description: "Null until the run completes." },
23703
23719
  { name: "links", type: "object", description: "Related resource URLs (self, results)." }
@@ -23709,13 +23725,18 @@ var sections38 = [
23709
23725
  code: `{
23710
23726
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
23711
23727
  "name": "Q1 Invoice accuracy check",
23712
- "status": "pending",
23728
+ "status": "completed",
23713
23729
  "dataspace_run_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
23714
23730
  "golden_sample_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
23715
- "accuracy": null,
23716
- "total_comparisons": null,
23731
+ "accuracy": 0.9412,
23732
+ "total_comparisons": 68,
23733
+ "matched_documents": 17,
23734
+ "unmatched_golden": 0,
23735
+ "unmatched_dataset": 2,
23736
+ "field_accuracy": { "invoice_number": { "total": 17, "exact": 17, "partial": 0, "mismatch": 0, "missing_actual": 0, "missing_expected": 0, "both_empty": 0, "accuracy": 1 } },
23737
+ "error_message": null,
23717
23738
  "created_at": "2024-09-14T10:32:00.000Z",
23718
- "completed_at": null,
23739
+ "completed_at": "2024-09-14T10:32:01.000Z",
23719
23740
  "links": {
23720
23741
  "self": "/v1/validation/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
23721
23742
  "results": "/v1/validation/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890/results"
@@ -23740,7 +23761,7 @@ var sections38 = [
23740
23761
  { label: "Get Job Results", slug: "get-job-results" }
23741
23762
  ],
23742
23763
  faq: [
23743
- { question: "Why does my validation run stay in pending status?", answer: "The public API registers the run but does not execute the comparison; execution is launched from the platform's Benchmarks surface. A pending run is normal until a benchmark is run for it there \u2014 the API remains the right place to list runs and read per-field results afterwards." },
23764
+ { question: "Does the POST wait for the comparison?", answer: "Yes. The comparison runs inside the request and the response is the finished run (completed, or failed with error_message). There is no pending phase to poll through." },
23744
23765
  { question: "Can I run validation against the same dataset multiple times?", answer: "Yes. You can create multiple validation runs against the same golden sample with different job runs to track accuracy improvements over time. Runs reference the dataset without consuming it." },
23745
23766
  { question: "What is the difference between a validation run and a benchmark run?", answer: "Both are Benchmarks surfaces. A validation run (POST /v1/validation/runs) scores one specific job run against a golden sample of per-field expected values. A benchmark run (POST /v1/quality/benchmarks) scores extraction output against a dataset of per-document expected_data objects and supports run-to-run comparison." }
23746
23767
  ],
@@ -23754,8 +23775,8 @@ var sections38 = [
23754
23775
  description: "Poll a validation run for status with GET /v1/validation/runs/:id, or delete the run and its per-field results with DELETE on the same authenticated path.",
23755
23776
  content: [
23756
23777
  { type: "paragraph", text: "`GET /v1/validation/runs/{id}` retrieves one **validation run** with its status and metadata; `DELETE` on the same path permanently removes the run and its per-field results. A validation run is a benchmark of a job run against a golden sample, so this endpoint is where you poll until benchmarking finishes and the per-field results are ready to read." },
23757
- { type: "paragraph", text: 'After a run is created, poll this endpoint until the `status` field reaches a terminal state: the lifecycle is `pending` → `queued` → `processing` → `completed` or `failed`. Runs registered through the public API remain `pending` until a benchmark is launched for them from the platform, so treat a long-lived `pending` as "not started" rather than "stuck mid-comparison".' },
23758
- { type: "paragraph", text: 'Note that `accuracy` and `total_comparisons` are reserved fields that currently stay `null` through the public API even after completion. Once `status` is `completed`, follow `links.results` to [the per-field results](get-validation-results) and compute your score there \u2014 for example, the fraction of rows with `match_type: "exact"`, or exact-plus-partial if formatting differences are acceptable for your use case.' },
23778
+ { type: "paragraph", text: "After a run is created, poll this endpoint until the `status` field reaches a terminal state: the lifecycle is `pending` → `queued` → `processing` → `completed` or `failed`. Runs created through the public API return already `completed` or `failed`, so polling is only needed for runs launched elsewhere." },
23779
+ { type: "paragraph", text: "Once `status` is `completed`, `accuracy` (0-1, weighted across all fields and documents), `total_comparisons` and the per-field `field_accuracy` breakdown are populated. Follow `links.results` to [the per-field results](get-validation-results) when you need row-level detail \u2014 for example to list every `mismatch` for one field." },
23759
23780
  { type: "callout", variant: "warning", text: "Deleting a validation run permanently removes all per-field results. The golden sample dataset and the original job run are not affected. Use DELETE only when you want to clean up outdated or erroneous runs." },
23760
23781
  { type: "paragraph", text: "Pair this endpoint with **Create Validation Run** for the register-then-poll workflow, or with **List Validation Runs** to find specific runs by recency. Because the list endpoint returns only the newest 100 runs, deleting superseded runs here also keeps your full history reachable through the list." },
23761
23782
  { type: "paragraph", text: 'The run object doubles as an audit record: `created_at` and `completed_at` bound when the benchmark ran, `dataspace_run_id` ties the score to the exact Structuring Run that produced the output, and `golden_sample_id` ties it to the exact reference dataset. Store the run `id` alongside your own release or deployment records so a later accuracy question ("what did we measure before the schema change?") resolves to one GET instead of an archaeology session.' },
@@ -23784,8 +23805,13 @@ var sections38 = [
23784
23805
  { name: "status", type: "string", description: "Run status: pending, queued, processing, completed, or failed." },
23785
23806
  { name: "dataspace_run_id", type: "string | null", description: "UUID of the job run being validated." },
23786
23807
  { name: "golden_sample_id", type: "string | null", description: "UUID of the golden sample dataset." },
23787
- { name: "accuracy", type: "null", description: "Reserved \u2014 currently always null through the public API; compute scores from the results endpoint." },
23788
- { name: "total_comparisons", type: "null", description: "Reserved \u2014 currently always null through the public API; count rows on the results endpoint." },
23808
+ { name: "accuracy", type: "number | null", description: "Weighted accuracy across all fields and documents (0-1). Null until the run completes." },
23809
+ { name: "total_comparisons", type: "integer | null", description: "Number of document-field pairs compared. Null until the run completes." },
23810
+ { name: "matched_documents", type: "integer", description: "Documents paired between the job run and the golden sample." },
23811
+ { name: "unmatched_golden", type: "integer", description: "Golden sample documents with no corresponding job-run document." },
23812
+ { name: "unmatched_dataset", type: "integer", description: "Job-run documents with no corresponding golden sample document." },
23813
+ { name: "field_accuracy", type: "object | null", description: "Per-field breakdown: total, exact, partial, mismatch, missing_actual, missing_expected, both_empty, accuracy." },
23814
+ { name: "error_message", type: "string | null", description: "Why a failed run failed." },
23789
23815
  { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
23790
23816
  { name: "completed_at", type: "string | null", description: "ISO 8601 completion timestamp." },
23791
23817
  { name: "links", type: "object", description: "Related resource URLs (self, results)." }
@@ -23800,8 +23826,13 @@ var sections38 = [
23800
23826
  "status": "completed",
23801
23827
  "dataspace_run_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
23802
23828
  "golden_sample_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
23803
- "accuracy": null,
23804
- "total_comparisons": null,
23829
+ "accuracy": 0.9412,
23830
+ "total_comparisons": 68,
23831
+ "matched_documents": 17,
23832
+ "unmatched_golden": 0,
23833
+ "unmatched_dataset": 2,
23834
+ "field_accuracy": { "invoice_number": { "total": 17, "exact": 17, "partial": 0, "mismatch": 0, "missing_actual": 0, "missing_expected": 0, "both_empty": 0, "accuracy": 1 } },
23835
+ "error_message": null,
23805
23836
  "created_at": "2024-09-14T10:32:00.000Z",
23806
23837
  "completed_at": "2024-09-14T10:35:00.000Z",
23807
23838
  "links": {
@@ -23835,8 +23866,8 @@ var sections38 = [
23835
23866
  ],
23836
23867
  faq: [
23837
23868
  { question: "Does deleting a validation run delete the golden sample?", answer: "No. Deleting a run only removes the run record and its per-field results. The golden sample dataset and the job run remain intact. (The reverse is not true: deleting a golden sample cascades to its runs.)" },
23838
- { question: "How do I poll for run completion?", answer: "Call GET /v1/validation/runs/{id} and check the status field. Poll until it reaches completed or failed; pending means execution has not been launched yet, while queued and processing mean the engine is comparing." },
23839
- { question: "How do I get the accuracy score for a completed run?", answer: "The run object's accuracy field is reserved and currently always null through the public API. Fetch links.results and compute over the per-field rows \u2014 for example the share of match_type exact (or exact plus partial) \u2014 or read the score in the platform's Benchmarks view." },
23869
+ { question: "How do I poll for run completion?", answer: "Runs created through the API return already completed or failed, so no polling is needed. For a run launched elsewhere, call GET /v1/validation/runs/{id} until status reaches completed or failed." },
23870
+ { question: "How do I get the accuracy score for a completed run?", answer: "Read accuracy (0-1, weighted across all fields and documents) and field_accuracy on the run object. Fetch links.results when you need the per-field rows behind those numbers." },
23840
23871
  { question: "What does a failed status mean?", answer: "The engine hit an error while executing the comparison \u2014 for example the job run's output could not be loaded. The run keeps its failed status permanently; register a new run to retry rather than expecting the failed one to re-execute." }
23841
23872
  ],
23842
23873
  mentions: ["validation run detail", "run status polling", "accuracy score", "per-field results", "DELETE validation run"]
@@ -30983,7 +31014,7 @@ var sections48 = [
30983
31014
  { type: "paragraph", text: "The typical workflow is: extract a set of representative documents, manually verify the correct value for each schema field, then POST one entry per document. When a benchmark runs, it compares the extracted value for each field against the matching key in `expected_data` and reports per-field accuracy. Fetch candidate document ids from [`GET /v1/documents`](list-documents) \u2014 `document_id` must be an existing document in your workspace, not an arbitrary identifier." },
30984
31015
  { type: "paragraph", text: "`expected_data` is deliberately free-form JSON: any shape is accepted at write time, so you can store nested structures or extra keys for your own bookkeeping. Only keys that match your schema's field names participate in benchmark comparison; everything else is carried along untouched. `notes` is a free-text field for reviewer context \u2014 ambiguities, edge cases, or why a particular value was chosen \u2014 and is returned verbatim on every read." },
30985
31016
  { type: "paragraph", text: "The entries list is returned in full, oldest-first, with no pagination parameters \u2014 datasets are expected to hold tens to low hundreds of entries, not millions. Reads are filtered by document visibility: entries whose documents are hidden from your API key's minting user by source IAM rules are omitted. Writes require the `write` scope; the dataset itself is always tenant-checked first, so a foreign `datasetId` returns `404` before any entry is touched." },
30986
- { type: "callout", variant: "warning", text: "`document_id` must reference a real document in your workspace. The endpoint validates the UUID format but not existence, so an unknown id currently surfaces as a `500 INTERNAL_ERROR` (foreign-key violation) rather than a 404 \u2014 resolve ids from `GET /v1/documents` before writing entries." },
31017
+ { type: "callout", variant: "info", text: '`document_id` must reference a document in your workspace that is visible to your API key\'s minting user. An unknown, foreign, or hidden id is rejected with `404 not_found` ("Document ... not found") before anything is written \u2014 resolve ids from `GET /v1/documents`.' },
30987
31018
  { type: "callout", variant: "info", text: "Each entry maps a `document_id` to an `expected_data` object containing the verified field values. Field keys in `expected_data` should match the field names used in your extraction schema for accurate benchmark comparisons." },
30988
31019
  {
30989
31020
  type: "endpoint",
@@ -31140,7 +31171,7 @@ var sections48 = [
31140
31171
  { type: "paragraph", text: "Use this endpoint to see all benchmark runs and their accuracy scores. A typical workflow is to list benchmarks after making schema or extraction changes, then compare the latest run against previous ones using `GET /v1/quality/benchmarks/compare` to measure improvement or detect regressions." },
31141
31172
  { type: "paragraph", text: "Each benchmark includes `status` (`queued`, `running`, or `complete` \u2014 note the terminal value is `complete`, not `completed`), `accuracy_overall` (0-1 score, null until the run finishes), `accuracy_by_field` (per-field breakdown), and `documents_processed`/`documents_total` for progress tracking. `accuracy_delta` and `compared_to_run_id` are populated only when a run was started with a comparison target in the platform; for ad-hoc deltas use the compare endpoint." },
31142
31173
  { type: "paragraph", text: "Run benchmarks regularly after extraction changes. Pair with `GET /v1/quality/benchmarks/:id/results` for per-document drill-down showing which fields matched and which diverged. Use the compare endpoint to track accuracy trends across multiple runs." },
31143
- { type: "callout", variant: "info", text: "Accuracy fields (`accuracy_overall`, `accuracy_by_field`) stay null while a run is `queued` or `running`. Poll `GET /v1/quality/benchmarks/:id` and read the scores once `status` reaches `complete`. Runs created through the API start in `queued` and execute when a benchmark is launched from the platform." },
31174
+ { type: "callout", variant: "info", text: "Accuracy fields (`accuracy_overall`, `accuracy_by_field`) stay null while a run is `queued` or `running`. Poll `GET /v1/quality/benchmarks/:id` and read the scores once `status` reaches `complete`. Runs created through the API execute in the request and come back `complete`." },
31144
31175
  {
31145
31176
  type: "endpoint",
31146
31177
  method: "GET",
@@ -31176,7 +31207,7 @@ var sections48 = [
31176
31207
  { name: "data[].name", type: "string", description: "Benchmark run name." },
31177
31208
  { name: "data[].dataset_id", type: "string", description: "Ground truth dataset ID used for this run." },
31178
31209
  { name: "data[].user_schema_id", type: "string | null", description: "User schema scoping this benchmark, if any." },
31179
- { name: "data[].status", type: "string", description: "Run status: queued (created via the API, not yet executed), running, or complete." },
31210
+ { name: "data[].status", type: "string", description: "Run status: queued, running, or complete. Runs created through the API return already complete." },
31180
31211
  { name: "data[].accuracy_overall", type: "number | null", description: "Overall accuracy score (0\u20131). Null while running." },
31181
31212
  { name: "data[].accuracy_by_field", type: "object | null", description: "Per-field accuracy scores. Null while running." },
31182
31213
  { name: "data[].documents_processed", type: "integer", description: "Number of documents evaluated so far." },
@@ -31246,8 +31277,8 @@ var sections48 = [
31246
31277
  { label: "List Benchmark Datasets", slug: "list-quality-datasets" }
31247
31278
  ],
31248
31279
  faq: [
31249
- { question: "What benchmark statuses are possible?", answer: "Runs created through the API start as queued; when the engine executes a run it moves to running and finishes as complete (note: complete, not completed). Match on the exact string when polling." },
31250
- { question: "Why is accuracy_overall null?", answer: "Accuracy scores are only computed when the benchmark run finishes. While the status is queued or running, accuracy fields are null \u2014 and an API-created run stays queued until a benchmark is launched for it from the platform." },
31280
+ { question: "What benchmark statuses are possible?", answer: "queued, running, and complete (note: complete, not completed). Runs created through the API execute in the request and are returned already complete. Match on the exact string when polling runs launched elsewhere." },
31281
+ { question: "Why is accuracy_overall null?", answer: "Accuracy scores are only computed when the benchmark run finishes. While the status is queued or running, accuracy fields are null." },
31251
31282
  { question: "How do I track the progress of a running benchmark?", answer: "Poll GET /v1/quality/benchmarks/:id and compare documents_processed against documents_total. Once status reaches complete, duration_ms records the total evaluation time and the accuracy fields are populated." },
31252
31283
  { question: "How do I compare two benchmark runs?", answer: "Call `GET /v1/quality/benchmarks/compare?run_a=<id>&run_b=<id>`. The response returns both runs side by side plus an `accuracy_delta` (run_a minus run_b) so you can quantify improvement or regression between runs." }
31253
31284
  ],
@@ -31261,11 +31292,11 @@ var sections48 = [
31261
31292
  description: "Start a benchmark run with POST /v1/quality/benchmarks to score extraction output against a ground truth dataset. Returns per-field and overall accuracy.",
31262
31293
  content: [
31263
31294
  { type: "paragraph", text: "`POST /v1/quality/benchmarks` starts a **benchmark run** that evaluates your current extraction output against a ground truth dataset. The benchmark compares each document in the dataset entry-by-entry and field-by-field, producing an overall accuracy score and per-field breakdowns." },
31264
- { type: "paragraph", text: "The typical workflow is: create a benchmark after making extraction changes, poll `GET /v1/quality/benchmarks/:id` until `status` is `complete`, then inspect results. Run multiple benchmarks against the same dataset over time to track accuracy trends." },
31265
- { type: "paragraph", text: "The response returns the benchmark with `status: queued`, `accuracy_overall: null`, and `documents_processed: 0`. The `documents_total` field is snapshotted from the dataset's entry count at creation. Poll the detail endpoint to check `status` and `documents_processed` for progress; once the run finishes, `accuracy_overall` and `accuracy_by_field` are populated." },
31295
+ { type: "paragraph", text: "The typical workflow is: create a benchmark after making extraction changes, read the scores off the response, then drill into per-document results. Run multiple benchmarks against the same dataset over time to track accuracy trends." },
31296
+ { type: "paragraph", text: "The evaluation runs inside the request. The response is the finished benchmark: `status: complete`, `accuracy_overall` and `accuracy_by_field` populated, `documents_processed` equal to `documents_total` (the dataset's entry count), and `duration_ms` recording the evaluation time. A 50-entry dataset typically finishes in a few seconds." },
31266
31297
  { type: "paragraph", text: "A benchmark does not re-extract anything: at execution the engine takes each dataset entry, finds the **latest completed extraction result** for that document under the given `user_schema_id`, and compares the extracted values field-by-field against `expected_data`. Entries whose documents have no completed result for that schema simply cannot match \u2014 run your extraction (Spec pipeline or Structuring Run) over the benchmark documents before benchmarking, or accuracy will understate real quality." },
31267
31298
  { type: "paragraph", text: "Multiple benchmarks can run in parallel against different datasets. Use `GET /v1/quality/benchmarks/compare` after completion to compare two runs side by side. The `dataset_id` is fixed at creation \u2014 to benchmark against a different dataset, create a new run." },
31268
- { type: "callout", variant: "warning", text: "Creating a benchmark through the API registers it with status `queued` but does not start evaluation: execution is launched from the platform's Benchmarks surface, where the engine moves the run through `running` to `complete`. Do not poll expecting `complete` within seconds of the POST." },
31299
+ { type: "callout", variant: "info", text: "This is the same engine the platform's Benchmarks surface runs, so API and dashboard scores agree. Because the evaluation happens in the request, a large dataset means a longer request; keep your HTTP client timeout generous for datasets in the hundreds of entries." },
31269
31300
  {
31270
31301
  type: "endpoint",
31271
31302
  method: "POST",
@@ -31306,12 +31337,14 @@ var sections48 = [
31306
31337
  { name: "name", type: "string", description: "Benchmark run name." },
31307
31338
  { name: "dataset_id", type: "string", description: "Ground truth dataset ID." },
31308
31339
  { name: "user_schema_id", type: "string", description: "User schema whose fields are evaluated." },
31309
- { name: "status", type: "string", description: "Initial status: queued." },
31310
- { name: "accuracy_overall", type: "null", description: "Null until the run completes." },
31311
- { name: "documents_processed", type: "integer", description: "Always 0 at creation." },
31312
- { name: "documents_total", type: "integer", description: "Total entries in the dataset to evaluate." },
31340
+ { name: "status", type: "string", description: "complete \u2014 the evaluation ran inside the request." },
31341
+ { name: "accuracy_overall", type: "number", description: "Overall accuracy (0-1) across every expected field." },
31342
+ { name: "accuracy_by_field", type: "object", description: "Per-field accuracy (0-1)." },
31343
+ { name: "documents_processed", type: "integer", description: "Entries evaluated; equals documents_total on a complete run." },
31344
+ { name: "documents_total", type: "integer", description: "Total entries in the dataset." },
31345
+ { name: "duration_ms", type: "integer", description: "Evaluation wall-clock time." },
31313
31346
  { name: "created_at", type: "string", description: "ISO 8601 creation timestamp." },
31314
- { name: "completed_at", type: "null", description: "Null until the run completes." },
31347
+ { name: "completed_at", type: "string", description: "ISO 8601 completion timestamp." },
31315
31348
  { name: "links.self", type: "string", description: "URL to this benchmark run." },
31316
31349
  { name: "links.results", type: "string", description: "URL to the per-document results." }
31317
31350
  ]
@@ -31324,12 +31357,12 @@ var sections48 = [
31324
31357
  "name": "Benchmark 2024-09-25",
31325
31358
  "dataset_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
31326
31359
  "user_schema_id": "5e6f7a8b-9c0d-1234-abcd-ef0123456789",
31327
- "status": "queued",
31328
- "accuracy_overall": null,
31329
- "accuracy_by_field": null,
31330
- "documents_processed": 0,
31360
+ "status": "complete",
31361
+ "accuracy_overall": 0.943,
31362
+ "accuracy_by_field": { "invoice_number": 1, "total_amount": 0.92, "vendor_name": 0.91 },
31363
+ "documents_processed": 50,
31331
31364
  "documents_total": 50,
31332
- "duration_ms": null,
31365
+ "duration_ms": 2380,
31333
31366
  "accuracy_delta": null,
31334
31367
  "compared_to_run_id": null,
31335
31368
  "created_at": "2024-09-25T12:00:00.000Z",
@@ -31359,7 +31392,7 @@ var sections48 = [
31359
31392
  ],
31360
31393
  faq: [
31361
31394
  { question: "Can I run multiple benchmarks simultaneously?", answer: "Yes. Benchmark runs are independent and can execute in parallel against different datasets or the same dataset." },
31362
- { question: "Why does my benchmark stay in queued status?", answer: "The API registers the run but does not execute it; evaluation is launched from the platform's Benchmarks surface. Once running, a 50-entry dataset typically finishes in a few seconds \u2014 duration_ms on the finished run records the exact time." },
31395
+ { question: "Does the POST wait for the evaluation?", answer: "Yes. The evaluation runs inside the request and the response is the finished run with status complete and the accuracy fields populated. duration_ms records the exact evaluation time; a 50-entry dataset typically finishes in a few seconds." },
31363
31396
  { question: "Does a benchmark re-extract my documents?", answer: "No. It compares expected_data against the latest completed extraction result each document already has under the benchmark's user_schema_id. Make sure the documents have been processed with that schema before benchmarking." },
31364
31397
  { question: "Is user_schema_id required when creating a benchmark?", answer: "Yes. Both dataset_id and user_schema_id are required UUIDs. The schema defines which fields the benchmark evaluates, so extracted values and ground truth entries are compared on the same field set." }
31365
31398
  ],
@@ -38140,6 +38173,9 @@ var sections65 = [
38140
38173
  { name: "data[].version_number", type: "integer", description: "Version number (monotonically increasing)." },
38141
38174
  { name: "data[].status", type: "string", description: "Version status (e.g. draft, active)." },
38142
38175
  { name: "data[].compiled_rules", type: "object | null", description: "Compiled execution plan for this version, when compiled." },
38176
+ { name: "data[].compile_status", type: "string | null", description: "Latest compile outcome for the version, or null if never compiled." },
38177
+ { name: "data[].compiled_at", type: "string | null", description: "ISO 8601 timestamp of the last successful compile." },
38178
+ { name: "data[].dirty", type: "boolean", description: "True when the version has been edited since it was last compiled." },
38143
38179
  { name: "data[].created_at", type: "string", description: "ISO 8601 timestamp when this version was created." },
38144
38180
  { name: "links.self", type: "string", description: "URL to this version list." },
38145
38181
  { name: "links.policy", type: "string", description: "URL to the parent policy." }
@@ -38162,6 +38198,9 @@ var sections65 = [
38162
38198
  "version_number": 3,
38163
38199
  "status": "active",
38164
38200
  "compiled_rules": { "steps": 8 },
38201
+ "compile_status": "ok",
38202
+ "compiled_at": "2024-10-15T11:31:00.000Z",
38203
+ "dirty": false,
38165
38204
  "created_at": "2024-10-15T11:30:00.000Z"
38166
38205
  },
38167
38206
  {
@@ -38169,6 +38208,9 @@ var sections65 = [
38169
38208
  "version_number": 2,
38170
38209
  "status": "draft",
38171
38210
  "compiled_rules": null,
38211
+ "compile_status": null,
38212
+ "compiled_at": null,
38213
+ "dirty": true,
38172
38214
  "created_at": "2024-10-10T14:00:00.000Z"
38173
38215
  }
38174
38216
  ],
@@ -38219,7 +38261,7 @@ var sections65 = [
38219
38261
  type: "endpoint",
38220
38262
  method: "GET",
38221
38263
  path: "/v1/data-policies/{id}/fields",
38222
- summary: "List declared output fields for a data policy.",
38264
+ summary: "List declared output fields for a data policy (its current version).",
38223
38265
  description: "Requires read scope.",
38224
38266
  blocks: [
38225
38267
  {
@@ -38238,10 +38280,14 @@ var sections65 = [
38238
38280
  params: [
38239
38281
  { name: "data", type: "array", description: "Array of field definition objects." },
38240
38282
  { name: "data[].id", type: "string", description: "Field row UUID." },
38283
+ { name: "data[].version_id", type: "string", description: "The policy version these fields belong to (the current version, or the newest one when none is current)." },
38241
38284
  { name: "data[].field_key", type: "string", description: "Output field key name." },
38285
+ { name: "data[].display_name", type: "string | null", description: "Human-readable label." },
38242
38286
  { name: "data[].field_type", type: "string", description: "Declared value type (e.g. string, number, date)." },
38243
- { name: "data[].source", type: "string | null", description: "Where the field originates." },
38244
- { name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
38287
+ { name: "data[].position", type: "integer", description: "Display order within the policy." },
38288
+ { name: "data[].include", type: "boolean", description: "Whether the field is emitted in the policy output." },
38289
+ { name: "data[].source", type: "string | null", description: "schema_field when the field mirrors a Spec field, null for a policy-only field." },
38290
+ { name: "data[].source_schema_field_id", type: "string | null", description: "The mirrored Spec field UUID, when source is schema_field." },
38245
38291
  { name: "links.self", type: "string", description: "URL to this field list." },
38246
38292
  { name: "links.policy", type: "string", description: "URL to the parent policy." }
38247
38293
  ]
@@ -38260,22 +38306,31 @@ var sections65 = [
38260
38306
  "data": [
38261
38307
  {
38262
38308
  "id": "f1a2b3c4-0001",
38309
+ "version_id": "v3a2b3c4-0003",
38263
38310
  "field_key": "country_code",
38311
+ "display_name": "Country code",
38264
38312
  "field_type": "string",
38265
- "source": "policy",
38266
- "created_at": "2024-10-01T09:05:00.000Z"
38313
+ "position": 0,
38314
+ "include": true,
38315
+ "source": "schema_field",
38316
+ "source_schema_field_id": "sf1a2b3c4-0001"
38267
38317
  },
38268
38318
  {
38269
38319
  "id": "f1a2b3c4-0002",
38320
+ "version_id": "v3a2b3c4-0003",
38270
38321
  "field_key": "currency",
38322
+ "display_name": null,
38271
38323
  "field_type": "string",
38272
- "source": "policy",
38273
- "created_at": "2024-10-01T09:06:00.000Z"
38324
+ "position": 1,
38325
+ "include": true,
38326
+ "source": null,
38327
+ "source_schema_field_id": null
38274
38328
  }
38275
38329
  ],
38276
38330
  "links": {
38277
38331
  "self": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/fields",
38278
- "policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890"
38332
+ "policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890",
38333
+ "version": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/versions"
38279
38334
  }
38280
38335
  }`
38281
38336
  },
@@ -38319,7 +38374,7 @@ var sections65 = [
38319
38374
  type: "endpoint",
38320
38375
  method: "GET",
38321
38376
  path: "/v1/data-policies/{id}/rules",
38322
- summary: "List transformation rules for a data policy.",
38377
+ summary: "List transformation rules for a data policy (its current version).",
38323
38378
  description: "Requires read scope.",
38324
38379
  blocks: [
38325
38380
  {
@@ -38338,11 +38393,14 @@ var sections65 = [
38338
38393
  params: [
38339
38394
  { name: "data", type: "array", description: "Array of rule objects, ordered by ordinal." },
38340
38395
  { name: "data[].id", type: "string", description: "Rule UUID." },
38341
- { name: "data[].field_key", type: "string", description: "Target output field key." },
38396
+ { name: "data[].version_id", type: "string", description: "The policy version these rules belong to (the current version, or the newest one when none is current)." },
38397
+ { name: "data[].field_key", type: "string | null", description: "Target output field key." },
38398
+ { name: "data[].input_field_keys", type: "string[]", description: "Field keys the rule reads." },
38342
38399
  { name: "data[].rule_type", type: "string", description: "Rule type (e.g. select_field, transform, lookup_exact, script)." },
38343
38400
  { name: "data[].config", type: "object", description: "Rule-type-specific configuration." },
38344
- { name: "data[].ordinal", type: "integer", description: "Position of the rule within the policy." },
38345
- { name: "data[].created_at", type: "string", description: "ISO 8601 creation timestamp." },
38401
+ { name: "data[].ordinal", type: "integer", description: "Execution order within the version." },
38402
+ { name: "data[].error_behavior", type: "string", description: "What a rule failure does to the row: flag, skip, or fail." },
38403
+ { name: "data[].provenance_label", type: "string | null", description: "Label stamped on values this rule produces." },
38346
38404
  { name: "links.self", type: "string", description: "URL to this rule list." },
38347
38405
  { name: "links.policy", type: "string", description: "URL to the parent policy." }
38348
38406
  ]
@@ -38361,7 +38419,9 @@ var sections65 = [
38361
38419
  "data": [
38362
38420
  {
38363
38421
  "id": "r1a2b3c4-0001",
38422
+ "version_id": "v3a2b3c4-0003",
38364
38423
  "field_key": "country_code",
38424
+ "input_field_keys": ["country"],
38365
38425
  "rule_type": "lookup_exact",
38366
38426
  "config": {
38367
38427
  "reference_table_id": "country_codes",
@@ -38369,22 +38429,27 @@ var sections65 = [
38369
38429
  "output_column": "iso2"
38370
38430
  },
38371
38431
  "ordinal": 1,
38372
- "created_at": "2024-10-01T09:10:00.000Z"
38432
+ "error_behavior": "flag",
38433
+ "provenance_label": null
38373
38434
  },
38374
38435
  {
38375
38436
  "id": "r1a2b3c4-0002",
38437
+ "version_id": "v3a2b3c4-0003",
38376
38438
  "field_key": "currency",
38439
+ "input_field_keys": ["country_code"],
38377
38440
  "rule_type": "script",
38378
38441
  "config": {
38379
38442
  "script": "if record:get('country_code') == 'US' then return 'USD' end"
38380
38443
  },
38381
38444
  "ordinal": 2,
38382
- "created_at": "2024-10-01T09:12:00.000Z"
38445
+ "error_behavior": "flag",
38446
+ "provenance_label": "Derived currency"
38383
38447
  }
38384
38448
  ],
38385
38449
  "links": {
38386
38450
  "self": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/rules",
38387
- "policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890"
38451
+ "policy": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890",
38452
+ "version": "/v1/data-policies/p1a2b3c4-e5f6-7890-abcd-ef1234567890/versions"
38388
38453
  }
38389
38454
  }`
38390
38455
  },
@@ -45331,7 +45396,7 @@ curl -s -X POST https://api.talonic.com/v1/review-teams/$TEAM_ID/members \\
45331
45396
  -d '{ "team_id": "3f2b9c44-1e0a-4b7c-9d21-5a8f0e6c3b12" }'`
45332
45397
  },
45333
45398
  { type: "callout", variant: "info", text: "Team writes require a human workspace owner because teams are authority routing: whoever controls team membership controls who resolves approvals. Assigning an individual review, by contrast, is an operate-tier action any operator or granted agent can perform." },
45334
- { type: "paragraph", text: "For push-based team tooling, combine the team's `webhook_url` configuration with the workspace-level `app.review.raised` webhook: the workspace event tells your integration a review exists (with its kind and question), and your integration fans it out to the team's own channel. Resolution flows back through the normal [resolve endpoint](app-reviews), so a team bot can read the inbox filtered to its assignments and resolve `data_request` reviews autonomously while leaving `approval` kinds to humans." }
45399
+ { type: "paragraph", text: "A team's `webhook_url` is a notification hook: whenever a review is raised with that team as assignee (`team_id` on `POST /v1/apps/:id/reviews`), Talonic POSTs the same JSON envelope the workspace-level `app.review.raised` webhook carries (`review_id`, `app_id`, `run_id`, `kind`, `question`, `team`) to that URL, unsigned and with the standard retry ladder. Platform-raised reviews (threshold holds, decision-agent failures, SLA fallbacks) arrive as `app.exception.raised` instead. Use the team hook for the team's own channel and the workspace webhook for your integration. Resolution flows back through the normal [resolve endpoint](app-reviews), so a team bot can read the inbox filtered to its assignments and resolve `data_request` reviews autonomously while leaving `approval` kinds to humans." }
45335
45400
  ],
45336
45401
  related: [
45337
45402
  { label: "Human Reviews", slug: "app-reviews" },
@@ -45363,7 +45428,7 @@ var sections75 = [
45363
45428
  { type: "paragraph", text: "`GET /v1/agent-tasks` lists your workspace's document-scoped tasks, newest first, with `read` scope. Filter with `?status` (one of `available`, `claimed`, `submitted`, `timed_out`, `cancelled` \u2014 anything else is a 400), page with `?limit` (1\u2013100, default 50) and the opaque `?cursor` returned as `pagination.next_cursor`. The listing is keyset-paginated on `(created_at, id)`, so pages stay stable while new tasks are created ahead of your cursor." },
45364
45429
  { type: "paragraph", text: "Every route on this surface requires the credential to resolve to exactly **one tenant**. A key operating in the cross-tenant master view gets `400` with the message `Select one tenant for Agent task access` \u2014 task snapshots contain document values, and cross-tenant reads of that payload are never allowed. Additionally, Sources-IAM is evaluated as the **user who created the API key**: a task whose document sits behind a source restriction that principal is not admitted to is simply invisible (404 on fetch, absent from the list), never a 403." },
45365
45430
  { type: "paragraph", text: "`GET /v1/agent-tasks/:id` returns the full payload: the listing's metadata plus `input_snapshot` (the parked record's cells \u2014 and for product-grain tasks the `candidates` distributions, the frozen `autonomy` contract, the `anchor` document, and the `triggers` that parked it), `output_contract` (the declared output fields with `key`, `dataType`, `required`), free-text `instructions`, and `timeout_fallthrough` (what happens if no agent answers in time: `hold`, `skip`, or `route_to_review`)." },
45366
- { type: "callout", variant: "info", text: "The list endpoint returns document-scoped tasks (each row carries document_id and pipeline_document_id). Product-grain Agentic Review tasks are usually bound to a specific agent credential and addressed by id \u2014 a claim or fetch by id works for both grains." },
45431
+ { type: "callout", variant: "info", text: "The list endpoint returns both grains. Every row carries grain (document or product); document-grain rows carry document_id and pipeline_document_id, product-grain rows carry record_id instead. Filter with ?grain=product to see only Agentic Review tasks." },
45367
45432
  {
45368
45433
  type: "endpoint",
45369
45434
  method: "GET",
@@ -45376,6 +45441,7 @@ var sections75 = [
45376
45441
  title: "Query parameters",
45377
45442
  params: [
45378
45443
  { name: "status", type: "string", description: 'Filter to one status: available, claimed, submitted, timed_out, or cancelled. Any other value is rejected 400 ("Invalid agent task status").' },
45444
+ { name: "grain", type: "string", description: 'Filter to one grain: document (Agent via MCP rail stage) or product (post-assembly Agentic Review). Any other value is rejected 400 ("Invalid agent task grain"). Both grains are listed when omitted.' },
45379
45445
  { name: "limit", type: "integer", default: "50", description: 'Page size, 1\u2013100. Out-of-range or non-integer values are rejected 400 ("limit must be 1..100").' },
45380
45446
  { name: "cursor", type: "string", description: `Opaque pagination cursor from a previous response's pagination.next_cursor. A malformed cursor is rejected 400 ("Invalid cursor").` }
45381
45447
  ]
@@ -47482,11 +47548,11 @@ var sections_default2 = [
47482
47548
  parentSlug: "mcp-overview",
47483
47549
  title: "Introduction",
47484
47550
  seoTitle: "MCP Server Introduction \u2014 Talonic Docs",
47485
- description: "Official Talonic MCP server for AI agents. Sixteen public tools and two resources for structured document extraction via the Model Context Protocol.",
47551
+ description: "Official Talonic MCP server for AI agents. Twenty-two public tools and two resources for structured document extraction via the Model Context Protocol.",
47486
47552
  content: [
47487
47553
  {
47488
47554
  type: "paragraph",
47489
- text: "The `@talonic/mcp` package is the official Talonic MCP server. It gives AI agents sixteen public tools and two resources for extracting structured, schema-validated data from any document via the [Model Context Protocol](https://modelcontextprotocol.io)."
47555
+ text: "The `@talonic/mcp` package is the official Talonic MCP server. It gives AI agents twenty-two public tools and two resources for extracting structured, schema-validated data from any document via the [Model Context Protocol](https://modelcontextprotocol.io)."
47490
47556
  },
47491
47557
  {
47492
47558
  type: "paragraph",
@@ -47494,7 +47560,7 @@ var sections_default2 = [
47494
47560
  },
47495
47561
  {
47496
47562
  type: "paragraph",
47497
- text: "With this MCP server installed, the agent has a `talonic_extract` tool that returns schema-validated JSON with per-field confidence scores, a detected document type, and stable IDs for follow-up calls. The other fifteen public tools cover browser-handoff upload, workspace search and filtering, document metadata and OCR markdown, schema management, balance, pricing and usage, plus the Agent-stage list, fetch, claim, heartbeat and submit lifecycle."
47563
+ text: "With this MCP server installed, the agent has a `talonic_extract` tool that returns schema-validated JSON with per-field confidence scores, a detected document type, and stable IDs for follow-up calls. The other twenty-one public tools cover browser-handoff upload, workspace search and filtering, document metadata and OCR markdown, schema management, balance, pricing and usage, the Field Registry as a source of truth (list, concept card, values across documents, find-data by meaning, and the platform agent tool registry), plus the Agent-stage list, fetch, claim, heartbeat and submit lifecycle."
47498
47564
  },
47499
47565
  {
47500
47566
  type: "callout",
@@ -47518,7 +47584,7 @@ var sections_default2 = [
47518
47584
  faq: [
47519
47585
  {
47520
47586
  question: "What is the Talonic MCP server?",
47521
- answer: "An official Model Context Protocol server that gives AI agents sixteen public tools for document extraction, search, filtering, schema management, and credit-balance lookup via the Talonic API."
47587
+ answer: "An official Model Context Protocol server that gives AI agents twenty-two public tools for document extraction, search, filtering, schema management, and credit-balance lookup via the Talonic API."
47522
47588
  }
47523
47589
  ],
47524
47590
  mentions: [
@@ -47605,7 +47671,7 @@ var sections_default2 = [
47605
47671
  },
47606
47672
  {
47607
47673
  type: "paragraph",
47608
- text: "All three install paths expose the same sixteen public tools and two resources."
47674
+ text: "All three install paths expose the same twenty-two public tools and two resources."
47609
47675
  }
47610
47676
  ],
47611
47677
  related: [
@@ -47769,7 +47835,7 @@ var sections_default2 = [
47769
47835
  },
47770
47836
  {
47771
47837
  type: "paragraph",
47772
- text: "Fully restart Claude Desktop (Cmd+Q on macOS, not just close the window). Talonic appears in the connected servers list with all sixteen public tools and two resources."
47838
+ text: "Fully restart Claude Desktop (Cmd+Q on macOS, not just close the window). Talonic appears in the connected servers list with all twenty-two public tools and two resources."
47773
47839
  }
47774
47840
  ],
47775
47841
  related: [
@@ -49429,6 +49495,874 @@ var sections_default2 = [
49429
49495
  "upload link"
49430
49496
  ]
49431
49497
  },
49498
+ {
49499
+ slug: "mcp-talonic-list-fields",
49500
+ parentSlug: "mcp-tools",
49501
+ title: "talonic_list_fields",
49502
+ seoTitle: "talonic_list_fields \u2014 List Field Registry Concepts",
49503
+ description: "MCP tool that lists the workspace's Field Registry: every canonical concept Talonic discovered across documents, with stable ids, maturity level, synonyms and occurrence counts.",
49504
+ content: [
49505
+ {
49506
+ type: "paragraph",
49507
+ text: "List the workspace's **Field Registry** \u2014 the canonical concepts Talonic has discovered across every ingested document. Each entry carries a stable `id`, `canonical_name`, `data_type`, a named `maturity` level, `synonyms`, a curated `description`, `occurrence_count` and `superseded_by` when the row was merged into another concept."
49508
+ },
49509
+ {
49510
+ type: "heading",
49511
+ level: 3,
49512
+ text: "When to use"
49513
+ },
49514
+ {
49515
+ type: "list",
49516
+ ordered: false,
49517
+ items: [
49518
+ "You need to know WHAT data exists before querying it.",
49519
+ "You want the exact field id for `talonic_get_field` or `talonic_field_values`.",
49520
+ "You are choosing between similar concepts and want their maturity and occurrence counts side by side."
49521
+ ]
49522
+ },
49523
+ {
49524
+ type: "heading",
49525
+ level: 3,
49526
+ text: "When NOT to use"
49527
+ },
49528
+ {
49529
+ type: "list",
49530
+ ordered: false,
49531
+ items: [
49532
+ "To locate a specific document by name \u2014 use `talonic_search`.",
49533
+ "To filter documents by a field value \u2014 use `talonic_filter`.",
49534
+ "When you are unsure which field holds a concept \u2014 call `talonic_find_data` first; it matches by meaning."
49535
+ ]
49536
+ },
49537
+ {
49538
+ type: "heading",
49539
+ level: 3,
49540
+ text: "Input schema"
49541
+ },
49542
+ {
49543
+ type: "param-table",
49544
+ title: "Parameters",
49545
+ params: [
49546
+ {
49547
+ name: "search",
49548
+ type: "string",
49549
+ description: "Case-insensitive contains match on canonical_name / display_name."
49550
+ },
49551
+ {
49552
+ name: "maturity",
49553
+ type: "string",
49554
+ description: "`core`, `proven` or `candidate`. Prefer `core`/`proven` for anything you build on."
49555
+ },
49556
+ {
49557
+ name: "include_superseded",
49558
+ type: "boolean",
49559
+ description: "Include rows merged into a survivor (they carry `superseded_by`). Default false."
49560
+ },
49561
+ {
49562
+ name: "limit",
49563
+ type: "number",
49564
+ description: "Page size (default 20, max 100)."
49565
+ },
49566
+ {
49567
+ name: "cursor",
49568
+ type: "string",
49569
+ description: "Opaque cursor from `pagination.next_cursor`."
49570
+ }
49571
+ ]
49572
+ },
49573
+ {
49574
+ type: "heading",
49575
+ level: 3,
49576
+ text: "Response shape"
49577
+ },
49578
+ {
49579
+ type: "param-table",
49580
+ title: "Fields",
49581
+ params: [
49582
+ {
49583
+ name: "data[].id",
49584
+ type: "string",
49585
+ description: "Stable field UUID."
49586
+ },
49587
+ {
49588
+ name: "data[].canonical_name",
49589
+ type: "string",
49590
+ description: "Normalized concept name."
49591
+ },
49592
+ {
49593
+ name: "data[].maturity",
49594
+ type: "string",
49595
+ description: "`core` (fully trusted), `proven` (recurring, stable id) or `candidate` (new; may still be merged or renamed)."
49596
+ },
49597
+ {
49598
+ name: "data[].synonyms",
49599
+ type: "string[]",
49600
+ description: "Names folded onto the concept by merges and cleanup."
49601
+ },
49602
+ {
49603
+ name: "data[].superseded_by",
49604
+ type: "object|null",
49605
+ description: "Set when the row was merged into a survivor; follow `superseded_by.id`."
49606
+ },
49607
+ {
49608
+ name: "pagination",
49609
+ type: "object",
49610
+ description: "`total`, `limit`, `has_more`, `next_cursor`."
49611
+ }
49612
+ ]
49613
+ },
49614
+ {
49615
+ type: "code",
49616
+ language: "json",
49617
+ title: "Tool input",
49618
+ code: '{ "search": "invoice", "maturity": "proven", "limit": 5 }'
49619
+ },
49620
+ {
49621
+ type: "code",
49622
+ language: "json",
49623
+ title: "Tool response",
49624
+ code: `{
49625
+ "data": [
49626
+ {
49627
+ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
49628
+ "canonical_name": "invoice_number",
49629
+ "display_name": "Invoice Number",
49630
+ "data_type": "string",
49631
+ "maturity": "proven",
49632
+ "tier": 2,
49633
+ "synonyms": ["inv_no", "invoice no"],
49634
+ "description": "The supplier's invoice identifier",
49635
+ "occurrence_count": 412,
49636
+ "superseded_by": null,
49637
+ "links": { "self": "/v1/fields/a1b2\u2026", "card": "/v1/fields/a1b2\u2026/card", "values": "/v1/fields/a1b2\u2026/values" }
49638
+ }
49639
+ ],
49640
+ "pagination": { "total": 1, "limit": 5, "has_more": false, "next_cursor": null }
49641
+ }`
49642
+ }
49643
+ ],
49644
+ related: [
49645
+ {
49646
+ label: "talonic_search",
49647
+ slug: "mcp-talonic-search"
49648
+ },
49649
+ {
49650
+ label: "talonic_filter",
49651
+ slug: "mcp-talonic-filter"
49652
+ }
49653
+ ],
49654
+ faq: [
49655
+ {
49656
+ question: "What does maturity mean and which level should I build on?",
49657
+ answer: "`core` (tier 1) is universal and fully trusted; `proven` (tier 2) recurs and has a stable id; `candidate` (tier 3) is newly discovered and may still be merged or renamed. Build on `core` or `proven`; treat `candidate` as a hint."
49658
+ }
49659
+ ],
49660
+ mentions: [
49661
+ "field registry",
49662
+ "list fields",
49663
+ "maturity",
49664
+ "canonical fields",
49665
+ "superseded_by",
49666
+ "field ids"
49667
+ ]
49668
+ },
49669
+ {
49670
+ slug: "mcp-talonic-get-field",
49671
+ parentSlug: "mcp-tools",
49672
+ title: "talonic_get_field",
49673
+ seoTitle: "talonic_get_field \u2014 Field Concept Card",
49674
+ description: "MCP tool that returns a Field Registry concept card: definition, synonyms and aliases, maturity, occurrence statistics, value distribution with examples, schema usage and identity links.",
49675
+ content: [
49676
+ {
49677
+ type: "paragraph",
49678
+ text: "Get the **concept card** for one field: what it means (curated description and extraction instruction), its synonyms and merge aliases, maturity, where it occurs (document and 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). Accepts a field `name` in the user's own words \u2014 it is resolved through the canonical name, the registry's spelling fold, merge aliases and synonyms (with case-insensitive fallbacks), then followed to the live concept."
49679
+ },
49680
+ {
49681
+ type: "heading",
49682
+ level: 3,
49683
+ text: "When to use"
49684
+ },
49685
+ {
49686
+ type: "list",
49687
+ ordered: false,
49688
+ items: [
49689
+ "You must decide whether a field is the right concept for a question.",
49690
+ "You need example values or the value shape before writing a filter or a query.",
49691
+ "The user names a field ('Invoice No', 'Vertragsnummer') and you need the live concept behind it."
49692
+ ]
49693
+ },
49694
+ {
49695
+ type: "heading",
49696
+ level: 3,
49697
+ text: "When NOT to use"
49698
+ },
49699
+ {
49700
+ type: "list",
49701
+ ordered: false,
49702
+ items: [
49703
+ "To list many fields \u2014 use `talonic_list_fields`.",
49704
+ "To read every value of a field \u2014 use `talonic_field_values`."
49705
+ ]
49706
+ },
49707
+ {
49708
+ type: "heading",
49709
+ level: 3,
49710
+ text: "Input schema"
49711
+ },
49712
+ {
49713
+ type: "param-table",
49714
+ title: "Parameters",
49715
+ params: [
49716
+ {
49717
+ name: "field_id",
49718
+ type: "string",
49719
+ description: "Field UUID. Provide either `field_id` or `name`."
49720
+ },
49721
+ {
49722
+ name: "name",
49723
+ type: "string",
49724
+ description: "Field name to resolve (canonical \u2192 spelling fold \u2192 aliases \u2192 synonyms, then case-insensitive fallbacks; redirects followed)."
49725
+ },
49726
+ {
49727
+ name: "include_history",
49728
+ type: "boolean",
49729
+ description: "Append the curation trail (tier changes, merges, renames), newest first."
49730
+ }
49731
+ ]
49732
+ },
49733
+ {
49734
+ type: "heading",
49735
+ level: 3,
49736
+ text: "Response shape"
49737
+ },
49738
+ {
49739
+ type: "param-table",
49740
+ title: "Fields",
49741
+ params: [
49742
+ {
49743
+ name: "definition",
49744
+ type: "object",
49745
+ description: "`description`, `instruction`, `synonyms[]`, `aliases[]`."
49746
+ },
49747
+ {
49748
+ name: "identity",
49749
+ type: "object",
49750
+ description: "`pinned`, `source`, `superseded_by`, `absorbed[]`."
49751
+ },
49752
+ {
49753
+ name: "occurrence",
49754
+ type: "object",
49755
+ description: "`occurrence_count`, `document_count`, `first_seen_at`, `last_seen_at`, `document_type_distribution`."
49756
+ },
49757
+ {
49758
+ name: "values",
49759
+ type: "object",
49760
+ description: "`total`, `distinct_count`, `top[]` (value, count, share), `examples[]`."
49761
+ },
49762
+ {
49763
+ name: "usage",
49764
+ type: "object",
49765
+ description: "`schema_count`, `schema_field_count`."
49766
+ },
49767
+ {
49768
+ name: "resolution",
49769
+ type: "object",
49770
+ description: "Present when `name` was given: `matched_by` and `redirected_from[]`."
49771
+ },
49772
+ {
49773
+ name: "history",
49774
+ type: "object",
49775
+ description: "Present when `include_history` is true."
49776
+ }
49777
+ ]
49778
+ },
49779
+ {
49780
+ type: "code",
49781
+ language: "json",
49782
+ title: "Tool input",
49783
+ code: '{ "name": "Invoice No", "include_history": true }'
49784
+ },
49785
+ {
49786
+ type: "code",
49787
+ language: "json",
49788
+ title: "Tool response",
49789
+ code: `{
49790
+ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
49791
+ "canonical_name": "invoice_number",
49792
+ "maturity": "proven",
49793
+ "data_type": "string",
49794
+ "definition": { "description": "The supplier's invoice identifier", "instruction": "Extract the invoice number as printed", "synonyms": ["inv_no"], "aliases": [{ "name": "invoice no", "source": "merge" }] },
49795
+ "identity": { "pinned": false, "source": null, "superseded_by": null, "absorbed": [] },
49796
+ "occurrence": { "occurrence_count": 412, "document_count": 398, "first_seen_at": "2026-03-02T09:14:00.000Z", "last_seen_at": "2026-09-04T16:02:11.000Z", "document_type_distribution": { "invoice": 398 } },
49797
+ "values": { "total": 412, "distinct_count": 405, "top": [{ "value": "INV-2026-0001", "count": 2, "share": 0.0049 }], "examples": ["INV-2026-0001", "RE-88231"] },
49798
+ "usage": { "schema_count": 2, "schema_field_count": 2 },
49799
+ "resolution": { "matched_by": "synonym", "redirected_from": [] },
49800
+ "history": { "total": 1, "data": [{ "kind": "tier_changed", "at": "2026-04-01T00:00:00.000Z", "detail": { "direction": "promoted", "from_maturity": "candidate", "to_maturity": "proven" } }] }
49801
+ }`
49802
+ }
49803
+ ],
49804
+ related: [
49805
+ {
49806
+ label: "talonic_search",
49807
+ slug: "mcp-talonic-search"
49808
+ },
49809
+ {
49810
+ label: "talonic_filter",
49811
+ slug: "mcp-talonic-filter"
49812
+ }
49813
+ ],
49814
+ faq: [
49815
+ {
49816
+ question: "Can I pass the user's wording instead of an id?",
49817
+ answer: "Yes. `name` is resolved through the canonical name, the registry's spelling fold, merge aliases and synonyms (with case-insensitive fallbacks), then followed to the live concept; the response's `resolution.matched_by` says which arm matched."
49818
+ }
49819
+ ],
49820
+ mentions: [
49821
+ "concept card",
49822
+ "field definition",
49823
+ "field by name",
49824
+ "resolve field",
49825
+ "example values",
49826
+ "field history"
49827
+ ]
49828
+ },
49829
+ {
49830
+ slug: "mcp-talonic-field-values",
49831
+ parentSlug: "mcp-tools",
49832
+ title: "talonic_field_values",
49833
+ seoTitle: "talonic_field_values \u2014 Read a Field Across Documents",
49834
+ description: "MCP tool that reads a Field Registry concept's current values across all documents with provenance: document, value, confidence, raw name, source text and resolution band.",
49835
+ content: [
49836
+ {
49837
+ type: "paragraph",
49838
+ text: "Read a field's **current values across documents**, with provenance \u2014 one row per bound occurrence: document id, filename and type, the value, its confidence, the raw name it was captured under, the verbatim source text, and the resolution band that bound it. Rows are Sources-IAM filtered for the caller and cursor-paginated newest first."
49839
+ },
49840
+ {
49841
+ type: "heading",
49842
+ level: 3,
49843
+ text: "When to use"
49844
+ },
49845
+ {
49846
+ type: "list",
49847
+ ordered: false,
49848
+ items: [
49849
+ "The user asks 'what are all the X across my documents'.",
49850
+ "You need to tabulate or aggregate one concept across the corpus.",
49851
+ "You want the evidence (source text plus document) behind a value."
49852
+ ]
49853
+ },
49854
+ {
49855
+ type: "heading",
49856
+ level: 3,
49857
+ text: "When NOT to use"
49858
+ },
49859
+ {
49860
+ type: "list",
49861
+ ordered: false,
49862
+ items: [
49863
+ "Multi-field, row-shaped queries over documents \u2014 use `talonic_filter`.",
49864
+ "One document's full field set \u2014 use `talonic_get_document`."
49865
+ ]
49866
+ },
49867
+ {
49868
+ type: "heading",
49869
+ level: 3,
49870
+ text: "Input schema"
49871
+ },
49872
+ {
49873
+ type: "param-table",
49874
+ title: "Parameters",
49875
+ params: [
49876
+ {
49877
+ name: "field_id",
49878
+ type: "string",
49879
+ description: "Field UUID. Provide either `field_id` or `name`."
49880
+ },
49881
+ {
49882
+ name: "name",
49883
+ type: "string",
49884
+ description: "Field name (resolved like `talonic_get_field`)."
49885
+ },
49886
+ {
49887
+ name: "document_id",
49888
+ type: "string",
49889
+ description: "Only occurrences on this document."
49890
+ },
49891
+ {
49892
+ name: "value",
49893
+ type: "string",
49894
+ description: "Case-insensitive contains filter on the value text."
49895
+ },
49896
+ {
49897
+ name: "limit",
49898
+ type: "number",
49899
+ description: "Page size (default 20, max 100)."
49900
+ },
49901
+ {
49902
+ name: "cursor",
49903
+ type: "string",
49904
+ description: "Opaque cursor from `pagination.next_cursor`."
49905
+ }
49906
+ ]
49907
+ },
49908
+ {
49909
+ type: "heading",
49910
+ level: 3,
49911
+ text: "Response shape"
49912
+ },
49913
+ {
49914
+ type: "param-table",
49915
+ title: "Fields",
49916
+ params: [
49917
+ {
49918
+ name: "data[].document_id",
49919
+ type: "string",
49920
+ description: "Document the value came from (`document_filename`, `document_type` alongside)."
49921
+ },
49922
+ {
49923
+ name: "data[].value",
49924
+ type: "any",
49925
+ description: "The current bound value as captured."
49926
+ },
49927
+ {
49928
+ name: "data[].confidence",
49929
+ type: "number|null",
49930
+ description: "Capture confidence 0\u20131."
49931
+ },
49932
+ {
49933
+ name: "data[].provenance",
49934
+ type: "object",
49935
+ description: "`raw_field_name`, `source_text`, `resolved_by` (`exact`, `cluster`, `semantic_auto`, `llm_rescue`, \u2026), `needs_confirmation`, `via_redirect`."
49936
+ },
49937
+ {
49938
+ name: "concept_ids",
49939
+ type: "string[]",
49940
+ description: "The concept plus absorbed redirects whose occurrences are included."
49941
+ },
49942
+ {
49943
+ name: "pagination",
49944
+ type: "object",
49945
+ description: "`total` counts the visible set."
49946
+ }
49947
+ ]
49948
+ },
49949
+ {
49950
+ type: "code",
49951
+ language: "json",
49952
+ title: "Tool input",
49953
+ code: '{ "name": "invoice_number", "value": "2026", "limit": 2 }'
49954
+ },
49955
+ {
49956
+ type: "code",
49957
+ language: "json",
49958
+ title: "Tool response",
49959
+ code: '{\n "field_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",\n "canonical_name": "invoice_number",\n "concept_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],\n "data": [\n {\n "occurrence_id": "0f1e2d3c-\u2026",\n "document_id": "f0e1d2c3-\u2026",\n "document_filename": "RE-2026-0142.pdf",\n "document_type": "invoice",\n "value": "INV-2026-0142",\n "confidence": 0.97,\n "provenance": { "raw_field_name": "Rechnungsnummer", "source_text": "Rechnungsnummer: INV-2026-0142", "resolved_by": "exact", "needs_confirmation": false, "via_redirect": false },\n "links": { "document": "/v1/documents/f0e1\u2026", "document_fields": "/v1/documents/f0e1\u2026/fields" }\n }\n ],\n "pagination": { "total": 37, "limit": 2, "has_more": true, "next_cursor": "MGYx\u2026" }\n}'
49960
+ }
49961
+ ],
49962
+ related: [
49963
+ {
49964
+ label: "talonic_search",
49965
+ slug: "mcp-talonic-search"
49966
+ },
49967
+ {
49968
+ label: "talonic_filter",
49969
+ slug: "mcp-talonic-filter"
49970
+ }
49971
+ ],
49972
+ faq: [
49973
+ {
49974
+ question: "Are the values filtered by the caller's document visibility?",
49975
+ answer: "Yes. Rows and `pagination.total` are Sources-IAM filtered as the API key's minting user, exactly like the other document reads."
49976
+ }
49977
+ ],
49978
+ mentions: [
49979
+ "field values",
49980
+ "values across documents",
49981
+ "provenance",
49982
+ "source text",
49983
+ "resolution band",
49984
+ "cross-document"
49985
+ ]
49986
+ },
49987
+ {
49988
+ slug: "mcp-talonic-find-data",
49989
+ parentSlug: "mcp-tools",
49990
+ title: "talonic_find_data",
49991
+ seoTitle: "talonic_find_data \u2014 Locate Data Behind a Concept",
49992
+ description: "MCP tool that resolves a natural-language concept to the registry fields, values, documents and passages that carry it, by meaning \u2014 the same retrieval the in-product Talonic agent uses.",
49993
+ content: [
49994
+ {
49995
+ type: "paragraph",
49996
+ text: "Locate the **real data behind a concept** before querying anything. Semantic plus lexical retrieval resolves a phrase in the user's words ('payment volume per transaction', 'Vertragslaufzeit') to the registry fields, values, documents and text passages that carry it \u2014 even when the field was captured under a different name. It is the same `find_data` primitive the in-product Talonic agent calls first, exposed with no model in the loop."
49997
+ },
49998
+ {
49999
+ type: "heading",
50000
+ level: 3,
50001
+ text: "When to use"
50002
+ },
50003
+ {
50004
+ type: "list",
50005
+ ordered: false,
50006
+ items: [
50007
+ "The user asks about a concept and you are unsure which field holds it.",
50008
+ "`talonic_list_fields` or `talonic_search` came back empty or ambiguous.",
50009
+ "The answer may live in document prose rather than a captured cell."
50010
+ ]
50011
+ },
50012
+ {
50013
+ type: "heading",
50014
+ level: 3,
50015
+ text: "When NOT to use"
50016
+ },
50017
+ {
50018
+ type: "list",
50019
+ ordered: false,
50020
+ items: [
50021
+ "Reading a known field's values \u2014 use `talonic_field_values`.",
50022
+ "Filtering by a known field \u2014 use `talonic_filter`."
50023
+ ]
50024
+ },
50025
+ {
50026
+ type: "heading",
50027
+ level: 3,
50028
+ text: "Input schema"
50029
+ },
50030
+ {
50031
+ type: "param-table",
50032
+ title: "Parameters",
50033
+ params: [
50034
+ {
50035
+ name: "query",
50036
+ type: "string",
50037
+ description: "The concept, in the user's words."
50038
+ },
50039
+ {
50040
+ name: "top_k",
50041
+ type: "number",
50042
+ description: "Max results per plane (1\u201325, default 10)."
50043
+ },
50044
+ {
50045
+ name: "document_ids",
50046
+ type: "string[]",
50047
+ description: "Hard scope: restrict every plane to these documents."
50048
+ }
50049
+ ]
50050
+ },
50051
+ {
50052
+ type: "heading",
50053
+ level: 3,
50054
+ text: "Response shape"
50055
+ },
50056
+ {
50057
+ type: "param-table",
50058
+ title: "Fields",
50059
+ params: [
50060
+ {
50061
+ name: "result.fields",
50062
+ type: "array",
50063
+ description: "Matching concepts: canonical_name, field ids/keys, tier, occurrence_count, sample values with their documents."
50064
+ },
50065
+ {
50066
+ name: "result.values / result.documents / result.passages",
50067
+ type: "array",
50068
+ description: "Value, document and passage planes \u2014 each item a ready handle for the next call."
50069
+ },
50070
+ {
50071
+ name: "citations",
50072
+ type: "array",
50073
+ description: "Provenance the platform attached to the result."
50074
+ }
50075
+ ]
50076
+ },
50077
+ {
50078
+ type: "code",
50079
+ language: "json",
50080
+ title: "Tool input",
50081
+ code: '{ "query": "contract end date", "top_k": 5 }'
50082
+ },
50083
+ {
50084
+ type: "code",
50085
+ language: "json",
50086
+ title: "Tool response",
50087
+ code: '{\n "tool": "find_data",\n "result": {\n "fields": [{ "canonical_name": "contract_end_date", "field_key": "contract_end_date", "tier": 2, "occurrence_count": 88, "samples": [{ "value": "2027-12-31", "document_id": "f0e1\u2026" }] }],\n "documents": [{ "document_id": "f0e1\u2026", "filename": "Vertrag-GETEC-2024.pdf", "score": 0.81 }],\n "passages": []\n },\n "citations": [{ "document_id": "f0e1\u2026" }]\n}'
50088
+ }
50089
+ ],
50090
+ related: [
50091
+ {
50092
+ label: "talonic_search",
50093
+ slug: "mcp-talonic-search"
50094
+ },
50095
+ {
50096
+ label: "talonic_filter",
50097
+ slug: "mcp-talonic-filter"
50098
+ }
50099
+ ],
50100
+ faq: [
50101
+ {
50102
+ question: "How is this different from talonic_search?",
50103
+ answer: "`talonic_search` matches literal keywords across documents, fields, sources and schemas. `talonic_find_data` matches by MEANING against the field registry and document text and returns ready handles (field ids, document ids, passages) for the next call."
50104
+ }
50105
+ ],
50106
+ mentions: [
50107
+ "find data",
50108
+ "semantic retrieval",
50109
+ "concept to field",
50110
+ "which field holds",
50111
+ "locate data",
50112
+ "passages"
50113
+ ]
50114
+ },
50115
+ {
50116
+ slug: "mcp-talonic-list-agent-tools",
50117
+ parentSlug: "mcp-tools",
50118
+ title: "talonic_list_agent_tools",
50119
+ seoTitle: "talonic_list_agent_tools \u2014 Platform Agent Tool Registry",
50120
+ description: "MCP tool that lists the platform's agent tool registry \u2014 every retrieval, provenance and analysis primitive the in-product Talonic agent runs on \u2014 with input schemas and per-credential invocability.",
50121
+ content: [
50122
+ {
50123
+ type: "paragraph",
50124
+ text: "List the platform's **agent tool registry**: 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), each with its JSON input schema and whether **this** credential may invoke it. An API key reaches the read-only subset; the platform enforces the capability matrix on every call."
50125
+ },
50126
+ {
50127
+ type: "heading",
50128
+ level: 3,
50129
+ text: "When to use"
50130
+ },
50131
+ {
50132
+ type: "list",
50133
+ ordered: false,
50134
+ items: [
50135
+ "You need a capability the dedicated `talonic_*` tools do not cover (SQL over structured data, a workspace overview, cohort discovery).",
50136
+ "You want to see exactly what the in-product agent can do before driving it yourself with `talonic_invoke_agent_tool`."
50137
+ ]
50138
+ },
50139
+ {
50140
+ type: "heading",
50141
+ level: 3,
50142
+ text: "When NOT to use"
50143
+ },
50144
+ {
50145
+ type: "list",
50146
+ ordered: false,
50147
+ items: [
50148
+ "Anything a dedicated `talonic_*` tool already does \u2014 prefer those, they are shaped for you."
50149
+ ]
50150
+ },
50151
+ {
50152
+ type: "heading",
50153
+ level: 3,
50154
+ text: "Input schema"
50155
+ },
50156
+ {
50157
+ type: "param-table",
50158
+ title: "Parameters",
50159
+ params: [
50160
+ {
50161
+ name: "only_invocable",
50162
+ type: "boolean",
50163
+ description: "Hide tools this credential cannot invoke. Default true."
50164
+ },
50165
+ {
50166
+ name: "include_schemas",
50167
+ type: "boolean",
50168
+ description: "Include each tool's JSON input schema. Default true."
50169
+ }
50170
+ ]
50171
+ },
50172
+ {
50173
+ type: "heading",
50174
+ level: 3,
50175
+ text: "Response shape"
50176
+ },
50177
+ {
50178
+ type: "param-table",
50179
+ title: "Fields",
50180
+ params: [
50181
+ {
50182
+ name: "tools[].name",
50183
+ type: "string",
50184
+ description: "Tool name to pass to `talonic_invoke_agent_tool`."
50185
+ },
50186
+ {
50187
+ name: "tools[].can_invoke",
50188
+ type: "boolean",
50189
+ description: "Whether this credential's role may run it."
50190
+ },
50191
+ {
50192
+ name: "tools[].input_schema",
50193
+ type: "object",
50194
+ description: "JSON Schema of the tool's `args`."
50195
+ },
50196
+ {
50197
+ name: "invocable_count / totalCount",
50198
+ type: "number",
50199
+ description: "Counts over the full registry."
50200
+ }
50201
+ ]
50202
+ },
50203
+ {
50204
+ type: "code",
50205
+ language: "json",
50206
+ title: "Tool input",
50207
+ code: '{ "only_invocable": true, "include_schemas": false }'
50208
+ },
50209
+ {
50210
+ type: "code",
50211
+ language: "json",
50212
+ title: "Tool response",
50213
+ code: '{\n "tools": [\n { "name": "find_data", "description": "CALL THIS FIRST to locate the real data behind a natural-language concept\u2026", "impact": "read", "capability": "data.read", "can_invoke": true },\n { "name": "query_data", "description": "Run a read-only SQL SELECT over the extracted data\u2026", "impact": "read", "capability": "data.read", "can_invoke": true }\n ],\n "invocable_count": 12,\n "totalCount": 48\n}'
50214
+ }
50215
+ ],
50216
+ related: [
50217
+ {
50218
+ label: "talonic_search",
50219
+ slug: "mcp-talonic-search"
50220
+ },
50221
+ {
50222
+ label: "talonic_filter",
50223
+ slug: "mcp-talonic-filter"
50224
+ }
50225
+ ],
50226
+ faq: [
50227
+ {
50228
+ question: "Why are some tools listed with can_invoke false?",
50229
+ answer: "An API key runs as a read-only principal, so tools above the `data.read` capability (anything that spends credits or writes) are listed for transparency but cannot be invoked through the API."
50230
+ }
50231
+ ],
50232
+ mentions: [
50233
+ "agent tools",
50234
+ "tool registry",
50235
+ "query_data",
50236
+ "describe_data",
50237
+ "capabilities",
50238
+ "can_invoke"
50239
+ ]
50240
+ },
50241
+ {
50242
+ slug: "mcp-talonic-invoke-agent-tool",
50243
+ parentSlug: "mcp-tools",
50244
+ title: "talonic_invoke_agent_tool",
50245
+ seoTitle: "talonic_invoke_agent_tool \u2014 Run a Platform Agent Tool",
50246
+ description: "MCP tool that invokes one named platform agent tool directly with caller-chosen arguments \u2014 read-only SQL over extracted data, document text, workspace overviews \u2014 with no model in the loop.",
50247
+ content: [
50248
+ {
50249
+ type: "paragraph",
50250
+ text: "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: `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. Denied capabilities come back as an error naming the capability required; the platform re-checks every call."
50251
+ },
50252
+ {
50253
+ type: "heading",
50254
+ level: 3,
50255
+ text: "When to use"
50256
+ },
50257
+ {
50258
+ type: "list",
50259
+ ordered: false,
50260
+ items: [
50261
+ "`talonic_list_agent_tools` showed a tool with `can_invoke: true` that does what you need."
50262
+ ]
50263
+ },
50264
+ {
50265
+ type: "heading",
50266
+ level: 3,
50267
+ text: "When NOT to use"
50268
+ },
50269
+ {
50270
+ type: "list",
50271
+ ordered: false,
50272
+ items: [
50273
+ "Anything a dedicated `talonic_*` tool already does \u2014 prefer those."
50274
+ ]
50275
+ },
50276
+ {
50277
+ type: "heading",
50278
+ level: 3,
50279
+ text: "Input schema"
50280
+ },
50281
+ {
50282
+ type: "param-table",
50283
+ title: "Parameters",
50284
+ params: [
50285
+ {
50286
+ name: "name",
50287
+ type: "string",
50288
+ description: "Tool name, e.g. `query_data`."
50289
+ },
50290
+ {
50291
+ name: "args",
50292
+ type: "object",
50293
+ description: "Arguments matching the tool's `input_schema`."
50294
+ },
50295
+ {
50296
+ name: "document_ids",
50297
+ type: "string[]",
50298
+ description: "Hard scope for scope-aware tools."
50299
+ }
50300
+ ]
50301
+ },
50302
+ {
50303
+ type: "heading",
50304
+ level: 3,
50305
+ text: "Response shape"
50306
+ },
50307
+ {
50308
+ type: "param-table",
50309
+ title: "Fields",
50310
+ params: [
50311
+ {
50312
+ name: "tool",
50313
+ type: "string",
50314
+ description: "The tool that ran."
50315
+ },
50316
+ {
50317
+ name: "result",
50318
+ type: "any",
50319
+ description: "The tool's parsed output."
50320
+ },
50321
+ {
50322
+ name: "citations / artifacts / cards",
50323
+ type: "array",
50324
+ description: "Present when the tool attached them."
50325
+ }
50326
+ ]
50327
+ },
50328
+ {
50329
+ type: "code",
50330
+ language: "json",
50331
+ title: "Tool input",
50332
+ code: '{ "name": "query_data", "args": { "sql": "SELECT field_key, count(*) FROM cells GROUP BY 1 ORDER BY 2 DESC LIMIT 5" } }'
50333
+ },
50334
+ {
50335
+ type: "code",
50336
+ language: "json",
50337
+ title: "Tool response",
50338
+ code: '{\n "tool": "query_data",\n "result": { "rows": [{ "field_key": "invoice_number", "count": 412 }], "row_count": 1 }\n}'
50339
+ }
50340
+ ],
50341
+ related: [
50342
+ {
50343
+ label: "talonic_search",
50344
+ slug: "mcp-talonic-search"
50345
+ },
50346
+ {
50347
+ label: "talonic_filter",
50348
+ slug: "mcp-talonic-filter"
50349
+ }
50350
+ ],
50351
+ faq: [
50352
+ {
50353
+ question: "Does invoking a tool cost credits?",
50354
+ answer: "No. Every tool an API key can reach is LLM-free, so there is no model call to meter; the route is bounded by its own rate-limit namespace instead."
50355
+ }
50356
+ ],
50357
+ mentions: [
50358
+ "invoke tool",
50359
+ "query_data",
50360
+ "sql over extracted data",
50361
+ "document markdown",
50362
+ "agent tool",
50363
+ "no model in the loop"
50364
+ ]
50365
+ },
49432
50366
  {
49433
50367
  slug: "mcp-schemas-resource",
49434
50368
  parentSlug: "mcp-resources",