@talonic/mcp 0.1.90 → 0.1.91

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.js CHANGED
@@ -5243,6 +5243,81 @@ function handleExport(getToken, baseUrl, args) {
5243
5243
  () => apiJson(getToken, baseUrl, "GET", "/v1/submissions/export", { params: args })
5244
5244
  );
5245
5245
  }
5246
+ var MATRIX_DESCRIPTION = [
5247
+ "Where one submission's figures are: facts per metric and year (accident, underwriting or reference period), every metric of the target structure included, grouped into families (premium, losses, exposure, cat, rates, other). Key '' counts facts with no period.",
5248
+ "USE WHEN: seeing what a submission covers before answering a question about it; finding which metric and year to read with talonic_submissions_facts.",
5249
+ "NOT FOR: the figures themselves (talonic_submissions_facts).",
5250
+ "",
5251
+ "ARGS: `document_id`, `spec_id`.",
5252
+ "RETURNS: { years[], rows[] { metric, family, in_format, facts, years { year: count } } }."
5253
+ ].join("\n");
5254
+ var matrixInputSchema = {
5255
+ document_id: z.string().uuid().describe("Submission (workbook document) id."),
5256
+ spec_id: specId
5257
+ };
5258
+ function handleMatrix(getToken, baseUrl, args) {
5259
+ return runTool(
5260
+ () => apiJson(
5261
+ getToken,
5262
+ baseUrl,
5263
+ "GET",
5264
+ `/v1/submissions/${encodeURIComponent(args.document_id)}/matrix`,
5265
+ {
5266
+ params: { spec_id: args.spec_id }
5267
+ }
5268
+ )
5269
+ );
5270
+ }
5271
+ var FACTS_DESCRIPTION = [
5272
+ `One submission's figures, filtered: by metric, by year ('' = no period) and by field values (e.g. { "LoB Client": "Homeowners", "Category": "Cat" }). Each fact carries its fields and the source cell (sheet, A1, and the embedded file when it came from one), so every number can be cited.`,
5273
+ 'USE WHEN: answering a question about figures ("total incurred for accident year 2019", "paid loss by line of business"). Read talonic_submissions_matrix first to pick metric and year. Do not add up facts across lines of business or categories without checking for a Total row: a total and its parts are both facts.',
5274
+ "NOT FOR: every fact of a submission (talonic_submissions_export).",
5275
+ "",
5276
+ "ARGS: `document_id`, `spec_id`, `metric`, `year`, `fields`, `limit` (1\u20131000, default 200), `offset`.",
5277
+ "RETURNS: { total, facts[] { metric, figure, year, fields, source { sheet, a1, embedded }, derived, total } }."
5278
+ ].join("\n");
5279
+ var factsInputSchema = {
5280
+ document_id: z.string().uuid().describe("Submission (workbook document) id."),
5281
+ spec_id: specId,
5282
+ metric: z.string().max(200).optional().describe("Metric name exactly as talonic_submissions_matrix lists it."),
5283
+ year: z.string().regex(/^((19|20)\d{2})?$/).optional().describe("Four-digit year, or '' for facts with no period."),
5284
+ fields: z.record(z.string(), z.string()).optional().describe("Field values every fact must carry."),
5285
+ limit: z.number().int().min(1).max(1e3).optional(),
5286
+ offset: z.number().int().min(0).optional()
5287
+ };
5288
+ function handleFacts(getToken, baseUrl, args) {
5289
+ const { document_id, fields, ...rest } = args;
5290
+ return runTool(
5291
+ () => apiJson(getToken, baseUrl, "GET", `/v1/submissions/${encodeURIComponent(document_id)}/facts`, {
5292
+ params: { ...rest, ...fields ? { fields: JSON.stringify(fields) } : {} }
5293
+ })
5294
+ );
5295
+ }
5296
+ var CHECKS_DESCRIPTION = [
5297
+ "What does not add up in one submission: totals that are not the sum of their rows, cumulative paid amounts that fall, and the target structure's identities (e.g. Total Incurred = Paid Loss + Paid LAE + Outstanding Loss). Each with the cell, the actual and the expected figure.",
5298
+ "USE WHEN: reviewing a submission's quality, or before quoting a figure that a finding concerns.",
5299
+ "NOT FOR: counts across submissions (talonic_submissions_list).",
5300
+ "",
5301
+ "ARGS: `document_id`, `spec_id` (optional; identities need it).",
5302
+ "RETURNS: [{ kind, severity, sheet, a1, embedded, expected, actual, parts[], check }]."
5303
+ ].join("\n");
5304
+ var checksInputSchema = {
5305
+ document_id: z.string().uuid().describe("Submission (workbook document) id."),
5306
+ spec_id: specId.optional()
5307
+ };
5308
+ function handleChecks(getToken, baseUrl, args) {
5309
+ return runTool(
5310
+ () => apiJson(
5311
+ getToken,
5312
+ baseUrl,
5313
+ "GET",
5314
+ `/v1/submissions/${encodeURIComponent(args.document_id)}/checks`,
5315
+ {
5316
+ params: args.spec_id ? { spec_id: args.spec_id } : {}
5317
+ }
5318
+ )
5319
+ );
5320
+ }
5246
5321
  function registerSubmissionsTools(server, getToken, baseUrl) {
5247
5322
  const tools = [
5248
5323
  [
@@ -5285,6 +5360,30 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5285
5360
  readOnly6,
5286
5361
  (a) => handleCompleteness(getToken, baseUrl, a)
5287
5362
  ],
5363
+ [
5364
+ "talonic_submissions_matrix",
5365
+ "Submission facts by metric and year",
5366
+ MATRIX_DESCRIPTION,
5367
+ matrixInputSchema,
5368
+ readOnly6,
5369
+ (a) => handleMatrix(getToken, baseUrl, a)
5370
+ ],
5371
+ [
5372
+ "talonic_submissions_facts",
5373
+ "Submission figures",
5374
+ FACTS_DESCRIPTION,
5375
+ factsInputSchema,
5376
+ readOnly6,
5377
+ (a) => handleFacts(getToken, baseUrl, a)
5378
+ ],
5379
+ [
5380
+ "talonic_submissions_checks",
5381
+ "Submission checks",
5382
+ CHECKS_DESCRIPTION,
5383
+ checksInputSchema,
5384
+ readOnly6,
5385
+ (a) => handleChecks(getToken, baseUrl, a)
5386
+ ],
5288
5387
  [
5289
5388
  "talonic_submissions_export",
5290
5389
  "Export submission facts",
@@ -6837,7 +6936,7 @@ function registerAskTools(server, getToken, baseUrl) {
6837
6936
 
6838
6937
  // package.json
6839
6938
  var package_default = {
6840
- version: "0.1.90"};
6939
+ version: "0.1.91"};
6841
6940
 
6842
6941
  // src/version.ts
6843
6942
  var VERSION = package_default.version;