@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/server.js CHANGED
@@ -4953,6 +4953,435 @@ function registerPartiesTools(server, getToken, baseUrl) {
4953
4953
  );
4954
4954
  }
4955
4955
  }
4956
+ var readOnly5 = {
4957
+ readOnlyHint: true,
4958
+ destructiveHint: false,
4959
+ idempotentHint: true,
4960
+ openWorldHint: false
4961
+ };
4962
+ var write5 = (idempotent, destructive = false) => ({
4963
+ readOnlyHint: false,
4964
+ destructiveHint: destructive,
4965
+ idempotentHint: idempotent,
4966
+ openWorldHint: false
4967
+ });
4968
+ var domainSchema = z.enum(["vendors", "customers", "materials"]).describe("Master data domain: vendors, customers or materials.");
4969
+ var domainPath = (domain, rest = "") => `/v1/master-records/${encodeURIComponent(domain)}${rest}`;
4970
+ var CONFIG_DESCRIPTION2 = [
4971
+ "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.",
4972
+ "USE WHEN: before changing the configuration, or to explain which systems feed a domain.",
4973
+ "NOT FOR: the golden records (talonic_master_records_overview).",
4974
+ "",
4975
+ "ARGS: none.",
4976
+ "RETURNS: { domains { vendors|customers|materials { sources[], auto_threshold?, review_threshold?, changes[]?, open_items[]?, evidence? } } }."
4977
+ ].join("\n");
4978
+ function handleConfig2(getToken, baseUrl) {
4979
+ return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/master-records/config"));
4980
+ }
4981
+ var SAVE_CONFIG_DESCRIPTION2 = [
4982
+ "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.",
4983
+ "USE WHEN: setting up Master Records for a workspace, or adding a source system or change log.",
4984
+ "NOT FOR: partial edits; read talonic_master_records_config, change it, and send the whole object.",
4985
+ "",
4986
+ "ARGS: `config` (the whole configuration object), `dry_run` (validate only).",
4987
+ "RETURNS: { config, saved }. A broken config returns the list of problems."
4988
+ ].join("\n");
4989
+ var saveConfigInputSchema2 = {
4990
+ config: z.record(z.string(), z.unknown()).describe("The whole Master Records configuration object (see talonic_master_records_config)."),
4991
+ dry_run: z.boolean().optional().describe("Validate only; nothing is saved.")
4992
+ };
4993
+ function handleSaveConfig2(getToken, baseUrl, args) {
4994
+ return runTool(
4995
+ () => apiJson(getToken, baseUrl, "PUT", "/v1/master-records/config", {
4996
+ body: { config: args.config, dry_run: args.dry_run ?? false }
4997
+ })
4998
+ );
4999
+ }
5000
+ var RUN_DESCRIPTION = [
5001
+ "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.",
5002
+ "USE WHEN: the sources changed, or the domain has never been resolved.",
5003
+ "NOT FOR: reading the result (talonic_master_records_overview).",
5004
+ "",
5005
+ "ARGS: `domain` vendors|customers|materials.",
5006
+ "RETURNS: { run_id, stats { source_rows, records, multi_source, auto_merged, to_review, conflicts, bad_conflicts, per_source, pairs_compared, resolve_ms } }."
5007
+ ].join("\n");
5008
+ var runInputSchema = { domain: domainSchema };
5009
+ function handleRun(getToken, baseUrl, args) {
5010
+ return runTool(() => apiJson(getToken, baseUrl, "POST", domainPath(args.domain, "/run")));
5011
+ }
5012
+ var OVERVIEW_DESCRIPTION2 = [
5013
+ "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.",
5014
+ 'USE WHEN: the headline ("how many duplicates across the ERPs, how many need review") or finding a record by name or source id.',
5015
+ "NOT FOR: one record's fields and reasons (talonic_master_records_get_record); single-source rows (talonic_master_records_crosswalk).",
5016
+ "",
5017
+ "ARGS: `domain`, `status` review|auto|accepted|split|conflict|all (default all), `query` (name or source id contains), `limit` (default 100), `offset`.",
5018
+ "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[] } }."
5019
+ ].join("\n");
5020
+ var overviewInputSchema = {
5021
+ domain: domainSchema,
5022
+ status: z.enum(["review", "auto", "accepted", "split", "conflict", "all"]).optional().describe("Only records with this status; conflict = any field disagreement."),
5023
+ query: z.string().max(200).optional().describe("Name or source id contains."),
5024
+ limit: z.number().int().min(1).max(5e3).optional().describe("Maximum records returned."),
5025
+ offset: z.number().int().min(0).optional().describe("Records to skip, for paging.")
5026
+ };
5027
+ function handleOverview2(getToken, baseUrl, args) {
5028
+ return runTool(
5029
+ () => apiJson(getToken, baseUrl, "GET", domainPath(args.domain, "/overview"), {
5030
+ params: { status: args.status, q: args.query, limit: args.limit, offset: args.offset }
5031
+ })
5032
+ );
5033
+ }
5034
+ var RECORD_DESCRIPTION = [
5035
+ "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.",
5036
+ "USE WHEN: explaining why rows were merged, which system a value came from, or before accepting or splitting a record.",
5037
+ "NOT FOR: listing records (talonic_master_records_overview).",
5038
+ "",
5039
+ "ARGS: `domain`, `key` (from talonic_master_records_overview or talonic_master_records_crosswalk).",
5040
+ "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 }."
5041
+ ].join("\n");
5042
+ var recordInputSchema = {
5043
+ domain: domainSchema,
5044
+ key: z.string().min(1).describe("Golden record key.")
5045
+ };
5046
+ function handleGetRecord(getToken, baseUrl, args) {
5047
+ return runTool(
5048
+ () => apiJson(
5049
+ getToken,
5050
+ baseUrl,
5051
+ "GET",
5052
+ domainPath(args.domain, `/records/${encodeURIComponent(args.key)}`)
5053
+ )
5054
+ );
5055
+ }
5056
+ var DECIDE_DESCRIPTION2 = [
5057
+ "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.",
5058
+ "USE WHEN: the user has reviewed a record and asks to accept or split it.",
5059
+ "NOT FOR: looking at the record (talonic_master_records_get_record).",
5060
+ "",
5061
+ "ARGS: `domain`, `key`, `decision` accept|split|reopen.",
5062
+ "RETURNS: { key, decision, stats } (stats of the re-run)."
5063
+ ].join("\n");
5064
+ var decideInputSchema2 = {
5065
+ domain: domainSchema,
5066
+ key: z.string().min(1).describe("Golden record key."),
5067
+ decision: z.enum(["accept", "split", "reopen"]).describe("accept, split or reopen.")
5068
+ };
5069
+ function handleDecide2(getToken, baseUrl, args) {
5070
+ return runTool(
5071
+ () => apiJson(
5072
+ getToken,
5073
+ baseUrl,
5074
+ "POST",
5075
+ domainPath(args.domain, `/records/${encodeURIComponent(args.key)}/decision`),
5076
+ { body: { decision: args.decision } }
5077
+ )
5078
+ );
5079
+ }
5080
+ var CHANGES_DESCRIPTION = [
5081
+ "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.",
5082
+ 'USE WHEN: "which bank detail changes have no document behind them", vendor bank fraud checks, terms changes.',
5083
+ "NOT FOR: the golden records (talonic_master_records_overview).",
5084
+ "",
5085
+ "ARGS: `domain`, `flagged` (only the changes that need attention).",
5086
+ "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 } }."
5087
+ ].join("\n");
5088
+ var changesInputSchema = {
5089
+ domain: domainSchema,
5090
+ flagged: z.boolean().optional().describe("Only flagged changes.")
5091
+ };
5092
+ function handleChanges(getToken, baseUrl, args) {
5093
+ return runTool(
5094
+ () => apiJson(getToken, baseUrl, "GET", domainPath(args.domain, "/changes"), {
5095
+ params: { flagged: args.flagged ? "true" : void 0 }
5096
+ })
5097
+ );
5098
+ }
5099
+ var CROSSWALK_DESCRIPTION = [
5100
+ "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.",
5101
+ "USE WHEN: looking up which golden record a system's id belongs to, or handing the mapping to another system.",
5102
+ "NOT FOR: the merge reasons (talonic_master_records_get_record).",
5103
+ "",
5104
+ "ARGS: `domain`.",
5105
+ "RETURNS: { domain, rows[] { golden_key, golden_name, source, source_id, status } }."
5106
+ ].join("\n");
5107
+ var crosswalkInputSchema = { domain: domainSchema };
5108
+ function handleCrosswalk(getToken, baseUrl, args) {
5109
+ return runTool(() => apiJson(getToken, baseUrl, "GET", domainPath(args.domain, "/crosswalk")));
5110
+ }
5111
+ async function probeMasterRecordsAccess(token, baseUrl) {
5112
+ try {
5113
+ const res = await fetch(buildUrl(baseUrl, "/v1/master-records/config"), {
5114
+ headers: { Authorization: `Bearer ${token}`, Accept: "application/json" },
5115
+ signal: AbortSignal.timeout(5e3)
5116
+ });
5117
+ return res.ok;
5118
+ } catch {
5119
+ return false;
5120
+ }
5121
+ }
5122
+ function registerMasterRecordsTools(server, getToken, baseUrl) {
5123
+ const tools = [
5124
+ [
5125
+ "talonic_master_records_config",
5126
+ "Read the Master Records configuration",
5127
+ CONFIG_DESCRIPTION2,
5128
+ {},
5129
+ readOnly5,
5130
+ () => handleConfig2(getToken, baseUrl)
5131
+ ],
5132
+ [
5133
+ "talonic_master_records_save_config",
5134
+ "Save the Master Records configuration",
5135
+ SAVE_CONFIG_DESCRIPTION2,
5136
+ saveConfigInputSchema2,
5137
+ write5(true, true),
5138
+ (a) => handleSaveConfig2(getToken, baseUrl, a)
5139
+ ],
5140
+ [
5141
+ "talonic_master_records_run",
5142
+ "Resolve master records",
5143
+ RUN_DESCRIPTION,
5144
+ runInputSchema,
5145
+ write5(true),
5146
+ (a) => handleRun(getToken, baseUrl, a)
5147
+ ],
5148
+ [
5149
+ "talonic_master_records_overview",
5150
+ "Master records overview",
5151
+ OVERVIEW_DESCRIPTION2,
5152
+ overviewInputSchema,
5153
+ readOnly5,
5154
+ (a) => handleOverview2(getToken, baseUrl, a)
5155
+ ],
5156
+ [
5157
+ "talonic_master_records_get_record",
5158
+ "One golden record",
5159
+ RECORD_DESCRIPTION,
5160
+ recordInputSchema,
5161
+ readOnly5,
5162
+ (a) => handleGetRecord(getToken, baseUrl, a)
5163
+ ],
5164
+ [
5165
+ "talonic_master_records_decide",
5166
+ "Accept or split a golden record",
5167
+ DECIDE_DESCRIPTION2,
5168
+ decideInputSchema2,
5169
+ write5(true),
5170
+ (a) => handleDecide2(getToken, baseUrl, a)
5171
+ ],
5172
+ [
5173
+ "talonic_master_records_changes",
5174
+ "Master data changes checked against documents",
5175
+ CHANGES_DESCRIPTION,
5176
+ changesInputSchema,
5177
+ readOnly5,
5178
+ (a) => handleChanges(getToken, baseUrl, a)
5179
+ ],
5180
+ [
5181
+ "talonic_master_records_crosswalk",
5182
+ "Source id to golden record crosswalk",
5183
+ CROSSWALK_DESCRIPTION,
5184
+ crosswalkInputSchema,
5185
+ readOnly5,
5186
+ (a) => handleCrosswalk(getToken, baseUrl, a)
5187
+ ]
5188
+ ];
5189
+ for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
5190
+ server.registerTool(
5191
+ name,
5192
+ { title, description, inputSchema: inputSchema11, annotations: { title, ...annotations } },
5193
+ async (args) => handler(args)
5194
+ );
5195
+ }
5196
+ }
5197
+ var readOnly6 = {
5198
+ readOnlyHint: true,
5199
+ destructiveHint: false,
5200
+ idempotentHint: true,
5201
+ openWorldHint: false
5202
+ };
5203
+ var write6 = (idempotent, destructive = false) => ({
5204
+ readOnlyHint: false,
5205
+ destructiveHint: destructive,
5206
+ idempotentHint: idempotent,
5207
+ openWorldHint: false
5208
+ });
5209
+ var specId = z.string().uuid().describe("Target structure id (talonic_submissions_specs). Omit to use none.");
5210
+ var SPECS_DESCRIPTION = [
5211
+ "List the workspace's target structures: the client formats submissions are mapped into, with field count and how many label mappings still await review.",
5212
+ "USE WHEN: before any other submissions tool, to pick the spec_id.",
5213
+ "NOT FOR: the submissions themselves (talonic_submissions_list).",
5214
+ "",
5215
+ "ARGS: none.",
5216
+ "RETURNS: [{ id, name, updated_at, field_count, labels_to_review }]."
5217
+ ].join("\n");
5218
+ function handleSpecs(getToken, baseUrl) {
5219
+ return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/submissions/specs"));
5220
+ }
5221
+ var LIST_DESCRIPTION = [
5222
+ "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.",
5223
+ 'USE WHEN: the headline ("which submissions are in, which are mapped, which have problems") or finding a submission by file name.',
5224
+ "NOT FOR: what to fix (talonic_submissions_issues); the facts (talonic_submissions_export).",
5225
+ "",
5226
+ "ARGS: `spec_id` (optional), `q` (file name contains), `limit` (default 100, max 500), `offset`.",
5227
+ "RETURNS: { total, submissions[] { document_id, filename, cedent, status, tables, values, facts, metrics, checks_failed, checks_warned, embedded_files, captured_at } }."
5228
+ ].join("\n");
5229
+ var listInputSchema = {
5230
+ spec_id: specId.optional(),
5231
+ q: z.string().optional().describe("File name contains."),
5232
+ limit: z.number().int().min(1).max(500).optional(),
5233
+ offset: z.number().int().min(0).optional()
5234
+ };
5235
+ function handleList(getToken, baseUrl, args) {
5236
+ return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/submissions", { params: args }));
5237
+ }
5238
+ var ISSUES_DESCRIPTION5 = [
5239
+ "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).",
5240
+ "USE WHEN: deciding what to do next; after talonic_submissions_process to see what is left.",
5241
+ "NOT FOR: the full list (talonic_submissions_list).",
5242
+ "",
5243
+ "ARGS: `spec_id` (optional; mapping-related kinds need it).",
5244
+ "RETURNS: [{ kind, document_id, filename, detail }]."
5245
+ ].join("\n");
5246
+ var issuesInputSchema3 = { spec_id: specId.optional() };
5247
+ function handleIssues5(getToken, baseUrl, args) {
5248
+ return runTool(
5249
+ () => apiJson(getToken, baseUrl, "GET", "/v1/submissions/issues", { params: args })
5250
+ );
5251
+ }
5252
+ var PROCESS_DESCRIPTION = [
5253
+ "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.",
5254
+ "USE WHEN: new submissions arrived (only: not_captured), or a target structure changed and submissions need re-mapping (only: not_mapped or all).",
5255
+ "NOT FOR: reading results (talonic_submissions_list, talonic_submissions_issues).",
5256
+ "",
5257
+ "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`.",
5258
+ "RETURNS: dry_run \u2192 { plan[] { document_id, filename, capture, map } }; otherwise { results[] { document_id, ok, facts?, checks_failed?, error? } }."
5259
+ ].join("\n");
5260
+ var processInputSchema = {
5261
+ spec_id: specId.optional(),
5262
+ document_ids: z.array(z.string().uuid()).max(200).optional(),
5263
+ only: z.enum(["not_captured", "not_mapped", "all"]).optional(),
5264
+ recapture: z.boolean().optional().describe("Capture again even when already captured; earlier facts are replaced."),
5265
+ limit: z.number().int().min(1).max(200).optional(),
5266
+ dry_run: z.boolean().optional().describe("List what would run; nothing runs.")
5267
+ };
5268
+ function handleProcess(getToken, baseUrl, args) {
5269
+ return runTool(
5270
+ () => apiJson(getToken, baseUrl, "POST", "/v1/submissions/process", { body: args })
5271
+ );
5272
+ }
5273
+ var COMPLETENESS_DESCRIPTION = [
5274
+ "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.",
5275
+ "USE WHEN: judging whether a submission carries what a quote needs, or explaining what is missing.",
5276
+ "NOT FOR: the facts themselves (talonic_submissions_export).",
5277
+ "",
5278
+ "ARGS: `document_id`, `spec_id`.",
5279
+ "RETURNS: { metrics[] { metric, in_format, facts, fields[] } }."
5280
+ ].join("\n");
5281
+ var completenessInputSchema = {
5282
+ document_id: z.string().uuid().describe("Submission (workbook document) id."),
5283
+ spec_id: specId
5284
+ };
5285
+ function handleCompleteness(getToken, baseUrl, args) {
5286
+ return runTool(
5287
+ () => apiJson(
5288
+ getToken,
5289
+ baseUrl,
5290
+ "GET",
5291
+ `/v1/submissions/${encodeURIComponent(args.document_id)}/completeness`,
5292
+ {
5293
+ params: { spec_id: args.spec_id }
5294
+ }
5295
+ )
5296
+ );
5297
+ }
5298
+ var EXPORT_DESCRIPTION = [
5299
+ "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.",
5300
+ "USE WHEN: handing facts to the client or another system, or answering a question about figures.",
5301
+ "NOT FOR: the inbox (talonic_submissions_list).",
5302
+ "",
5303
+ "ARGS: `spec_id`, `document_id` (optional; all submissions when omitted).",
5304
+ "RETURNS: { header[], rows[][] }."
5305
+ ].join("\n");
5306
+ var exportInputSchema = {
5307
+ spec_id: specId,
5308
+ document_id: z.string().uuid().optional().describe("Only this submission.")
5309
+ };
5310
+ function handleExport(getToken, baseUrl, args) {
5311
+ return runTool(
5312
+ () => apiJson(getToken, baseUrl, "GET", "/v1/submissions/export", { params: args })
5313
+ );
5314
+ }
5315
+ async function probeSubmissionsAccess(token, baseUrl) {
5316
+ try {
5317
+ const res = await fetch(buildUrl(baseUrl, "/v1/submissions/specs"), {
5318
+ headers: { Authorization: `Bearer ${token}`, Accept: "application/json" },
5319
+ signal: AbortSignal.timeout(5e3)
5320
+ });
5321
+ return res.ok;
5322
+ } catch {
5323
+ return false;
5324
+ }
5325
+ }
5326
+ function registerSubmissionsTools(server, getToken, baseUrl) {
5327
+ const tools = [
5328
+ [
5329
+ "talonic_submissions_specs",
5330
+ "Submission target structures",
5331
+ SPECS_DESCRIPTION,
5332
+ {},
5333
+ readOnly6,
5334
+ () => handleSpecs(getToken, baseUrl)
5335
+ ],
5336
+ [
5337
+ "talonic_submissions_list",
5338
+ "Submissions inbox",
5339
+ LIST_DESCRIPTION,
5340
+ listInputSchema,
5341
+ readOnly6,
5342
+ (a) => handleList(getToken, baseUrl, a)
5343
+ ],
5344
+ [
5345
+ "talonic_submissions_issues",
5346
+ "Submissions worklist",
5347
+ ISSUES_DESCRIPTION5,
5348
+ issuesInputSchema3,
5349
+ readOnly6,
5350
+ (a) => handleIssues5(getToken, baseUrl, a)
5351
+ ],
5352
+ [
5353
+ "talonic_submissions_process",
5354
+ "Capture and map submissions",
5355
+ PROCESS_DESCRIPTION,
5356
+ processInputSchema,
5357
+ write6(true),
5358
+ (a) => handleProcess(getToken, baseUrl, a)
5359
+ ],
5360
+ [
5361
+ "talonic_submissions_completeness",
5362
+ "Submission completeness",
5363
+ COMPLETENESS_DESCRIPTION,
5364
+ completenessInputSchema,
5365
+ readOnly6,
5366
+ (a) => handleCompleteness(getToken, baseUrl, a)
5367
+ ],
5368
+ [
5369
+ "talonic_submissions_export",
5370
+ "Export submission facts",
5371
+ EXPORT_DESCRIPTION,
5372
+ exportInputSchema,
5373
+ readOnly6,
5374
+ (a) => handleExport(getToken, baseUrl, a)
5375
+ ]
5376
+ ];
5377
+ for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
5378
+ server.registerTool(
5379
+ name,
5380
+ { title, description, inputSchema: inputSchema11, annotations: { title, ...annotations } },
5381
+ async (args) => handler(args)
5382
+ );
5383
+ }
5384
+ }
4956
5385
  var DEFAULT_BASE3 = "https://api.talonic.com";
4957
5386
  var TASK_STATUSES = ["available", "claimed", "submitted", "timed_out", "cancelled"];
4958
5387
  var taskId = z.string().uuid().describe("Agent task UUID.");
@@ -5689,7 +6118,7 @@ async function resolveFieldId(getToken, baseUrl, args) {
5689
6118
  resolution: { matched_by: resolved.matched_by, redirected_from: resolved.redirected_from }
5690
6119
  };
5691
6120
  }
5692
- var LIST_DESCRIPTION = [
6121
+ var LIST_DESCRIPTION2 = [
5693
6122
  "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.",
5694
6123
  "",
5695
6124
  "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.",
@@ -5803,7 +6232,7 @@ function registerFieldTools(server, getToken, baseUrl) {
5803
6232
  "talonic_list_fields",
5804
6233
  {
5805
6234
  title: "List Registry Fields",
5806
- description: LIST_DESCRIPTION,
6235
+ description: LIST_DESCRIPTION2,
5807
6236
  inputSchema: listFieldsInputSchema,
5808
6237
  annotations: {
5809
6238
  title: "List Registry Fields",
@@ -6025,7 +6454,7 @@ function registerAgentRegistryTools(server, getToken, baseUrl, opts = {}) {
6025
6454
  async (args) => handleInvokeAgentTool(getToken, baseUrl, args)
6026
6455
  );
6027
6456
  }
6028
- var LIST_DESCRIPTION2 = [
6457
+ var LIST_DESCRIPTION3 = [
6029
6458
  "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.",
6030
6459
  "",
6031
6460
  "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.",
@@ -6085,7 +6514,7 @@ function registerSpecTools(server, getToken, baseUrl) {
6085
6514
  "talonic_list_specs",
6086
6515
  {
6087
6516
  title: "List Specs",
6088
- description: LIST_DESCRIPTION2,
6517
+ description: LIST_DESCRIPTION3,
6089
6518
  inputSchema: listSpecsInputSchema,
6090
6519
  annotations: { title: "List Specs", ...READ_ONLY4 },
6091
6520
  _meta: widgetToolMeta("listSpecs")
@@ -6110,7 +6539,7 @@ function mapRunStatus(raw) {
6110
6539
  return "failed";
6111
6540
  return "processing";
6112
6541
  }
6113
- var RUN_DESCRIPTION = [
6542
+ var RUN_DESCRIPTION2 = [
6114
6543
  "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.",
6115
6544
  "",
6116
6545
  "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.",
@@ -6325,7 +6754,7 @@ function registerRunTools(server, getToken, baseUrl) {
6325
6754
  "talonic_run_spec",
6326
6755
  {
6327
6756
  title: "Run a Spec pipeline",
6328
- description: RUN_DESCRIPTION,
6757
+ description: RUN_DESCRIPTION2,
6329
6758
  inputSchema: runSpecInputSchema,
6330
6759
  annotations: {
6331
6760
  title: "Run a Spec pipeline",
@@ -6499,7 +6928,7 @@ function registerAskTools(server, getToken, baseUrl) {
6499
6928
 
6500
6929
  // package.json
6501
6930
  var package_default = {
6502
- version: "0.1.89"};
6931
+ version: "0.1.90"};
6503
6932
 
6504
6933
  // src/version.ts
6505
6934
  var VERSION = package_default.version;
@@ -6552,7 +6981,7 @@ function buildServerInstructions(opts) {
6552
6981
  "apps:decide consent and a senior_member role or above; if a decision tool is marked",
6553
6982
  "not invocable in this session, or a call returns 403, tell the user which consent or",
6554
6983
  "role is missing instead of retrying.",
6555
- "Tools that change workspace data (saving schemas, contract and AP updates, decisions)",
6984
+ "Tools that change workspace data (saving schemas, contract, AP and master record updates, decisions)",
6556
6985
  "should only be called when the user asked for that change."
6557
6986
  ].join(" ");
6558
6987
  }
@@ -6662,6 +7091,12 @@ function createServer(options) {
6662
7091
  if (options.includePartiesTools) {
6663
7092
  registerPartiesTools(server, rawToken, baseUrl);
6664
7093
  }
7094
+ if (options.includeMasterRecordsTools) {
7095
+ registerMasterRecordsTools(server, rawToken, baseUrl);
7096
+ }
7097
+ if (options.includeSubmissionsTools) {
7098
+ registerSubmissionsTools(server, rawToken, baseUrl);
7099
+ }
6665
7100
  registerSchemasResource(server, getTalonic);
6666
7101
  registerWebhooksResource(server, rawToken, baseUrl);
6667
7102
  registerWidgets(server);
@@ -6720,14 +7155,18 @@ async function main(argv = process.argv.slice(2), env = process.env, out = (line
6720
7155
  includeContractsTools,
6721
7156
  includeApTools,
6722
7157
  includeDocGenTools,
6723
- includePartiesTools
7158
+ includePartiesTools,
7159
+ includeMasterRecordsTools,
7160
+ includeSubmissionsTools
6724
7161
  ] = await Promise.all([
6725
7162
  probeGrowthAccess(apiKey, baseUrl),
6726
7163
  probeAgentTaskAdminAccess(apiKey, baseUrl),
6727
7164
  probeContractsAccess(apiKey, baseUrl),
6728
7165
  probeApAccess(apiKey, baseUrl),
6729
7166
  probeDocGenAccess(apiKey, baseUrl),
6730
- probePartiesAccess(apiKey, baseUrl)
7167
+ probePartiesAccess(apiKey, baseUrl),
7168
+ probeMasterRecordsAccess(apiKey, baseUrl),
7169
+ probeSubmissionsAccess(apiKey, baseUrl)
6731
7170
  ]);
6732
7171
  const server = createServer({
6733
7172
  apiKey,
@@ -6737,7 +7176,9 @@ async function main(argv = process.argv.slice(2), env = process.env, out = (line
6737
7176
  includeContractsTools,
6738
7177
  includeApTools,
6739
7178
  includeDocGenTools,
6740
- includePartiesTools
7179
+ includePartiesTools,
7180
+ includeMasterRecordsTools,
7181
+ includeSubmissionsTools
6741
7182
  });
6742
7183
  const transport = new StdioServerTransport();
6743
7184
  await server.connect(transport);