@talonic/mcp 0.1.76 → 0.1.77

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
@@ -46,7 +46,14 @@ var MCP_NAV_SECTIONS = [
46
46
  { id: "talonic-get-agent-task", label: "talonic_get_agent_task" },
47
47
  { id: "talonic-claim-agent-task", label: "talonic_claim_agent_task" },
48
48
  { id: "talonic-heartbeat-agent-task", label: "talonic_heartbeat_agent_task" },
49
- { id: "talonic-submit-agent-task", label: "talonic_submit_agent_task" }
49
+ { id: "talonic-submit-agent-task", label: "talonic_submit_agent_task" },
50
+ { id: "talonic-list-decision-tasks", label: "talonic_list_decision_tasks" },
51
+ { id: "talonic-claim-decision-task", label: "talonic_claim_decision_task" },
52
+ { id: "talonic-read-decision-package", label: "talonic_read_decision_package" },
53
+ { id: "talonic-heartbeat-decision-task", label: "talonic_heartbeat_decision_task" },
54
+ { id: "talonic-submit-decision-task", label: "talonic_submit_decision_task" },
55
+ { id: "talonic-release-decision-task", label: "talonic_release_decision_task" },
56
+ { id: "talonic-fail-decision-task", label: "talonic_fail_decision_task" }
50
57
  ]
51
58
  },
52
59
  {
@@ -115,7 +122,7 @@ var sections = [
115
122
  },
116
123
  {
117
124
  type: "paragraph",
118
- text: "The tool set covers the full document workflow: extraction (`talonic_extract`, `talonic_to_markdown`, `talonic_request_upload`), workspace retrieval (`talonic_search`, `talonic_filter`, `talonic_get_document`), schema management (`talonic_list_schemas`, `talonic_save_schema`), cost visibility (`talonic_get_balance`, `talonic_get_pricing`, `talonic_get_usage`), and the Agent-task worklist (`talonic_list_agent_tasks` through `talonic_submit_agent_task`), plus the `talonic://schemas` and `talonic://webhooks/reference` resources."
125
+ text: "The tool set covers the full document workflow: extraction (`talonic_extract`, `talonic_to_markdown`, `talonic_request_upload`), workspace retrieval (`talonic_search`, `talonic_filter`, `talonic_get_document`), schema management (`talonic_list_schemas`, `talonic_save_schema`), cost visibility (`talonic_get_balance`, `talonic_get_pricing`, `talonic_get_usage`), the Agent-task worklist (`talonic_list_agent_tasks` through `talonic_submit_agent_task`), and the External-mode decision-task protocol for Talonic Apps (`talonic_list_decision_tasks` through `talonic_fail_decision_task`), plus the `talonic://schemas` and `talonic://webhooks/reference` resources."
119
126
  },
120
127
  {
121
128
  type: "paragraph",
@@ -606,7 +613,7 @@ var sections2 = [
606
613
  "URL: `https://mcp.talonic.com/mcp` \u2014 no query string, no headers.",
607
614
  "Click **Connect**. You are redirected to Talonic to sign in.",
608
615
  "Sign in with Google, Microsoft, or your company SSO.",
609
- "Approve the consent screen. The requested scopes are `extract:write`, `documents:read`, and `schemas:read`. Pick a workspace if you have multiple.",
616
+ "Approve the consent screen. The requested scopes are `extract:write`, `documents:read`, `schemas:read`, and `apps:decide` (the decision-task tools for External-mode Apps). Connectors added before `apps:decide` existed keep working; the seven decision tools show as not invocable until you remove and re-add the connector. Pick a workspace if you have multiple.",
610
617
  "You are returned to Claude.ai with the connector live. The full Talonic tool set is available in any new conversation."
611
618
  ]
612
619
  },
@@ -3455,6 +3462,611 @@ Payment terms: Net 30`
3455
3462
  ],
3456
3463
  mentions: ["transactional submit", "AI Agent (MCP)", "mcp_agent", "typed outputs"]
3457
3464
  },
3465
+ {
3466
+ slug: "talonic-list-decision-tasks",
3467
+ parentSlug: "tools",
3468
+ title: "talonic_list_decision_tasks",
3469
+ seoTitle: "talonic_list_decision_tasks \u2014 External-Mode App Inbox",
3470
+ description: "MCP tool that lists one External-mode app's decision tasks \u2014 runs parked for an outside agent to decide \u2014 with status filters and cursor pagination, metadata only.",
3471
+ content: [
3472
+ {
3473
+ type: "paragraph",
3474
+ text: "List the decision tasks of one Talonic App, newest first. A decision task is how an **External-mode** app hands a run's decision to an agent outside the platform: the run assembles its input package, freezes it, enters `awaiting_decision`, and offers a task. This tool is the polling alternative to the `app.decision_task.offered` webhook and the entry point of the decision workflow."
3475
+ },
3476
+ {
3477
+ type: "paragraph",
3478
+ text: "Each row in `data[]` carries identifiers (`id`, `run_id`, `app_id`), the lifecycle `status`, the current `execution_epoch`, the lease settings (`lease_seconds`, `claimed_by`, `claimed_at`, `lease_expires_at`, `heartbeat_at`), the hard `sla_deadline_at`, and `submitted_at` / `created_at`. The input package is never inlined here: it is read page by page after a claim, and every page read is journaled onto the run."
3479
+ },
3480
+ {
3481
+ type: "callout",
3482
+ text: 'Every one of these tools runs at the platform\'s `decide` tier. A `tlnc_` workspace API key needs a `decide` grant on the app. An OAuth connector session (Claude.ai) needs the `apps:decide` scope \u2014 consented in person when the connector is added, never pre-consented \u2014 plus a live workspace role of `senior_member` or above; the claim is then recorded as the client acting for that person ("Claude for Jane Doe"). Web sessions are refused. A 403 names what is missing (`decide_grant_required`, `insufficient_scope`, `insufficient_tier`); the agent should report it rather than retry.'
3483
+ },
3484
+ {
3485
+ type: "heading",
3486
+ level: 3,
3487
+ id: "list-decision-tasks-workflow",
3488
+ text: "The decision workflow"
3489
+ },
3490
+ {
3491
+ type: "list",
3492
+ ordered: true,
3493
+ items: [
3494
+ 'Call `talonic_list_decision_tasks` with the `app_id` and `status: "available"`.',
3495
+ "Claim a task with `talonic_claim_decision_task`; the claim returns the output contract, precedents and the package descriptor.",
3496
+ "Read the frozen input package with `talonic_read_decision_package`, page by page from `package.first_cursor`.",
3497
+ "Heartbeat with `talonic_heartbeat_decision_task` while deciding, then finish with `talonic_submit_decision_task` \u2014 or `talonic_release_decision_task` / `talonic_fail_decision_task`."
3498
+ ]
3499
+ },
3500
+ {
3501
+ type: "param-table",
3502
+ params: [
3503
+ {
3504
+ name: "app_id",
3505
+ type: "UUID",
3506
+ required: true,
3507
+ description: "The External-mode app whose inbox to read."
3508
+ },
3509
+ {
3510
+ name: "status",
3511
+ type: "available | claimed | submitted | released | failed | timed_out | cancelled",
3512
+ description: "Optional lifecycle-state filter. Start with `available` when looking for work."
3513
+ },
3514
+ {
3515
+ name: "limit",
3516
+ type: "integer",
3517
+ description: "Page size from 1 to 100. Defaults to 50."
3518
+ },
3519
+ {
3520
+ name: "cursor",
3521
+ type: "string",
3522
+ description: "Opaque `pagination.next_cursor` from the previous page."
3523
+ }
3524
+ ]
3525
+ },
3526
+ {
3527
+ type: "code",
3528
+ language: "json",
3529
+ title: "Tool input and response",
3530
+ code: `// talonic_list_decision_tasks({ "app_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", "status": "available", "limit": 1 })
3531
+ {
3532
+ "data": [
3533
+ {
3534
+ "id": "11111111-1111-4111-8111-111111111111",
3535
+ "customer_id": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
3536
+ "run_id": "22222222-2222-4222-8222-222222222222",
3537
+ "app_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
3538
+ "status": "available",
3539
+ "execution_epoch": 0,
3540
+ "input_package_ref": "run",
3541
+ "lease_seconds": 120,
3542
+ "claimed_by": null,
3543
+ "claimed_at": null,
3544
+ "lease_expires_at": null,
3545
+ "heartbeat_at": null,
3546
+ "sla_deadline_at": "2026-09-22T10:10:00.000Z",
3547
+ "submitted_at": null,
3548
+ "created_at": "2026-09-22T10:00:00.000Z",
3549
+ "updated_at": "2026-09-22T10:00:00.000Z"
3550
+ }
3551
+ ],
3552
+ "pagination": { "has_more": false, "next_cursor": null }
3553
+ }`
3554
+ },
3555
+ {
3556
+ type: "paragraph",
3557
+ text: "`sla_deadline_at` is the decision SLA (default 10 minutes, configurable per app): if no valid decision arrives by then, the platform applies the app's declared fallback policy \u2014 a resident rule set decides, the run parks as a system-raised review, or the run fails. Filtering by `claimed` or `timed_out` is useful for supervision; a task whose lease expired is eligible for reclaiming."
3558
+ }
3559
+ ],
3560
+ related: [
3561
+ { label: "talonic_claim_decision_task", slug: "talonic-claim-decision-task" },
3562
+ { label: "talonic_read_decision_package", slug: "talonic-read-decision-package" },
3563
+ { label: "talonic_submit_decision_task", slug: "talonic-submit-decision-task" },
3564
+ { label: "talonic_list_agent_tasks", slug: "talonic-list-agent-tasks" }
3565
+ ],
3566
+ faq: [
3567
+ {
3568
+ question: "How is a decision task different from an Agent task?",
3569
+ answer: "An Agent task parks one document at a pipeline stage and asks for declared output fields. A decision task parks one App run and asks for the run's decision: the outcome is validated against the app's output contract, must cite evidence from the frozen input package, and is written to the app's ledger with decided_by.type external_agent. The two protocols share the lease, heartbeat and execution-epoch mechanics."
3570
+ },
3571
+ {
3572
+ question: "Why does the tool return 403, or show as NOT INVOCABLE IN THIS SESSION?",
3573
+ answer: "The decide tier is an independent grant: operate does not imply it. A tlnc_ key needs a decide grant on that app, granted by a workspace owner. An OAuth connector session needs the apps:decide scope and a senior_member role or above, read live on every call. If the connector was added before the scope existed, its token lacks it: the hosted server then lists the seven tools marked NOT INVOCABLE IN THIS SESSION, and the fix is to remove and re-add the Talonic connector so the consent screen offers 'Claim and decide tasks'."
3574
+ },
3575
+ {
3576
+ question: "What do the decision task statuses mean?",
3577
+ answer: "available means no one holds the task; claimed means an agent holds a live lease; submitted means a decision was accepted and the run resumed; released means the claimant gave it back (it returns to available); failed means the claimant declared it undecidable and the fallback applied; timed_out means the SLA passed; cancelled means the run was cancelled or the task withdrawn."
3578
+ }
3579
+ ],
3580
+ mentions: [
3581
+ "decision task",
3582
+ "External mode",
3583
+ "Talonic Apps",
3584
+ "decide grant",
3585
+ "cursor pagination"
3586
+ ]
3587
+ },
3588
+ {
3589
+ slug: "talonic-claim-decision-task",
3590
+ parentSlug: "tools",
3591
+ title: "talonic_claim_decision_task",
3592
+ seoTitle: "talonic_claim_decision_task \u2014 Lease a Run's Decision",
3593
+ description: "MCP tool that claims an External-mode decision task and returns the decision bundle: task metadata with a fresh execution epoch, the output contract, precedents and the package descriptor.",
3594
+ content: [
3595
+ {
3596
+ type: "paragraph",
3597
+ text: "Take the exclusive lease on a decision task. A successful claim bumps `execution_epoch`, sets `lease_expires_at`, and returns everything needed to decide except the records themselves: the `task` metadata, the `output_contract` the decision must satisfy, the `precedents` reference block (resolved reviews on similar runs), and a `package` descriptor."
3598
+ },
3599
+ {
3600
+ type: "paragraph",
3601
+ text: "There is no separate fetch step in this protocol: claiming **is** the payload disclosure, and it is journaled onto the run. The claim is an exclusive lease with a default TTL of 120 seconds (configurable per app), clamped by the task's SLA deadline. A task whose lease lapsed can be reclaimed; the epoch moves on and the previous claimant's submit is rejected."
3602
+ },
3603
+ {
3604
+ type: "param-table",
3605
+ params: [
3606
+ {
3607
+ name: "task_id",
3608
+ type: "UUID",
3609
+ required: true,
3610
+ description: "Task ID from `talonic_list_decision_tasks` or the offered webhook."
3611
+ }
3612
+ ]
3613
+ },
3614
+ {
3615
+ type: "code",
3616
+ language: "json",
3617
+ title: "Claim response",
3618
+ code: `// talonic_claim_decision_task({ "task_id": "11111111-1111-4111-8111-111111111111" })
3619
+ {
3620
+ "task": {
3621
+ "id": "11111111-1111-4111-8111-111111111111",
3622
+ "run_id": "22222222-2222-4222-8222-222222222222",
3623
+ "app_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
3624
+ "status": "claimed",
3625
+ "execution_epoch": 1,
3626
+ "lease_seconds": 120,
3627
+ "claimed_by": "kkkkkkkk-kkkk-4kkk-8kkk-kkkkkkkkkkkk",
3628
+ "lease_expires_at": "2026-09-22T10:02:00.000Z",
3629
+ "sla_deadline_at": "2026-09-22T10:10:00.000Z",
3630
+ "...": "remaining metadata as in the list"
3631
+ },
3632
+ "output_contract": {
3633
+ "type": "object",
3634
+ "required": ["approve"],
3635
+ "properties": {
3636
+ "approve": { "type": "boolean" },
3637
+ "hold_reason": { "type": "string" }
3638
+ }
3639
+ },
3640
+ "precedents": [],
3641
+ "package": {
3642
+ "package_kind": "records",
3643
+ "record_count": 3,
3644
+ "page_size": 500,
3645
+ "first_cursor": "eyJvZmZzZXQiOjB9",
3646
+ "documents": [
3647
+ {
3648
+ "document_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
3649
+ "filename": "invoice-4711.pdf",
3650
+ "mime_type": "application/pdf",
3651
+ "file_url": "/v1/documents/dddddddd-dddd-4ddd-8ddd-dddddddddddd/file"
3652
+ }
3653
+ ]
3654
+ }
3655
+ }`
3656
+ },
3657
+ {
3658
+ type: "paragraph",
3659
+ text: "`output_contract` arrives in the manifest's own convention: a plain contract is the bare JSON Schema the `outcome` validates against; a `verdict_matrix` or `record_set` contract is wrapped with its `kind` so the agent knows which envelope to submit. `package.first_cursor` is `null` when the package has no records. `package_kind` is `mining_round` for a rule-mining round driven from outside, whose package is one record holding the round's prompts and tool listing."
3660
+ },
3661
+ {
3662
+ type: "callout",
3663
+ text: "Save `execution_epoch` from the claim. Heartbeat, submit, release and fail all require it; a stale epoch is HTTP 409 and never enters the ledger."
3664
+ }
3665
+ ],
3666
+ related: [
3667
+ { label: "talonic_read_decision_package", slug: "talonic-read-decision-package" },
3668
+ { label: "talonic_heartbeat_decision_task", slug: "talonic-heartbeat-decision-task" },
3669
+ { label: "talonic_submit_decision_task", slug: "talonic-submit-decision-task" }
3670
+ ],
3671
+ faq: [
3672
+ {
3673
+ question: "Can I inspect a decision task before claiming it?",
3674
+ answer: "Only its metadata, through the list. The platform discloses the output contract, precedents and package only to the claimant, and journals that disclosure. Claim, read, and release it if it is not yours to decide."
3675
+ },
3676
+ {
3677
+ question: "What happens when two agents claim the same task?",
3678
+ answer: "The second claim returns HTTP 409 while the first lease is live. Once the lease expires without a heartbeat, the task can be reclaimed; the epoch is bumped and any submit carrying the old epoch is rejected."
3679
+ }
3680
+ ],
3681
+ mentions: ["claim", "exclusive lease", "execution epoch", "output contract", "precedents"]
3682
+ },
3683
+ {
3684
+ slug: "talonic-read-decision-package",
3685
+ parentSlug: "tools",
3686
+ title: "talonic_read_decision_package",
3687
+ seoTitle: "talonic_read_decision_package \u2014 Read a Frozen Input Package",
3688
+ description: "MCP tool that reads one page of a claimed decision task's frozen input package \u2014 the records and provenance locators the decision must be made from \u2014 with opaque cursor pagination.",
3689
+ content: [
3690
+ {
3691
+ type: "paragraph",
3692
+ text: "Read the run's frozen input package, one page at a time. The package was assembled and enriched when the run started and is served exactly as persisted; nothing is added at read time, so every claimant of the same task sees the same bytes. Only the client holding the live claim may read it (anyone else gets HTTP 409), and each page read journals a `package_read` event onto the run."
3693
+ },
3694
+ {
3695
+ type: "paragraph",
3696
+ text: "Each record in `data[]` is `{ binding, index, record }` \u2014 the input binding alias, the record's position within it, and the record with its cells and their provenance locators. The first page (no `cursor`) additionally carries `documents`, the source documents behind the package's cells, so a surface can offer the originals without walking every page."
3697
+ },
3698
+ {
3699
+ type: "param-table",
3700
+ params: [
3701
+ { name: "task_id", type: "UUID", required: true, description: "Claimed task ID." },
3702
+ {
3703
+ name: "cursor",
3704
+ type: "string",
3705
+ description: "Opaque package cursor: `package.first_cursor` from the claim, then `pagination.next_cursor`. Omit for the first page."
3706
+ },
3707
+ {
3708
+ name: "limit",
3709
+ type: "integer",
3710
+ description: "Records per page, 1 to 2,000. Defaults to the platform page size reported as `package.page_size` on the claim (500 unless the deployment configures otherwise)."
3711
+ }
3712
+ ]
3713
+ },
3714
+ {
3715
+ type: "code",
3716
+ language: "json",
3717
+ title: "First page",
3718
+ code: `// talonic_read_decision_package({ "task_id": "11111111-1111-4111-8111-111111111111", "limit": 2 })
3719
+ {
3720
+ "task_id": "11111111-1111-4111-8111-111111111111",
3721
+ "run_id": "22222222-2222-4222-8222-222222222222",
3722
+ "record_count": 3,
3723
+ "page_size": 2,
3724
+ "documents": [
3725
+ {
3726
+ "document_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
3727
+ "filename": "invoice-4711.pdf",
3728
+ "mime_type": "application/pdf",
3729
+ "file_url": "/v1/documents/dddddddd-dddd-4ddd-8ddd-dddddddddddd/file"
3730
+ }
3731
+ ],
3732
+ "data": [
3733
+ {
3734
+ "binding": "invoice",
3735
+ "index": 0,
3736
+ "record": {
3737
+ "invoice_total": {
3738
+ "value": 1250.0,
3739
+ "locator": "dp:pppppppp-pppp-4ppp-8ppp-pppppppppppp:rrrrrrrr-rrrr-4rrr-8rrr-rrrrrrrrrrrr:invoice_total",
3740
+ "confidence": 0.97,
3741
+ "document_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd"
3742
+ },
3743
+ "supplier_name": {
3744
+ "value": "Acme GmbH",
3745
+ "locator": "dp:pppppppp-pppp-4ppp-8ppp-pppppppppppp:rrrrrrrr-rrrr-4rrr-8rrr-rrrrrrrrrrrr:supplier_name",
3746
+ "confidence": 0.99,
3747
+ "document_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd"
3748
+ }
3749
+ }
3750
+ }
3751
+ ],
3752
+ "pagination": { "has_more": true, "next_cursor": "eyJvZmZzZXQiOjJ9" }
3753
+ }`
3754
+ },
3755
+ {
3756
+ type: "paragraph",
3757
+ text: "Keep the locators. The submit's `evidence` block must cite the package references the decision relied on, and the platform checks each one against this package \u2014 copy them verbatim rather than reconstructing them. Walk pages while `pagination.has_more` is true; the cursor is an offset into the frozen record order, so a walk is stable even across a release and reclaim."
3758
+ },
3759
+ {
3760
+ type: "callout",
3761
+ text: "For a rule-mining round driven from outside (`package_kind: mining_round`), the package is a single record `{ system_prompt, first_turn, tools }` \u2014 what the hosted model would have seen. The round's tools are called over the platform's REST routes; this MCP surface does not wrap them yet."
3762
+ }
3763
+ ],
3764
+ related: [
3765
+ { label: "talonic_claim_decision_task", slug: "talonic-claim-decision-task" },
3766
+ { label: "talonic_submit_decision_task", slug: "talonic-submit-decision-task" }
3767
+ ],
3768
+ faq: [
3769
+ {
3770
+ question: "Why does reading the package return HTTP 409?",
3771
+ answer: "The package is readable by the current claimant only. Either the task was never claimed by this credential, or the lease lapsed and another agent reclaimed it. Claim (or reclaim) the task first, then read."
3772
+ },
3773
+ {
3774
+ question: "Is reading the package a side effect?",
3775
+ answer: "It changes nothing in the task or run, but each page read is journaled as package_read with the offset and count, so the run's ledger shows what the deciding agent actually looked at."
3776
+ }
3777
+ ],
3778
+ mentions: [
3779
+ "input package",
3780
+ "provenance locator",
3781
+ "package_read",
3782
+ "evidence",
3783
+ "cursor pagination"
3784
+ ]
3785
+ },
3786
+ {
3787
+ slug: "talonic-heartbeat-decision-task",
3788
+ parentSlug: "tools",
3789
+ title: "talonic_heartbeat_decision_task",
3790
+ seoTitle: "talonic_heartbeat_decision_task \u2014 Keep a Decision Lease",
3791
+ description: "MCP tool that extends the lease on a claimed decision task using the execution epoch from the claim \u2014 never past the task's SLA deadline.",
3792
+ content: [
3793
+ {
3794
+ type: "paragraph",
3795
+ text: "Extend the lease on a claimed decision task. The lease is short by design (120 seconds by default) so an abandoned claim frees quickly; a decision that takes longer keeps its claim alive by heartbeating before `lease_expires_at`. The lease never extends past `sla_deadline_at` \u2014 that is the hard decision deadline, after which the app's fallback policy applies."
3796
+ },
3797
+ {
3798
+ type: "param-table",
3799
+ params: [
3800
+ { name: "task_id", type: "UUID", required: true, description: "Claimed task ID." },
3801
+ {
3802
+ name: "execution_epoch",
3803
+ type: "integer",
3804
+ required: true,
3805
+ description: "Exact epoch from the current claim."
3806
+ }
3807
+ ]
3808
+ },
3809
+ {
3810
+ type: "code",
3811
+ language: "json",
3812
+ title: "Heartbeat response",
3813
+ code: `// talonic_heartbeat_decision_task({ "task_id": "11111111-1111-4111-8111-111111111111", "execution_epoch": 1 })
3814
+ {
3815
+ "id": "11111111-1111-4111-8111-111111111111",
3816
+ "status": "claimed",
3817
+ "execution_epoch": 1,
3818
+ "heartbeat_at": "2026-09-22T10:01:30.000Z",
3819
+ "lease_expires_at": "2026-09-22T10:03:30.000Z",
3820
+ "sla_deadline_at": "2026-09-22T10:10:00.000Z",
3821
+ "...": "remaining metadata as in the list"
3822
+ }`
3823
+ },
3824
+ {
3825
+ type: "paragraph",
3826
+ text: "Treat a failed heartbeat as a hard stop. HTTP 409 means the epoch is stale \u2014 the lease lapsed and the task was reclaimed, released, cancelled or timed out \u2014 so any decision you were forming belongs to a claim that no longer exists and will be rejected on submit. Discard it and return to `talonic_list_decision_tasks`."
3827
+ }
3828
+ ],
3829
+ related: [
3830
+ { label: "talonic_claim_decision_task", slug: "talonic-claim-decision-task" },
3831
+ { label: "talonic_submit_decision_task", slug: "talonic-submit-decision-task" },
3832
+ { label: "talonic_release_decision_task", slug: "talonic-release-decision-task" }
3833
+ ],
3834
+ faq: [
3835
+ {
3836
+ question: "How often should an agent heartbeat a decision task?",
3837
+ answer: "Comfortably inside the lease: with the default 120-second lease, roughly every 60 seconds while the decision is still being worked on. Stop once the task is submitted, released or failed."
3838
+ },
3839
+ {
3840
+ question: "Can a heartbeat extend past the SLA deadline?",
3841
+ answer: "No. The lease is clamped to sla_deadline_at. If the decision cannot be made before then, submit what you have with an honest confidence, release the task, or fail it with a reason so the fallback policy runs deliberately rather than by timeout."
3842
+ }
3843
+ ],
3844
+ mentions: ["heartbeat", "lease expiry", "SLA deadline", "execution epoch"]
3845
+ },
3846
+ {
3847
+ slug: "talonic-submit-decision-task",
3848
+ parentSlug: "tools",
3849
+ title: "talonic_submit_decision_task",
3850
+ seoTitle: "talonic_submit_decision_task \u2014 Submit an Evidenced Decision",
3851
+ description: "MCP tool that submits the decision for a claimed External-mode task \u2014 outcome validated against the output contract, evidence checked against the frozen input package, a mandatory rationale \u2014 and resumes the run.",
3852
+ content: [
3853
+ {
3854
+ type: "paragraph",
3855
+ text: "Return the decision for a claimed task. The platform verifies three things transactionally before writing anything: the `outcome` against the task's `output_contract`, every `evidence` locator against the run's frozen input package, and the presence of a `rationale`. On success the task becomes `submitted`, the run resumes through the app's threshold checks and action layer, and the sealed record names `decided_by.type: external_agent`. Talonic writes the ledger; the agent never does."
3856
+ },
3857
+ {
3858
+ type: "param-table",
3859
+ params: [
3860
+ { name: "task_id", type: "UUID", required: true, description: "Claimed task ID." },
3861
+ {
3862
+ name: "execution_epoch",
3863
+ type: "integer",
3864
+ required: true,
3865
+ description: "Exact epoch from the current claim."
3866
+ },
3867
+ {
3868
+ name: "outcome",
3869
+ type: "object",
3870
+ required: true,
3871
+ description: "The decision. For a plain contract, the object its JSON Schema validates. For a `verdict_matrix` contract, `{ subjects: [{ subject_key, rule_outcomes, auto?, detail? }] }`. For a `record_set` contract, its fields-and-rows envelope."
3872
+ },
3873
+ {
3874
+ name: "evidence",
3875
+ type: "string[]",
3876
+ required: true,
3877
+ description: "Provenance locators the decision relied on, copied verbatim from the package (or `db:` / `ref:` locators the app holds a read grant on). Up to 10,000 entries of at most 512 characters. An empty array is accepted only when the app allows unevidenced decisions."
3878
+ },
3879
+ {
3880
+ name: "rationale",
3881
+ type: "string",
3882
+ required: true,
3883
+ description: "A short summary of why \u2014 never private chain-of-thought. At most 4,000 characters."
3884
+ },
3885
+ {
3886
+ name: "confidence",
3887
+ type: "number",
3888
+ description: "Optional confidence from 0 to 1; the app's confidence floor may route a low value to review."
3889
+ },
3890
+ {
3891
+ name: "service_version",
3892
+ type: "string",
3893
+ description: "Optional build identifier of the deciding service (at most 64 characters); recorded as `decided_by.label`."
3894
+ }
3895
+ ]
3896
+ },
3897
+ {
3898
+ type: "code",
3899
+ language: "json",
3900
+ title: "Submit a decision",
3901
+ code: `// talonic_submit_decision_task({
3902
+ // "task_id": "11111111-1111-4111-8111-111111111111",
3903
+ // "execution_epoch": 1,
3904
+ // "outcome": { "approve": true },
3905
+ // "evidence": [
3906
+ // "dp:pppppppp-pppp-4ppp-8ppp-pppppppppppp:rrrrrrrr-rrrr-4rrr-8rrr-rrrrrrrrrrrr:invoice_total",
3907
+ // "dp:pppppppp-pppp-4ppp-8ppp-pppppppppppp:rrrrrrrr-rrrr-4rrr-8rrr-rrrrrrrrrrrr:supplier_name"
3908
+ // ],
3909
+ // "rationale": "Total matches the purchase order and the supplier is on the approved list.",
3910
+ // "confidence": 0.93
3911
+ // })
3912
+ {
3913
+ "id": "11111111-1111-4111-8111-111111111111",
3914
+ "run_id": "22222222-2222-4222-8222-222222222222",
3915
+ "status": "submitted",
3916
+ "execution_epoch": 1,
3917
+ "submitted_at": "2026-09-22T10:02:10.000Z",
3918
+ "...": "remaining metadata as in the list"
3919
+ }`
3920
+ },
3921
+ {
3922
+ type: "paragraph",
3923
+ text: "A refused submission is HTTP 422 with the reason (`Decision violates the output contract: \u2026`, `An evidence block is required \u2026`, a locator outside the package, or a malformed matrix envelope), is journaled as `rejected`, and changes nothing: the task stays `claimed` under your epoch, so fix the payload and submit again before the lease ends. A stale epoch is HTTP 409. A successful submit is terminal \u2014 corrections happen downstream in review, not by a second submit."
3924
+ },
3925
+ {
3926
+ type: "callout",
3927
+ text: "The rationale is a summary for the ledger and for the humans who review it, not a transcript. For a rule-mining round driven from outside, the round's long summary travels in `outcome.summary` and the rationale is one line."
3928
+ }
3929
+ ],
3930
+ related: [
3931
+ { label: "talonic_claim_decision_task", slug: "talonic-claim-decision-task" },
3932
+ { label: "talonic_read_decision_package", slug: "talonic-read-decision-package" },
3933
+ { label: "talonic_release_decision_task", slug: "talonic-release-decision-task" },
3934
+ { label: "talonic_fail_decision_task", slug: "talonic-fail-decision-task" }
3935
+ ],
3936
+ faq: [
3937
+ {
3938
+ question: "Can the evidence cite something outside the input package?",
3939
+ answer: "Only a db: or ref: locator naming a source connection or reference table the app holds a read grant on; those are accepted as attestations and journaled. Any other off-package locator, and the reserved api: prefix, is rejected. Everything else must appear verbatim in the package."
3940
+ },
3941
+ {
3942
+ question: "What if the app's thresholds disagree with my decision?",
3943
+ answer: "The submit is still accepted. Thresholds \u2014 the confidence floor for auto-execution and value ceilings requiring approval \u2014 are enforced by the platform after the decision and before execution, for every mode. A breach routes the run to a human review; it never fails silently."
3944
+ }
3945
+ ],
3946
+ mentions: [
3947
+ "evidence block",
3948
+ "rationale",
3949
+ "output contract",
3950
+ "external_agent",
3951
+ "transactional submit"
3952
+ ]
3953
+ },
3954
+ {
3955
+ slug: "talonic-release-decision-task",
3956
+ parentSlug: "tools",
3957
+ title: "talonic_release_decision_task",
3958
+ seoTitle: "talonic_release_decision_task \u2014 Give a Decision Task Back",
3959
+ description: "MCP tool that releases a claimed decision task back to available without deciding it, so another claimant can pick it up; the next claim bumps the execution epoch.",
3960
+ content: [
3961
+ {
3962
+ type: "paragraph",
3963
+ text: "Give a claimed decision task back. The task returns to `available` with its row intact, the release is journaled, and the next claim bumps the epoch. Use it when you cannot finish within the lease or the SLA but another agent \u2014 or you, later \u2014 could still decide it; the task is not failed and no review is raised."
3964
+ },
3965
+ {
3966
+ type: "param-table",
3967
+ params: [
3968
+ { name: "task_id", type: "UUID", required: true, description: "Claimed task ID." },
3969
+ {
3970
+ name: "execution_epoch",
3971
+ type: "integer",
3972
+ required: true,
3973
+ description: "Exact epoch from the current claim."
3974
+ }
3975
+ ]
3976
+ },
3977
+ {
3978
+ type: "code",
3979
+ language: "json",
3980
+ title: "Release response",
3981
+ code: `// talonic_release_decision_task({ "task_id": "11111111-1111-4111-8111-111111111111", "execution_epoch": 1 })
3982
+ {
3983
+ "id": "11111111-1111-4111-8111-111111111111",
3984
+ "status": "available",
3985
+ "execution_epoch": 1,
3986
+ "claimed_by": null,
3987
+ "lease_expires_at": null,
3988
+ "...": "remaining metadata as in the list"
3989
+ }`
3990
+ },
3991
+ {
3992
+ type: "paragraph",
3993
+ text: "Releasing is cheaper than letting the lease lapse: the task is immediately claimable instead of waiting out the lease, and the ledger records a deliberate give-back rather than a silent timeout. The SLA clock keeps running throughout, so a task released late in its window may time out before anyone reclaims it."
3994
+ }
3995
+ ],
3996
+ related: [
3997
+ { label: "talonic_claim_decision_task", slug: "talonic-claim-decision-task" },
3998
+ { label: "talonic_fail_decision_task", slug: "talonic-fail-decision-task" }
3999
+ ],
4000
+ faq: [
4001
+ {
4002
+ question: "Release or fail \u2014 which one?",
4003
+ answer: "Release when the task is decidable but not by you right now: another claimant gets the same package and contract. Fail when no claimant could decide it from this package: that raises a Human Review with your reason and applies the app's fallback policy."
4004
+ }
4005
+ ],
4006
+ mentions: ["release", "give-back", "execution epoch"]
4007
+ },
4008
+ {
4009
+ slug: "talonic-fail-decision-task",
4010
+ parentSlug: "tools",
4011
+ title: "talonic_fail_decision_task",
4012
+ seoTitle: "talonic_fail_decision_task \u2014 Declare a Task Undecidable",
4013
+ description: "MCP tool that reports a claimed decision task cannot be decided: raises a Human Review with the agent's reason and applies the app's declared fallback policy.",
4014
+ content: [
4015
+ {
4016
+ type: "paragraph",
4017
+ text: "Declare that the claimed task cannot be decided. The platform raises a Human Review carrying your `reason` and applies the app's declared **fallback policy**: `rules` (a resident rule set decides \u2014 the only policy with a deterministic safety net), `hold` (the run parks as a system-raised review) or `none` (the run fails explicitly). The task ends in status `failed`; the ledger records the fallback decision with `fallback: true`."
4018
+ },
4019
+ {
4020
+ type: "param-table",
4021
+ params: [
4022
+ { name: "task_id", type: "UUID", required: true, description: "Claimed task ID." },
4023
+ {
4024
+ name: "execution_epoch",
4025
+ type: "integer",
4026
+ required: true,
4027
+ description: "Exact epoch from the current claim."
4028
+ },
4029
+ {
4030
+ name: "reason",
4031
+ type: "string",
4032
+ required: true,
4033
+ description: "Why the task cannot be decided, at most 2,000 characters. Becomes the review's question context, so name the missing or contradictory evidence."
4034
+ }
4035
+ ]
4036
+ },
4037
+ {
4038
+ type: "code",
4039
+ language: "json",
4040
+ title: "Fail response",
4041
+ code: `// talonic_fail_decision_task({
4042
+ // "task_id": "11111111-1111-4111-8111-111111111111",
4043
+ // "execution_epoch": 1,
4044
+ // "reason": "The package carries two supplier names for one invoice and neither matches the purchase order."
4045
+ // })
4046
+ {
4047
+ "id": "11111111-1111-4111-8111-111111111111",
4048
+ "status": "failed",
4049
+ "execution_epoch": 1,
4050
+ "...": "remaining metadata as in the list"
4051
+ }`
4052
+ },
4053
+ {
4054
+ type: "paragraph",
4055
+ text: "Fail is for genuinely undecidable tasks \u2014 contradictory or insufficient input that no claimant could resolve. A decision you can make with low confidence is better submitted with `confidence` set: the app's confidence floor routes it to review if needed, and the reviewer sees your outcome and rationale instead of an empty slot. For a rule-mining round driven from outside, fail seals the round as `interrupted` with your reason and raises no review."
4056
+ }
4057
+ ],
4058
+ related: [
4059
+ { label: "talonic_release_decision_task", slug: "talonic-release-decision-task" },
4060
+ { label: "talonic_submit_decision_task", slug: "talonic-submit-decision-task" }
4061
+ ],
4062
+ faq: [
4063
+ {
4064
+ question: "Is failing a decision task destructive?",
4065
+ answer: "No data is deleted. The task moves to failed, a review is raised with your reason, and the fallback policy the app declared runs \u2014 which under the rules policy still produces a decision. It cannot be undone, though: a failed task is not reclaimable."
4066
+ }
4067
+ ],
4068
+ mentions: ["fail", "fallback policy", "Human Review", "undecidable"]
4069
+ },
3458
4070
  {
3459
4071
  slug: "talonic-list-fields",
3460
4072
  parentSlug: "tools",