@talonic/mcp 0.1.89 → 0.1.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -77,6 +77,18 @@ interface CreateServerOptions {
77
77
  * Management never lists tools that would 404. Listing visibility only.
78
78
  */
79
79
  includePartiesTools?: boolean;
80
+ /**
81
+ * Register the `talonic_master_records_*` tools. Callers set this only after
82
+ * `probeMasterRecordsAccess` passed, so a deployment without the Master
83
+ * Records app never lists tools that would 404. Listing visibility only.
84
+ */
85
+ includeMasterRecordsTools?: boolean;
86
+ /**
87
+ * Register the `talonic_submissions_*` tools. Callers set this only after
88
+ * `probeSubmissionsAccess` passed, so a deployment without the Submissions
89
+ * app never lists tools that would 404. Listing visibility only.
90
+ */
91
+ includeSubmissionsTools?: boolean;
80
92
  /**
81
93
  * Whether the seven decision-task tools are listed as invocable. The hosted
82
94
  * entrypoint sets this from `tokenHasDecideScope`: an OAuth token that
package/dist/index.js CHANGED
@@ -4895,6 +4895,413 @@ function registerPartiesTools(server, getToken, baseUrl) {
4895
4895
  );
4896
4896
  }
4897
4897
  }
4898
+ var readOnly5 = {
4899
+ readOnlyHint: true,
4900
+ destructiveHint: false,
4901
+ idempotentHint: true,
4902
+ openWorldHint: false
4903
+ };
4904
+ var write5 = (idempotent, destructive = false) => ({
4905
+ readOnlyHint: false,
4906
+ destructiveHint: destructive,
4907
+ idempotentHint: idempotent,
4908
+ openWorldHint: false
4909
+ });
4910
+ var domainSchema = z.enum(["vendors", "customers", "materials"]).describe("Master data domain: vendors, customers or materials.");
4911
+ var domainPath = (domain, rest = "") => `/v1/master-records/${encodeURIComponent(domain)}${rest}`;
4912
+ var CONFIG_DESCRIPTION2 = [
4913
+ "Read the Master Records configuration: per domain (vendors, customers, materials) the source systems (label, SQL connection, the read-only SELECT aliasing columns to the canonical fields; order is survivorship priority), the match thresholds, and the optional change logs, open items and evidence Spec.",
4914
+ "USE WHEN: before changing the configuration, or to explain which systems feed a domain.",
4915
+ "NOT FOR: the golden records (talonic_master_records_overview).",
4916
+ "",
4917
+ "ARGS: none.",
4918
+ "RETURNS: { domains { vendors|customers|materials { sources[], auto_threshold?, review_threshold?, changes[]?, open_items[]?, evidence? } } }."
4919
+ ].join("\n");
4920
+ function handleConfig2(getToken, baseUrl) {
4921
+ return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/master-records/config"));
4922
+ }
4923
+ var SAVE_CONFIG_DESCRIPTION2 = [
4924
+ "Replace the Master Records configuration with a complete new one (validated by the platform: every SQL is checked read-only against its connection). Run with dry_run first. Saving needs an owner.",
4925
+ "USE WHEN: setting up Master Records for a workspace, or adding a source system or change log.",
4926
+ "NOT FOR: partial edits; read talonic_master_records_config, change it, and send the whole object.",
4927
+ "",
4928
+ "ARGS: `config` (the whole configuration object), `dry_run` (validate only).",
4929
+ "RETURNS: { config, saved }. A broken config returns the list of problems."
4930
+ ].join("\n");
4931
+ var saveConfigInputSchema2 = {
4932
+ config: z.record(z.string(), z.unknown()).describe("The whole Master Records configuration object (see talonic_master_records_config)."),
4933
+ dry_run: z.boolean().optional().describe("Validate only; nothing is saved.")
4934
+ };
4935
+ function handleSaveConfig2(getToken, baseUrl, args) {
4936
+ return runTool(
4937
+ () => apiJson(getToken, baseUrl, "PUT", "/v1/master-records/config", {
4938
+ body: { config: args.config, dry_run: args.dry_run ?? false }
4939
+ })
4940
+ );
4941
+ }
4942
+ var RUN_DESCRIPTION = [
4943
+ "Resolve a domain now: read every configured source, match rows across systems, and replace the domain's golden records. Earlier accept / split decisions are kept. Deterministic; running it again on the same data gives the same records.",
4944
+ "USE WHEN: the sources changed, or the domain has never been resolved.",
4945
+ "NOT FOR: reading the result (talonic_master_records_overview).",
4946
+ "",
4947
+ "ARGS: `domain` vendors|customers|materials.",
4948
+ "RETURNS: { run_id, stats { source_rows, records, multi_source, auto_merged, to_review, conflicts, bad_conflicts, per_source, pairs_compared, resolve_ms } }."
4949
+ ].join("\n");
4950
+ var runInputSchema = { domain: domainSchema };
4951
+ function handleRun(getToken, baseUrl, args) {
4952
+ return runTool(() => apiJson(getToken, baseUrl, "POST", domainPath(args.domain, "/run")));
4953
+ }
4954
+ var OVERVIEW_DESCRIPTION2 = [
4955
+ "A domain's latest run (stats per source, records, merged, to review, conflicts) and its golden records that join two or more source rows, review and bank / tax id conflicts first, each with status, match score, member sources and conflicting fields.",
4956
+ 'USE WHEN: the headline ("how many duplicates across the ERPs, how many need review") or finding a record by name or source id.',
4957
+ "NOT FOR: one record's fields and reasons (talonic_master_records_get_record); single-source rows (talonic_master_records_crosswalk).",
4958
+ "",
4959
+ "ARGS: `domain`, `status` review|auto|accepted|split|conflict|all (default all), `query` (name or source id contains), `limit` (default 100), `offset`.",
4960
+ "RETURNS: { domain, run { id, status, stats, started_at, finished_at }, total, records[] { key, name, member_count, status, score, conflict_level, sources[] { source, id }, conflict_fields[] } }."
4961
+ ].join("\n");
4962
+ var overviewInputSchema = {
4963
+ domain: domainSchema,
4964
+ status: z.enum(["review", "auto", "accepted", "split", "conflict", "all"]).optional().describe("Only records with this status; conflict = any field disagreement."),
4965
+ query: z.string().max(200).optional().describe("Name or source id contains."),
4966
+ limit: z.number().int().min(1).max(5e3).optional().describe("Maximum records returned."),
4967
+ offset: z.number().int().min(0).optional().describe("Records to skip, for paging.")
4968
+ };
4969
+ function handleOverview2(getToken, baseUrl, args) {
4970
+ return runTool(
4971
+ () => apiJson(getToken, baseUrl, "GET", domainPath(args.domain, "/overview"), {
4972
+ params: { status: args.status, q: args.query, limit: args.limit, offset: args.offset }
4973
+ })
4974
+ );
4975
+ }
4976
+ var RECORD_DESCRIPTION = [
4977
+ "One golden record: each member row with its source and values, the golden value per field with the sources it came from, the fields where sources disagree (bank account and tax id are `bad`), the field-by-field reasons the rows were linked, status, score and any decision.",
4978
+ "USE WHEN: explaining why rows were merged, which system a value came from, or before accepting or splitting a record.",
4979
+ "NOT FOR: listing records (talonic_master_records_overview).",
4980
+ "",
4981
+ "ARGS: `domain`, `key` (from talonic_master_records_overview or talonic_master_records_crosswalk).",
4982
+ "RETURNS: { key, domain, name, members[] { source, id, values }, golden { <field> { value, from[] } }, conflicts[] { field, severity, values[] }, reasons[] { field, outcome, weight }, score, status, run_id, decision }."
4983
+ ].join("\n");
4984
+ var recordInputSchema = {
4985
+ domain: domainSchema,
4986
+ key: z.string().min(1).describe("Golden record key.")
4987
+ };
4988
+ function handleGetRecord(getToken, baseUrl, args) {
4989
+ return runTool(
4990
+ () => apiJson(
4991
+ getToken,
4992
+ baseUrl,
4993
+ "GET",
4994
+ domainPath(args.domain, `/records/${encodeURIComponent(args.key)}`)
4995
+ )
4996
+ );
4997
+ }
4998
+ var DECIDE_DESCRIPTION2 = [
4999
+ "Decide a golden record: `accept` keeps the merge, `split` breaks it into one record per source row, `reopen` removes an earlier decision. The domain is re-resolved at once and the decision survives every later run.",
5000
+ "USE WHEN: the user has reviewed a record and asks to accept or split it.",
5001
+ "NOT FOR: looking at the record (talonic_master_records_get_record).",
5002
+ "",
5003
+ "ARGS: `domain`, `key`, `decision` accept|split|reopen.",
5004
+ "RETURNS: { key, decision, stats } (stats of the re-run)."
5005
+ ].join("\n");
5006
+ var decideInputSchema2 = {
5007
+ domain: domainSchema,
5008
+ key: z.string().min(1).describe("Golden record key."),
5009
+ decision: z.enum(["accept", "split", "reopen"]).describe("accept, split or reopen.")
5010
+ };
5011
+ function handleDecide2(getToken, baseUrl, args) {
5012
+ return runTool(
5013
+ () => apiJson(
5014
+ getToken,
5015
+ baseUrl,
5016
+ "POST",
5017
+ domainPath(args.domain, `/records/${encodeURIComponent(args.key)}/decision`),
5018
+ { body: { decision: args.decision } }
5019
+ )
5020
+ );
5021
+ }
5022
+ var CHANGES_DESCRIPTION = [
5023
+ "Master data changes from the source systems' change logs, each checked against the evidence documents: a bank account change `matches` when a document for the party names the new account, `contradicts` when documents name another, `no_document` otherwise; flagged bank changes carry the party's open payables across every source as `exposure`. Read live; nothing is stored.",
5024
+ 'USE WHEN: "which bank detail changes have no document behind them", vendor bank fraud checks, terms changes.',
5025
+ "NOT FOR: the golden records (talonic_master_records_overview).",
5026
+ "",
5027
+ "ARGS: `domain`, `flagged` (only the changes that need attention).",
5028
+ "RETURNS: { domain, stats { changes, bank_changes, bank_matched, bank_contradicted, bank_no_document, terms_no_document, flagged, exposure, evidence_documents }, evidence_run, changes[] { source, id, field, old_value, new_value, changed_at, changed_by, golden_key, golden_name, verdict, flagged, evidence[], exposure, elsewhere[], explanation } }."
5029
+ ].join("\n");
5030
+ var changesInputSchema = {
5031
+ domain: domainSchema,
5032
+ flagged: z.boolean().optional().describe("Only flagged changes.")
5033
+ };
5034
+ function handleChanges(getToken, baseUrl, args) {
5035
+ return runTool(
5036
+ () => apiJson(getToken, baseUrl, "GET", domainPath(args.domain, "/changes"), {
5037
+ params: { flagged: args.flagged ? "true" : void 0 }
5038
+ })
5039
+ );
5040
+ }
5041
+ var CROSSWALK_DESCRIPTION = [
5042
+ "The crosswalk: every source row (source, source id) mapped to its golden record key and name and the record's status, single-source rows included.",
5043
+ "USE WHEN: looking up which golden record a system's id belongs to, or handing the mapping to another system.",
5044
+ "NOT FOR: the merge reasons (talonic_master_records_get_record).",
5045
+ "",
5046
+ "ARGS: `domain`.",
5047
+ "RETURNS: { domain, rows[] { golden_key, golden_name, source, source_id, status } }."
5048
+ ].join("\n");
5049
+ var crosswalkInputSchema = { domain: domainSchema };
5050
+ function handleCrosswalk(getToken, baseUrl, args) {
5051
+ return runTool(() => apiJson(getToken, baseUrl, "GET", domainPath(args.domain, "/crosswalk")));
5052
+ }
5053
+ function registerMasterRecordsTools(server, getToken, baseUrl) {
5054
+ const tools = [
5055
+ [
5056
+ "talonic_master_records_config",
5057
+ "Read the Master Records configuration",
5058
+ CONFIG_DESCRIPTION2,
5059
+ {},
5060
+ readOnly5,
5061
+ () => handleConfig2(getToken, baseUrl)
5062
+ ],
5063
+ [
5064
+ "talonic_master_records_save_config",
5065
+ "Save the Master Records configuration",
5066
+ SAVE_CONFIG_DESCRIPTION2,
5067
+ saveConfigInputSchema2,
5068
+ write5(true, true),
5069
+ (a) => handleSaveConfig2(getToken, baseUrl, a)
5070
+ ],
5071
+ [
5072
+ "talonic_master_records_run",
5073
+ "Resolve master records",
5074
+ RUN_DESCRIPTION,
5075
+ runInputSchema,
5076
+ write5(true),
5077
+ (a) => handleRun(getToken, baseUrl, a)
5078
+ ],
5079
+ [
5080
+ "talonic_master_records_overview",
5081
+ "Master records overview",
5082
+ OVERVIEW_DESCRIPTION2,
5083
+ overviewInputSchema,
5084
+ readOnly5,
5085
+ (a) => handleOverview2(getToken, baseUrl, a)
5086
+ ],
5087
+ [
5088
+ "talonic_master_records_get_record",
5089
+ "One golden record",
5090
+ RECORD_DESCRIPTION,
5091
+ recordInputSchema,
5092
+ readOnly5,
5093
+ (a) => handleGetRecord(getToken, baseUrl, a)
5094
+ ],
5095
+ [
5096
+ "talonic_master_records_decide",
5097
+ "Accept or split a golden record",
5098
+ DECIDE_DESCRIPTION2,
5099
+ decideInputSchema2,
5100
+ write5(true),
5101
+ (a) => handleDecide2(getToken, baseUrl, a)
5102
+ ],
5103
+ [
5104
+ "talonic_master_records_changes",
5105
+ "Master data changes checked against documents",
5106
+ CHANGES_DESCRIPTION,
5107
+ changesInputSchema,
5108
+ readOnly5,
5109
+ (a) => handleChanges(getToken, baseUrl, a)
5110
+ ],
5111
+ [
5112
+ "talonic_master_records_crosswalk",
5113
+ "Source id to golden record crosswalk",
5114
+ CROSSWALK_DESCRIPTION,
5115
+ crosswalkInputSchema,
5116
+ readOnly5,
5117
+ (a) => handleCrosswalk(getToken, baseUrl, a)
5118
+ ]
5119
+ ];
5120
+ for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
5121
+ server.registerTool(
5122
+ name,
5123
+ { title, description, inputSchema: inputSchema11, annotations: { title, ...annotations } },
5124
+ async (args) => handler(args)
5125
+ );
5126
+ }
5127
+ }
5128
+ var readOnly6 = {
5129
+ readOnlyHint: true,
5130
+ destructiveHint: false,
5131
+ idempotentHint: true,
5132
+ openWorldHint: false
5133
+ };
5134
+ var write6 = (idempotent, destructive = false) => ({
5135
+ readOnlyHint: false,
5136
+ destructiveHint: destructive,
5137
+ idempotentHint: idempotent,
5138
+ openWorldHint: false
5139
+ });
5140
+ var specId = z.string().uuid().describe("Target structure id (talonic_submissions_specs). Omit to use none.");
5141
+ var SPECS_DESCRIPTION = [
5142
+ "List the workspace's target structures: the client formats submissions are mapped into, with field count and how many label mappings still await review.",
5143
+ "USE WHEN: before any other submissions tool, to pick the spec_id.",
5144
+ "NOT FOR: the submissions themselves (talonic_submissions_list).",
5145
+ "",
5146
+ "ARGS: none.",
5147
+ "RETURNS: [{ id, name, updated_at, field_count, labels_to_review }]."
5148
+ ].join("\n");
5149
+ function handleSpecs(getToken, baseUrl) {
5150
+ return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/submissions/specs"));
5151
+ }
5152
+ var LIST_DESCRIPTION = [
5153
+ "The inbox: every submission workbook of the workspace with its cedent, status (not_captured, captured, mapped, failed), captured values, facts and metrics under a target structure, and failed / warned checks.",
5154
+ 'USE WHEN: the headline ("which submissions are in, which are mapped, which have problems") or finding a submission by file name.',
5155
+ "NOT FOR: what to fix (talonic_submissions_issues); the facts (talonic_submissions_export).",
5156
+ "",
5157
+ "ARGS: `spec_id` (optional), `q` (file name contains), `limit` (default 100, max 500), `offset`.",
5158
+ "RETURNS: { total, submissions[] { document_id, filename, cedent, status, tables, values, facts, metrics, checks_failed, checks_warned, embedded_files, captured_at } }."
5159
+ ].join("\n");
5160
+ var listInputSchema = {
5161
+ spec_id: specId.optional(),
5162
+ q: z.string().optional().describe("File name contains."),
5163
+ limit: z.number().int().min(1).max(500).optional(),
5164
+ offset: z.number().int().min(0).optional()
5165
+ };
5166
+ function handleList(getToken, baseUrl, args) {
5167
+ return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/submissions", { params: args }));
5168
+ }
5169
+ var ISSUES_DESCRIPTION5 = [
5170
+ "The worklist: what needs a person, naming the submissions concerned. Kinds: not_captured, capture_failed, not_mapped, check_failed (with count), labels_to_review (with count), missing_metric (format metrics with no facts in a submission).",
5171
+ "USE WHEN: deciding what to do next; after talonic_submissions_process to see what is left.",
5172
+ "NOT FOR: the full list (talonic_submissions_list).",
5173
+ "",
5174
+ "ARGS: `spec_id` (optional; mapping-related kinds need it).",
5175
+ "RETURNS: [{ kind, document_id, filename, detail }]."
5176
+ ].join("\n");
5177
+ var issuesInputSchema3 = { spec_id: specId.optional() };
5178
+ function handleIssues5(getToken, baseUrl, args) {
5179
+ return runTool(
5180
+ () => apiJson(getToken, baseUrl, "GET", "/v1/submissions/issues", { params: args })
5181
+ );
5182
+ }
5183
+ var PROCESS_DESCRIPTION = [
5184
+ "Capture new workbooks and map submissions into a target structure, in bulk. Capturing is deterministic (no model); mapping classifies only labels the workspace has not seen, and reuses every earlier and every human decision. Run with dry_run first.",
5185
+ "USE WHEN: new submissions arrived (only: not_captured), or a target structure changed and submissions need re-mapping (only: not_mapped or all).",
5186
+ "NOT FOR: reading results (talonic_submissions_list, talonic_submissions_issues).",
5187
+ "",
5188
+ "ARGS: `spec_id` (map into this structure), `document_ids` (restrict), `only` not_captured|not_mapped|all (default all), `recapture` (capture again even when captured; replaces earlier facts), `limit` (default 50, max 200), `dry_run`.",
5189
+ "RETURNS: dry_run \u2192 { plan[] { document_id, filename, capture, map } }; otherwise { results[] { document_id, ok, facts?, checks_failed?, error? } }."
5190
+ ].join("\n");
5191
+ var processInputSchema = {
5192
+ spec_id: specId.optional(),
5193
+ document_ids: z.array(z.string().uuid()).max(200).optional(),
5194
+ only: z.enum(["not_captured", "not_mapped", "all"]).optional(),
5195
+ recapture: z.boolean().optional().describe("Capture again even when already captured; earlier facts are replaced."),
5196
+ limit: z.number().int().min(1).max(200).optional(),
5197
+ dry_run: z.boolean().optional().describe("List what would run; nothing runs.")
5198
+ };
5199
+ function handleProcess(getToken, baseUrl, args) {
5200
+ return runTool(
5201
+ () => apiJson(getToken, baseUrl, "POST", "/v1/submissions/process", { body: args })
5202
+ );
5203
+ }
5204
+ var COMPLETENESS_DESCRIPTION = [
5205
+ "One submission against a target structure: for every metric the client's format knows, how many facts the submission has and which fields they fill, plus metrics found that are not in the format.",
5206
+ "USE WHEN: judging whether a submission carries what a quote needs, or explaining what is missing.",
5207
+ "NOT FOR: the facts themselves (talonic_submissions_export).",
5208
+ "",
5209
+ "ARGS: `document_id`, `spec_id`.",
5210
+ "RETURNS: { metrics[] { metric, in_format, facts, fields[] } }."
5211
+ ].join("\n");
5212
+ var completenessInputSchema = {
5213
+ document_id: z.string().uuid().describe("Submission (workbook document) id."),
5214
+ spec_id: specId
5215
+ };
5216
+ function handleCompleteness(getToken, baseUrl, args) {
5217
+ return runTool(
5218
+ () => apiJson(
5219
+ getToken,
5220
+ baseUrl,
5221
+ "GET",
5222
+ `/v1/submissions/${encodeURIComponent(args.document_id)}/completeness`,
5223
+ {
5224
+ params: { spec_id: args.spec_id }
5225
+ }
5226
+ )
5227
+ );
5228
+ }
5229
+ var EXPORT_DESCRIPTION = [
5230
+ "Facts in the client's long format: a header (the structure's fields, then Metric, Figure, Document, Source) and one row per figure; Source is the cell the figure came from. Large: prefer one document.",
5231
+ "USE WHEN: handing facts to the client or another system, or answering a question about figures.",
5232
+ "NOT FOR: the inbox (talonic_submissions_list).",
5233
+ "",
5234
+ "ARGS: `spec_id`, `document_id` (optional; all submissions when omitted).",
5235
+ "RETURNS: { header[], rows[][] }."
5236
+ ].join("\n");
5237
+ var exportInputSchema = {
5238
+ spec_id: specId,
5239
+ document_id: z.string().uuid().optional().describe("Only this submission.")
5240
+ };
5241
+ function handleExport(getToken, baseUrl, args) {
5242
+ return runTool(
5243
+ () => apiJson(getToken, baseUrl, "GET", "/v1/submissions/export", { params: args })
5244
+ );
5245
+ }
5246
+ function registerSubmissionsTools(server, getToken, baseUrl) {
5247
+ const tools = [
5248
+ [
5249
+ "talonic_submissions_specs",
5250
+ "Submission target structures",
5251
+ SPECS_DESCRIPTION,
5252
+ {},
5253
+ readOnly6,
5254
+ () => handleSpecs(getToken, baseUrl)
5255
+ ],
5256
+ [
5257
+ "talonic_submissions_list",
5258
+ "Submissions inbox",
5259
+ LIST_DESCRIPTION,
5260
+ listInputSchema,
5261
+ readOnly6,
5262
+ (a) => handleList(getToken, baseUrl, a)
5263
+ ],
5264
+ [
5265
+ "talonic_submissions_issues",
5266
+ "Submissions worklist",
5267
+ ISSUES_DESCRIPTION5,
5268
+ issuesInputSchema3,
5269
+ readOnly6,
5270
+ (a) => handleIssues5(getToken, baseUrl, a)
5271
+ ],
5272
+ [
5273
+ "talonic_submissions_process",
5274
+ "Capture and map submissions",
5275
+ PROCESS_DESCRIPTION,
5276
+ processInputSchema,
5277
+ write6(true),
5278
+ (a) => handleProcess(getToken, baseUrl, a)
5279
+ ],
5280
+ [
5281
+ "talonic_submissions_completeness",
5282
+ "Submission completeness",
5283
+ COMPLETENESS_DESCRIPTION,
5284
+ completenessInputSchema,
5285
+ readOnly6,
5286
+ (a) => handleCompleteness(getToken, baseUrl, a)
5287
+ ],
5288
+ [
5289
+ "talonic_submissions_export",
5290
+ "Export submission facts",
5291
+ EXPORT_DESCRIPTION,
5292
+ exportInputSchema,
5293
+ readOnly6,
5294
+ (a) => handleExport(getToken, baseUrl, a)
5295
+ ]
5296
+ ];
5297
+ for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
5298
+ server.registerTool(
5299
+ name,
5300
+ { title, description, inputSchema: inputSchema11, annotations: { title, ...annotations } },
5301
+ async (args) => handler(args)
5302
+ );
5303
+ }
5304
+ }
4898
5305
  var DEFAULT_BASE3 = "https://api.talonic.com";
4899
5306
  var TASK_STATUSES = ["available", "claimed", "submitted", "timed_out", "cancelled"];
4900
5307
  var taskId = z.string().uuid().describe("Agent task UUID.");
@@ -5620,7 +6027,7 @@ async function resolveFieldId(getToken, baseUrl, args) {
5620
6027
  resolution: { matched_by: resolved.matched_by, redirected_from: resolved.redirected_from }
5621
6028
  };
5622
6029
  }
5623
- var LIST_DESCRIPTION = [
6030
+ var LIST_DESCRIPTION2 = [
5624
6031
  "List the workspace's Field Registry \u2014 the canonical concepts Talonic has discovered across every ingested document, each with a stable id, maturity level, data type, synonyms and occurrence count.",
5625
6032
  "",
5626
6033
  "USE WHEN: you need to know WHAT data exists before querying it, want to pick the right concept for a question, or need the exact field id for talonic_get_field / talonic_field_values.",
@@ -5734,7 +6141,7 @@ function registerFieldTools(server, getToken, baseUrl) {
5734
6141
  "talonic_list_fields",
5735
6142
  {
5736
6143
  title: "List Registry Fields",
5737
- description: LIST_DESCRIPTION,
6144
+ description: LIST_DESCRIPTION2,
5738
6145
  inputSchema: listFieldsInputSchema,
5739
6146
  annotations: {
5740
6147
  title: "List Registry Fields",
@@ -5956,7 +6363,7 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
5956
6363
  async (args) => handleInvokeAgentTool(getToken, baseUrl, args)
5957
6364
  );
5958
6365
  }
5959
- var LIST_DESCRIPTION2 = [
6366
+ var LIST_DESCRIPTION3 = [
5960
6367
  "List the workspace's Specs \u2014 the configured pipelines (rail + fields) that talonic_run_spec executes. Each row: id, name, description, schema_id (the schema a run materializes onto \u2014 a DIFFERENT id from the Spec's), version / materialized_version (null = never published), field_count, node_count, timestamps.",
5961
6368
  "",
5962
6369
  "USE WHEN: the user wants to run 'their pipeline' / 'the invoice Spec', or you need a spec_id for talonic_run_spec / talonic_get_spec.",
@@ -6016,7 +6423,7 @@ function registerSpecTools(server, getToken, baseUrl) {
6016
6423
  "talonic_list_specs",
6017
6424
  {
6018
6425
  title: "List Specs",
6019
- description: LIST_DESCRIPTION2,
6426
+ description: LIST_DESCRIPTION3,
6020
6427
  inputSchema: listSpecsInputSchema,
6021
6428
  annotations: { title: "List Specs", ...READ_ONLY4 },
6022
6429
  _meta: widgetToolMeta("listSpecs")
@@ -6041,7 +6448,7 @@ function mapRunStatus(raw) {
6041
6448
  return "failed";
6042
6449
  return "processing";
6043
6450
  }
6044
- var RUN_DESCRIPTION = [
6451
+ var RUN_DESCRIPTION2 = [
6045
6452
  "Run a Spec \u2014 the customer's configured pipeline \u2014 over documents, in one call. Two inputs: `document_ids` (documents already in the workspace; for a new file, first talonic_request_upload \u2192 poll talonic_get_document until completed) OR `file_urls` (public https files, max 20; Talonic ingests them first). Consumes credits.",
6046
6453
  "",
6047
6454
  "USE WHEN: the user wants to 'run the invoice pipeline on these documents', process files through their Spec, or produce the Spec's structured rows.",
@@ -6256,7 +6663,7 @@ function registerRunTools(server, getToken, baseUrl) {
6256
6663
  "talonic_run_spec",
6257
6664
  {
6258
6665
  title: "Run a Spec pipeline",
6259
- description: RUN_DESCRIPTION,
6666
+ description: RUN_DESCRIPTION2,
6260
6667
  inputSchema: runSpecInputSchema,
6261
6668
  annotations: {
6262
6669
  title: "Run a Spec pipeline",
@@ -6430,7 +6837,7 @@ function registerAskTools(server, getToken, baseUrl) {
6430
6837
 
6431
6838
  // package.json
6432
6839
  var package_default = {
6433
- version: "0.1.89"};
6840
+ version: "0.1.90"};
6434
6841
 
6435
6842
  // src/version.ts
6436
6843
  var VERSION = package_default.version;
@@ -6483,7 +6890,7 @@ function buildServerInstructions(opts) {
6483
6890
  "apps:decide consent and a senior_member role or above; if a decision tool is marked",
6484
6891
  "not invocable in this session, or a call returns 403, tell the user which consent or",
6485
6892
  "role is missing instead of retrying.",
6486
- "Tools that change workspace data (saving schemas, contract and AP updates, decisions)",
6893
+ "Tools that change workspace data (saving schemas, contract, AP and master record updates, decisions)",
6487
6894
  "should only be called when the user asked for that change."
6488
6895
  ].join(" ");
6489
6896
  }
@@ -6593,6 +7000,12 @@ function createServer(options) {
6593
7000
  if (options.includePartiesTools) {
6594
7001
  registerPartiesTools(server, rawToken, baseUrl);
6595
7002
  }
7003
+ if (options.includeMasterRecordsTools) {
7004
+ registerMasterRecordsTools(server, rawToken, baseUrl);
7005
+ }
7006
+ if (options.includeSubmissionsTools) {
7007
+ registerSubmissionsTools(server, rawToken, baseUrl);
7008
+ }
6596
7009
  registerSchemasResource(server, getTalonic);
6597
7010
  registerWebhooksResource(server, rawToken, baseUrl);
6598
7011
  registerWidgets(server);