@talonic/mcp 0.1.94 → 0.1.95

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
@@ -3014,7 +3014,7 @@ async function growthGet(getToken, baseUrl, path, params) {
3014
3014
  if (res.status === 403) {
3015
3015
  return toolError(
3016
3016
  new Error(
3017
- "Talonic growth analytics require an active superadmin account. Sign in to the connector with your Talonic staff account (or use a superadmin-created API key)."
3017
+ "Talonic growth analytics require a superadmin or growth-reader account. Sign in to the connector with your Talonic staff account (or use an API key created by one)."
3018
3018
  )
3019
3019
  );
3020
3020
  }
@@ -3087,6 +3087,82 @@ var toolsUsageInput = {
3087
3087
  source: z.string().optional().describe("Restrict to an acquisition source (UTM value or referrer host)."),
3088
3088
  funnel_stage: z.enum(["attempted", "succeeded", "downloaded", "cta"]).optional().describe("Keep only tools with at least one event at this funnel stage.")
3089
3089
  };
3090
+ var pageArgs = {
3091
+ limit: z.number().int().min(1).max(500).optional().describe("Rows per page (default 100, max 500)."),
3092
+ offset: z.number().int().min(0).optional().describe("Rows to skip, for paging.")
3093
+ };
3094
+ var ATTRIBUTION_DESCRIPTION = [
3095
+ "Read where conversions come from: per landing page or per source, the page views, website conversions",
3096
+ "(total and per event, e.g. lead_submitted, demo_booked), signups and activated signups.",
3097
+ "",
3098
+ "USE WHEN: asked which landing pages or sources produce leads, demo bookings or signups.",
3099
+ "INTERNAL: Talonic growth data; other accounts are rejected by the platform.",
3100
+ "ARGS: range (optional: 7d | 30d | 90d, default 30d), by (optional: landing_page | source, default landing_page).",
3101
+ "RETURNS: { rangeDays, by, rows[] } with each row { key, page_views, conversions, by_event, signups, activated }. Page views are anonymous event counts, conversions and signups are people: three independent totals, not a per-visitor funnel. Signups without stored attribution fall under '(unknown)'."
3102
+ ].join("\n");
3103
+ var EVENTS_DESCRIPTION = [
3104
+ "List identified website conversions (any event the website sent with an email: lead forms, demo bookings, ...),",
3105
+ "newest first, with landing page, UTM tags, referrer and the event's own properties.",
3106
+ "",
3107
+ "USE WHEN: asked who converted, to check that a new website event arrives, or to inspect one person's conversions.",
3108
+ "INTERNAL: Talonic growth data, contains personal data (emails); other accounts are rejected by the platform.",
3109
+ "ARGS: all optional: range (7d | 30d | 90d, default all time), event (exact name), email, source (UTM source or referrer host), limit, offset.",
3110
+ "RETURNS: { events[], total, limit, offset }; hubspot_synced_at is null until the row reached HubSpot."
3111
+ ].join("\n");
3112
+ var SIGNUPS_DESCRIPTION = [
3113
+ "List platform signups, newest first: email, signup method, organisation, where they came from",
3114
+ "(acquisition + acquisition_origin: 'signup' = stored at signup, 'lead' = inherited from an earlier website conversion) and usage so far.",
3115
+ "",
3116
+ "USE WHEN: asked who signed up, from which source or landing page, or what a signup did afterwards.",
3117
+ "INTERNAL: Talonic growth data, contains personal data (emails); other accounts are rejected by the platform.",
3118
+ "ARGS: all optional: range (7d | 30d | 90d, default all time), limit, offset.",
3119
+ "RETURNS: { signups[], total, limit, offset }. private:true marks a personal (non-company) signup; documents and credits_used are per user for those only, company usage lives in talonic_growth_accounts."
3120
+ ].join("\n");
3121
+ var ACCOUNTS_DESCRIPTION = [
3122
+ "List usage per organisation, newest first: users, last login, documents (total and last 30 days),",
3123
+ "API calls and credits (last 30 days), plan, status, and where its first user came from.",
3124
+ "",
3125
+ "USE WHEN: asked how much an organisation uses Talonic, which accounts are active, or usage by acquisition source.",
3126
+ "INTERNAL: Talonic growth data; other accounts are rejected by the platform.",
3127
+ "ARGS: limit, offset (both optional).",
3128
+ "RETURNS: { accounts[], total, limit, offset }. Personal signups are not organisations; they are in talonic_growth_signups."
3129
+ ].join("\n");
3130
+ var page = (a) => ({ limit: a.limit?.toString(), offset: a.offset?.toString() });
3131
+ async function handleGrowthAttribution(getToken, baseUrl, args) {
3132
+ return growthGet(getToken, baseUrl, "attribution", { range: args.range, by: args.by });
3133
+ }
3134
+ async function handleGrowthEvents(getToken, baseUrl, args) {
3135
+ return growthGet(getToken, baseUrl, "events", {
3136
+ range: args.range,
3137
+ event: args.event,
3138
+ email: args.email,
3139
+ source: args.source,
3140
+ ...page(args)
3141
+ });
3142
+ }
3143
+ async function handleGrowthSignups(getToken, baseUrl, args) {
3144
+ return growthGet(getToken, baseUrl, "signups", { range: args.range, ...page(args) });
3145
+ }
3146
+ async function handleGrowthAccounts(getToken, baseUrl, args) {
3147
+ return growthGet(getToken, baseUrl, "accounts", page(args));
3148
+ }
3149
+ var SITE_EVENTS_DESCRIPTION = [
3150
+ "Count anonymous website events (page views, CTA clicks, and any custom event the website sends, e.g. a calculator",
3151
+ "interaction), grouped by one dimension.",
3152
+ "",
3153
+ "USE WHEN: asked which website events exist, how often a custom event fired, or how one splits by page, source or one of its own properties.",
3154
+ "INTERNAL: Talonic growth data; other accounts are rejected by the platform.",
3155
+ "ARGS: all optional: range (7d | 30d | 90d, default 30d), event (exact name), page (exact path), by (event | page | landing_page | source | country | device | prop:<key>, default event). prop:<key> groups by a property the website attached to the event.",
3156
+ "RETURNS: { rangeDays, by, rows[] } with each row { key, count, first_seen, last_seen }. Event counts, never visitors: anonymous events carry no visitor identity."
3157
+ ].join("\n");
3158
+ async function handleGrowthSiteEvents(getToken, baseUrl, args) {
3159
+ return growthGet(getToken, baseUrl, "site-events", {
3160
+ range: args.range,
3161
+ event: args.event,
3162
+ page: args.page,
3163
+ by: args.by
3164
+ });
3165
+ }
3090
3166
  async function handleGrowthFunnel(getToken, baseUrl, args) {
3091
3167
  return growthGet(getToken, baseUrl, "funnel", { range: args.range });
3092
3168
  }
@@ -3153,6 +3229,75 @@ function registerGrowthTools(server, getToken, baseUrl) {
3153
3229
  },
3154
3230
  async (args) => handleGrowthToolsUsage(getToken, baseUrl, args)
3155
3231
  );
3232
+ server.registerTool(
3233
+ "talonic_growth_attribution",
3234
+ {
3235
+ title: "Growth: Attribution",
3236
+ description: ATTRIBUTION_DESCRIPTION,
3237
+ inputSchema: {
3238
+ range: rangeArg,
3239
+ by: z.enum(["landing_page", "source"]).optional().describe("Group by (default landing_page).")
3240
+ },
3241
+ annotations: { title: "Growth: Attribution", ...READ_ONLY }
3242
+ },
3243
+ async (args) => handleGrowthAttribution(getToken, baseUrl, args)
3244
+ );
3245
+ server.registerTool(
3246
+ "talonic_growth_events",
3247
+ {
3248
+ title: "Growth: Website Conversions",
3249
+ description: EVENTS_DESCRIPTION,
3250
+ inputSchema: {
3251
+ range: z.enum(RANGES).optional().describe("Trailing window (default all time)."),
3252
+ event: z.string().optional().describe("Exact event name, e.g. 'lead_submitted'."),
3253
+ email: z.string().optional().describe("One person's conversions."),
3254
+ source: z.string().optional().describe("UTM source or referrer host."),
3255
+ ...pageArgs
3256
+ },
3257
+ annotations: { title: "Growth: Website Conversions", ...READ_ONLY }
3258
+ },
3259
+ async (args) => handleGrowthEvents(getToken, baseUrl, args)
3260
+ );
3261
+ server.registerTool(
3262
+ "talonic_growth_signups",
3263
+ {
3264
+ title: "Growth: Signups",
3265
+ description: SIGNUPS_DESCRIPTION,
3266
+ inputSchema: {
3267
+ range: z.enum(RANGES).optional().describe("Trailing window (default all time)."),
3268
+ ...pageArgs
3269
+ },
3270
+ annotations: { title: "Growth: Signups", ...READ_ONLY }
3271
+ },
3272
+ async (args) => handleGrowthSignups(getToken, baseUrl, args)
3273
+ );
3274
+ server.registerTool(
3275
+ "talonic_growth_accounts",
3276
+ {
3277
+ title: "Growth: Account Usage",
3278
+ description: ACCOUNTS_DESCRIPTION,
3279
+ inputSchema: pageArgs,
3280
+ annotations: { title: "Growth: Account Usage", ...READ_ONLY }
3281
+ },
3282
+ async (args) => handleGrowthAccounts(getToken, baseUrl, args)
3283
+ );
3284
+ server.registerTool(
3285
+ "talonic_growth_site_events",
3286
+ {
3287
+ title: "Growth: Anonymous Website Events",
3288
+ description: SITE_EVENTS_DESCRIPTION,
3289
+ inputSchema: {
3290
+ range: rangeArg,
3291
+ event: z.string().optional().describe("Exact event name, e.g. 'page_cta_clicked'."),
3292
+ page: z.string().optional().describe("Exact page path, e.g. '/pricing'."),
3293
+ by: z.string().optional().describe(
3294
+ "Group by: event | page | landing_page | source | country | device | prop:<key> (default event)."
3295
+ )
3296
+ },
3297
+ annotations: { title: "Growth: Anonymous Website Events", ...READ_ONLY }
3298
+ },
3299
+ async (args) => handleGrowthSiteEvents(getToken, baseUrl, args)
3300
+ );
3156
3301
  }
3157
3302
  var contractIdArg = z.string().uuid().describe("Contract id (from talonic_contracts_register or talonic_contracts_issues).");
3158
3303
  var rowIdArg = z.string().uuid().describe(
@@ -5182,7 +5327,86 @@ var readOnly5 = {
5182
5327
  idempotentHint: true,
5183
5328
  openWorldHint: false
5184
5329
  };
5185
- var write5 = (idempotent, destructive = false) => ({
5330
+ var write5 = {
5331
+ readOnlyHint: false,
5332
+ destructiveHint: false,
5333
+ idempotentHint: true,
5334
+ openWorldHint: false
5335
+ };
5336
+ async function probePortfolioAccess(token, baseUrl) {
5337
+ try {
5338
+ const res = await fetch(buildUrl(baseUrl, "/v1/portfolio"), {
5339
+ headers: { Authorization: `Bearer ${token}`, Accept: "application/json" },
5340
+ signal: AbortSignal.timeout(5e3)
5341
+ });
5342
+ return res.ok;
5343
+ } catch {
5344
+ return false;
5345
+ }
5346
+ }
5347
+ var COMPANIES_DESCRIPTION = "List the portfolio companies (accounts) with how many of their documents were read for KPIs and how many conflicts each has. Start here; use the account_id with talonic_portfolio_company.";
5348
+ var COMPANY_DESCRIPTION = "One portfolio company's KPI table: rows are KPIs (cARR, ARR, revenue, gross margin, EBITDA, net burn, cash, runway, headcount, customers), columns are periods (newest first). Each cell carries the value shown, its basis (actual, restated, draft), the source document with page or sheet locator and a verbatim quote, and every other document's differing value. Cite the source filename and locator when you report a number.";
5349
+ var CONFLICTS_DESCRIPTION = "Every conflict across all portfolio companies: the same KPI for the same period reported with different values by different documents. Each conflict lists the distinct values, the documents stating each (filename, locator, quote) and a one-line explanation (restatement, draft vs final, or unexplained: ask the company). Use this for 'where does my portfolio contradict itself'.";
5350
+ var REFRESH_DESCRIPTION = "Read new or changed documents for KPIs (runs in the background, takes minutes, uses credits). Call only when the user asks to include new documents; then poll talonic_portfolio_companies until documents_read catches up.";
5351
+ function registerPortfolioTools(server, getToken, baseUrl) {
5352
+ const tools = [
5353
+ [
5354
+ "talonic_portfolio_companies",
5355
+ "Portfolio companies",
5356
+ COMPANIES_DESCRIPTION,
5357
+ {},
5358
+ readOnly5,
5359
+ () => runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/portfolio"))
5360
+ ],
5361
+ [
5362
+ "talonic_portfolio_company",
5363
+ "Portfolio company KPI table",
5364
+ COMPANY_DESCRIPTION,
5365
+ {
5366
+ account_id: z.string().uuid().describe("The company's account_id from talonic_portfolio_companies")
5367
+ },
5368
+ readOnly5,
5369
+ (a) => runTool(
5370
+ () => apiJson(
5371
+ getToken,
5372
+ baseUrl,
5373
+ "GET",
5374
+ `/v1/portfolio/companies/${encodeURIComponent(a.account_id)}`
5375
+ )
5376
+ )
5377
+ ],
5378
+ [
5379
+ "talonic_portfolio_conflicts",
5380
+ "Portfolio conflicts",
5381
+ CONFLICTS_DESCRIPTION,
5382
+ {},
5383
+ readOnly5,
5384
+ () => runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/portfolio/conflicts"))
5385
+ ],
5386
+ [
5387
+ "talonic_portfolio_refresh",
5388
+ "Read new portfolio documents",
5389
+ REFRESH_DESCRIPTION,
5390
+ {},
5391
+ write5,
5392
+ () => runTool(() => apiJson(getToken, baseUrl, "POST", "/v1/portfolio/refresh"))
5393
+ ]
5394
+ ];
5395
+ for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
5396
+ server.registerTool(
5397
+ name,
5398
+ { title, description, inputSchema: inputSchema11, annotations: { title, ...annotations } },
5399
+ async (args) => handler(args)
5400
+ );
5401
+ }
5402
+ }
5403
+ var readOnly6 = {
5404
+ readOnlyHint: true,
5405
+ destructiveHint: false,
5406
+ idempotentHint: true,
5407
+ openWorldHint: false
5408
+ };
5409
+ var write6 = (idempotent, destructive = false) => ({
5186
5410
  readOnlyHint: false,
5187
5411
  destructiveHint: destructive,
5188
5412
  idempotentHint: idempotent,
@@ -5349,7 +5573,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5349
5573
  "Read the Master Records configuration",
5350
5574
  CONFIG_DESCRIPTION2,
5351
5575
  {},
5352
- readOnly5,
5576
+ readOnly6,
5353
5577
  () => handleConfig2(getToken, baseUrl)
5354
5578
  ],
5355
5579
  [
@@ -5357,7 +5581,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5357
5581
  "Save the Master Records configuration",
5358
5582
  SAVE_CONFIG_DESCRIPTION2,
5359
5583
  saveConfigInputSchema2,
5360
- write5(true, true),
5584
+ write6(true, true),
5361
5585
  (a) => handleSaveConfig2(getToken, baseUrl, a)
5362
5586
  ],
5363
5587
  [
@@ -5365,7 +5589,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5365
5589
  "Resolve master records",
5366
5590
  RUN_DESCRIPTION,
5367
5591
  runInputSchema,
5368
- write5(true),
5592
+ write6(true),
5369
5593
  (a) => handleRun(getToken, baseUrl, a)
5370
5594
  ],
5371
5595
  [
@@ -5373,7 +5597,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5373
5597
  "Master records overview",
5374
5598
  OVERVIEW_DESCRIPTION2,
5375
5599
  overviewInputSchema,
5376
- readOnly5,
5600
+ readOnly6,
5377
5601
  (a) => handleOverview2(getToken, baseUrl, a)
5378
5602
  ],
5379
5603
  [
@@ -5381,7 +5605,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5381
5605
  "One golden record",
5382
5606
  RECORD_DESCRIPTION,
5383
5607
  recordInputSchema,
5384
- readOnly5,
5608
+ readOnly6,
5385
5609
  (a) => handleGetRecord(getToken, baseUrl, a)
5386
5610
  ],
5387
5611
  [
@@ -5389,7 +5613,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5389
5613
  "Accept or split a golden record",
5390
5614
  DECIDE_DESCRIPTION2,
5391
5615
  decideInputSchema2,
5392
- write5(true),
5616
+ write6(true),
5393
5617
  (a) => handleDecide2(getToken, baseUrl, a)
5394
5618
  ],
5395
5619
  [
@@ -5397,7 +5621,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5397
5621
  "Master data changes checked against documents",
5398
5622
  CHANGES_DESCRIPTION,
5399
5623
  changesInputSchema,
5400
- readOnly5,
5624
+ readOnly6,
5401
5625
  (a) => handleChanges(getToken, baseUrl, a)
5402
5626
  ],
5403
5627
  [
@@ -5405,7 +5629,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5405
5629
  "Source id to golden record crosswalk",
5406
5630
  CROSSWALK_DESCRIPTION,
5407
5631
  crosswalkInputSchema,
5408
- readOnly5,
5632
+ readOnly6,
5409
5633
  (a) => handleCrosswalk(getToken, baseUrl, a)
5410
5634
  ]
5411
5635
  ];
@@ -5417,13 +5641,13 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5417
5641
  );
5418
5642
  }
5419
5643
  }
5420
- var readOnly6 = {
5644
+ var readOnly7 = {
5421
5645
  readOnlyHint: true,
5422
5646
  destructiveHint: false,
5423
5647
  idempotentHint: true,
5424
5648
  openWorldHint: false
5425
5649
  };
5426
- var write6 = (idempotent, destructive = false) => ({
5650
+ var write7 = (idempotent, destructive = false) => ({
5427
5651
  readOnlyHint: false,
5428
5652
  destructiveHint: destructive,
5429
5653
  idempotentHint: idempotent,
@@ -5678,7 +5902,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5678
5902
  "Submission target structures",
5679
5903
  SPECS_DESCRIPTION,
5680
5904
  {},
5681
- readOnly6,
5905
+ readOnly7,
5682
5906
  () => handleSpecs(getToken, baseUrl)
5683
5907
  ],
5684
5908
  [
@@ -5686,7 +5910,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5686
5910
  "Submissions inbox",
5687
5911
  LIST_DESCRIPTION2,
5688
5912
  listInputSchema,
5689
- readOnly6,
5913
+ readOnly7,
5690
5914
  (a) => handleList(getToken, baseUrl, a)
5691
5915
  ],
5692
5916
  [
@@ -5694,7 +5918,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5694
5918
  "Submissions worklist",
5695
5919
  ISSUES_DESCRIPTION5,
5696
5920
  issuesInputSchema3,
5697
- readOnly6,
5921
+ readOnly7,
5698
5922
  (a) => handleIssues5(getToken, baseUrl, a)
5699
5923
  ],
5700
5924
  [
@@ -5702,7 +5926,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5702
5926
  "Capture and map submissions",
5703
5927
  PROCESS_DESCRIPTION2,
5704
5928
  processInputSchema2,
5705
- write6(true),
5929
+ write7(true),
5706
5930
  (a) => handleProcess2(getToken, baseUrl, a)
5707
5931
  ],
5708
5932
  [
@@ -5710,7 +5934,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5710
5934
  "Submission completeness",
5711
5935
  COMPLETENESS_DESCRIPTION,
5712
5936
  completenessInputSchema,
5713
- readOnly6,
5937
+ readOnly7,
5714
5938
  (a) => handleCompleteness(getToken, baseUrl, a)
5715
5939
  ],
5716
5940
  [
@@ -5718,7 +5942,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5718
5942
  "Submission facts by metric and year",
5719
5943
  MATRIX_DESCRIPTION,
5720
5944
  matrixInputSchema,
5721
- readOnly6,
5945
+ readOnly7,
5722
5946
  (a) => handleMatrix(getToken, baseUrl, a)
5723
5947
  ],
5724
5948
  [
@@ -5726,7 +5950,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5726
5950
  "Submission figures",
5727
5951
  FACTS_DESCRIPTION,
5728
5952
  factsInputSchema,
5729
- readOnly6,
5953
+ readOnly7,
5730
5954
  (a) => handleFacts(getToken, baseUrl, a)
5731
5955
  ],
5732
5956
  [
@@ -5734,7 +5958,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5734
5958
  "Submission checks",
5735
5959
  CHECKS_DESCRIPTION,
5736
5960
  checksInputSchema,
5737
- readOnly6,
5961
+ readOnly7,
5738
5962
  (a) => handleChecks(getToken, baseUrl, a)
5739
5963
  ],
5740
5964
  [
@@ -5742,7 +5966,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5742
5966
  "Review label mappings",
5743
5967
  REVIEW_DESCRIPTION,
5744
5968
  reviewInputSchema,
5745
- write6(true),
5969
+ write7(true),
5746
5970
  (a) => handleReview(getToken, baseUrl, a)
5747
5971
  ],
5748
5972
  [
@@ -5750,7 +5974,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5750
5974
  "Questions for the client's experts",
5751
5975
  QUESTIONS_DESCRIPTION,
5752
5976
  questionsInputSchema,
5753
- write6(true),
5977
+ write7(true),
5754
5978
  (a) => handleQuestions(getToken, baseUrl, a)
5755
5979
  ],
5756
5980
  [
@@ -5758,7 +5982,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5758
5982
  "Export submission facts",
5759
5983
  EXPORT_DESCRIPTION,
5760
5984
  exportInputSchema,
5761
- readOnly6,
5985
+ readOnly7,
5762
5986
  (a) => handleExport(getToken, baseUrl, a)
5763
5987
  ]
5764
5988
  ];
@@ -5775,7 +5999,7 @@ var INDEX_PERIOD_RE = /^\d{4}(-\d{2}|-Q[1-4]|-H[12])?$/;
5775
5999
  var modelIdArg = z.string().uuid().describe("Price model id (from talonic_price_baseline_models).");
5776
6000
  var fromArg = z.string().regex(MONTH_RE).describe("First month of the evaluation window, `YYYY-MM`.");
5777
6001
  var toArg = z.string().regex(MONTH_RE).describe("Last month of the evaluation window, `YYYY-MM`.");
5778
- var readOnly7 = {
6002
+ var readOnly8 = {
5779
6003
  readOnlyHint: true,
5780
6004
  destructiveHint: false,
5781
6005
  idempotentHint: true,
@@ -6034,7 +6258,7 @@ function handleIndices(getToken, baseUrl, args) {
6034
6258
  }
6035
6259
  return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/price-baseline/indices"));
6036
6260
  }
6037
- var REFRESH_DESCRIPTION = [
6261
+ var REFRESH_DESCRIPTION2 = [
6038
6262
  "Fetch index values from their publishers: BEHG CO2 price (\xA710 law text), Bundesbank VPI and Erzeugerpreise, Destatis GENESIS tables (needs the platform's GENESIS token).",
6039
6263
  "USE WHEN: talonic_price_baseline_prices reports a missing public index for a specific year range (backfill).",
6040
6264
  "NOT FOR: routine sync of every due series (talonic_price_baseline_sync_series); THE levies or grid tariffs, which have no free feed (talonic_price_baseline_add_index_values).",
@@ -6386,7 +6610,7 @@ async function probePriceBaselineAccess(token, baseUrl) {
6386
6610
  }
6387
6611
  }
6388
6612
  function registerPriceBaselineTools(server, getToken, baseUrl) {
6389
- const write7 = (idempotent) => ({
6613
+ const write8 = (idempotent) => ({
6390
6614
  readOnlyHint: false,
6391
6615
  destructiveHint: false,
6392
6616
  idempotentHint: idempotent,
@@ -6398,7 +6622,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6398
6622
  title: "Find contracts and invoices",
6399
6623
  description: DOCUMENTS_DESCRIPTION,
6400
6624
  inputSchema: documentsInputSchema,
6401
- annotations: readOnly7
6625
+ annotations: readOnly8
6402
6626
  },
6403
6627
  async (args) => handleDocuments(getToken, baseUrl, args)
6404
6628
  );
@@ -6408,7 +6632,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6408
6632
  title: "Build or enrich a price model from a contract",
6409
6633
  description: EXTRACT_DESCRIPTION,
6410
6634
  inputSchema: extractInputSchema,
6411
- annotations: write7(false)
6635
+ annotations: write8(false)
6412
6636
  },
6413
6637
  async (args) => handleExtract2(getToken, baseUrl, args)
6414
6638
  );
@@ -6418,7 +6642,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6418
6642
  title: "List or read price models",
6419
6643
  description: MODELS_DESCRIPTION,
6420
6644
  inputSchema: modelsInputSchema,
6421
- annotations: readOnly7
6645
+ annotations: readOnly8
6422
6646
  },
6423
6647
  async (args) => handleModels(getToken, baseUrl, args)
6424
6648
  );
@@ -6428,7 +6652,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6428
6652
  title: "Edit or confirm a price model",
6429
6653
  description: UPDATE_DESCRIPTION,
6430
6654
  inputSchema: updateInputSchema,
6431
- annotations: write7(true)
6655
+ annotations: write8(true)
6432
6656
  },
6433
6657
  async (args) => handleUpdate(getToken, baseUrl, args)
6434
6658
  );
@@ -6438,7 +6662,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6438
6662
  title: "Recompute contract prices",
6439
6663
  description: PRICES_DESCRIPTION,
6440
6664
  inputSchema: pricesInputSchema,
6441
- annotations: readOnly7
6665
+ annotations: readOnly8
6442
6666
  },
6443
6667
  async (args) => handlePrices(getToken, baseUrl, args)
6444
6668
  );
@@ -6448,7 +6672,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6448
6672
  title: "Download the price baseline workbook",
6449
6673
  description: WORKBOOK_DESCRIPTION,
6450
6674
  inputSchema: workbookInputSchema,
6451
- annotations: readOnly7
6675
+ annotations: readOnly8
6452
6676
  },
6453
6677
  async (args) => handleWorkbook(getToken, baseUrl, args)
6454
6678
  );
@@ -6458,7 +6682,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6458
6682
  title: "Check an invoice against the contract",
6459
6683
  description: COMPARE_DESCRIPTION,
6460
6684
  inputSchema: compareInputSchema,
6461
- annotations: write7(false)
6685
+ annotations: write8(false)
6462
6686
  },
6463
6687
  async (args) => handleCompare(getToken, baseUrl, args)
6464
6688
  );
@@ -6468,7 +6692,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6468
6692
  title: "Audit-proof invoice",
6469
6693
  description: PROOF_INVOICE_DESCRIPTION,
6470
6694
  inputSchema: proofInvoiceInputSchema,
6471
- annotations: readOnly7
6695
+ annotations: readOnly8
6472
6696
  },
6473
6697
  async (args) => handleProofInvoice(getToken, baseUrl, args)
6474
6698
  );
@@ -6478,7 +6702,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6478
6702
  title: "Index catalog and values",
6479
6703
  description: INDICES_DESCRIPTION,
6480
6704
  inputSchema: indicesInputSchema,
6481
- annotations: readOnly7
6705
+ annotations: readOnly8
6482
6706
  },
6483
6707
  async (args) => handleIndices(getToken, baseUrl, args)
6484
6708
  );
@@ -6486,9 +6710,9 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6486
6710
  "talonic_price_baseline_refresh_indices",
6487
6711
  {
6488
6712
  title: "Fetch public index values",
6489
- description: REFRESH_DESCRIPTION,
6713
+ description: REFRESH_DESCRIPTION2,
6490
6714
  inputSchema: refreshInputSchema,
6491
- annotations: { ...write7(true), openWorldHint: true }
6715
+ annotations: { ...write8(true), openWorldHint: true }
6492
6716
  },
6493
6717
  async (args) => handleRefresh(getToken, baseUrl, args)
6494
6718
  );
@@ -6498,7 +6722,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6498
6722
  title: "Enter sourced index values",
6499
6723
  description: MANUAL_DESCRIPTION,
6500
6724
  inputSchema: manualInputSchema,
6501
- annotations: write7(true)
6725
+ annotations: write8(true)
6502
6726
  },
6503
6727
  async (args) => handleManual(getToken, baseUrl, args)
6504
6728
  );
@@ -6508,7 +6732,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6508
6732
  title: "Contract register and expected invoices",
6509
6733
  description: REGISTER_DESCRIPTION2,
6510
6734
  inputSchema: registerInputSchema2,
6511
- annotations: readOnly7
6735
+ annotations: readOnly8
6512
6736
  },
6513
6737
  async (args) => handleRegister2(getToken, baseUrl, args)
6514
6738
  );
@@ -6518,7 +6742,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6518
6742
  title: "Contract workbook and open inputs",
6519
6743
  description: CONTRACT_DESCRIPTION3,
6520
6744
  inputSchema: contractInputSchema3,
6521
- annotations: readOnly7
6745
+ annotations: readOnly8
6522
6746
  },
6523
6747
  async (args) => handleContract3(getToken, baseUrl, args)
6524
6748
  );
@@ -6528,7 +6752,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6528
6752
  title: "Answer an open contract input",
6529
6753
  description: ANSWER_DESCRIPTION,
6530
6754
  inputSchema: answerInputSchema,
6531
- annotations: write7(true)
6755
+ annotations: write8(true)
6532
6756
  },
6533
6757
  async (args) => handleAnswer(getToken, baseUrl, args)
6534
6758
  );
@@ -6538,7 +6762,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6538
6762
  title: "List assumptions",
6539
6763
  description: ASSUMPTIONS_DESCRIPTION,
6540
6764
  inputSchema: assumptionsInputSchema,
6541
- annotations: readOnly7
6765
+ annotations: readOnly8
6542
6766
  },
6543
6767
  async (args) => handleAssumptions(getToken, baseUrl, args)
6544
6768
  );
@@ -6548,7 +6772,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6548
6772
  title: "Make, replace or withdraw an assumption",
6549
6773
  description: ASSUME_DESCRIPTION,
6550
6774
  inputSchema: assumeInputSchema,
6551
- annotations: { ...write7(false), destructiveHint: true }
6775
+ annotations: { ...write8(false), destructiveHint: true }
6552
6776
  },
6553
6777
  async (args) => handleAssume(getToken, baseUrl, args)
6554
6778
  );
@@ -6558,7 +6782,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6558
6782
  title: "Sync external price data",
6559
6783
  description: SYNC_DESCRIPTION,
6560
6784
  inputSchema: syncInputSchema,
6561
- annotations: { ...write7(true), openWorldHint: true }
6785
+ annotations: { ...write8(true), openWorldHint: true }
6562
6786
  },
6563
6787
  async (args) => handleSync(getToken, baseUrl, args)
6564
6788
  );
@@ -6568,7 +6792,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6568
6792
  title: "Import candidates and status",
6569
6793
  description: IMPORTS_DESCRIPTION,
6570
6794
  inputSchema: importsInputSchema,
6571
- annotations: readOnly7
6795
+ annotations: readOnly8
6572
6796
  },
6573
6797
  async (args) => handleImports(getToken, baseUrl, args)
6574
6798
  );
@@ -6578,7 +6802,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6578
6802
  title: "Import contracts from data capture",
6579
6803
  description: IMPORT_DESCRIPTION2,
6580
6804
  inputSchema: importInputSchema2,
6581
- annotations: write7(true)
6805
+ annotations: write8(true)
6582
6806
  },
6583
6807
  async (args) => handleImport2(getToken, baseUrl, args)
6584
6808
  );
@@ -7422,14 +7646,14 @@ async function handleFieldValues(getToken, baseUrl, args) {
7422
7646
  limit: args.limit,
7423
7647
  cursor: args.cursor
7424
7648
  };
7425
- const page = await apiJson(
7649
+ const page2 = await apiJson(
7426
7650
  getToken,
7427
7651
  baseUrl,
7428
7652
  "GET",
7429
7653
  `/v1/fields/${id}/values`,
7430
7654
  { params }
7431
7655
  );
7432
- return resolution ? { ...page, resolution } : page;
7656
+ return resolution ? { ...page2, resolution } : page2;
7433
7657
  });
7434
7658
  }
7435
7659
  function registerFieldTools(server, getToken, baseUrl) {
@@ -8133,7 +8357,7 @@ function registerAskTools(server, getToken, baseUrl) {
8133
8357
 
8134
8358
  // package.json
8135
8359
  var package_default = {
8136
- version: "0.1.94"};
8360
+ version: "0.1.95"};
8137
8361
 
8138
8362
  // src/version.ts
8139
8363
  var VERSION = package_default.version;
@@ -8301,6 +8525,9 @@ function createServer(options) {
8301
8525
  if (options.includePartiesTools) {
8302
8526
  registerPartiesTools(server, rawToken, baseUrl);
8303
8527
  }
8528
+ if (options.includePortfolioTools) {
8529
+ registerPortfolioTools(server, rawToken, baseUrl);
8530
+ }
8304
8531
  if (options.includeMasterRecordsTools) {
8305
8532
  registerMasterRecordsTools(server, rawToken, baseUrl);
8306
8533
  }
@@ -8371,7 +8598,8 @@ async function main(argv = process.argv.slice(2), env = process.env, out = (line
8371
8598
  includePartiesTools,
8372
8599
  includeMasterRecordsTools,
8373
8600
  includeSubmissionsTools,
8374
- includePriceBaselineTools
8601
+ includePriceBaselineTools,
8602
+ includePortfolioTools
8375
8603
  ] = await Promise.all([
8376
8604
  probeGrowthAccess(apiKey, baseUrl),
8377
8605
  probeAgentTaskAdminAccess(apiKey, baseUrl),
@@ -8381,7 +8609,8 @@ async function main(argv = process.argv.slice(2), env = process.env, out = (line
8381
8609
  probePartiesAccess(apiKey, baseUrl),
8382
8610
  probeMasterRecordsAccess(apiKey, baseUrl),
8383
8611
  probeSubmissionsAccess(apiKey, baseUrl),
8384
- probePriceBaselineAccess(apiKey, baseUrl)
8612
+ probePriceBaselineAccess(apiKey, baseUrl),
8613
+ probePortfolioAccess(apiKey, baseUrl)
8385
8614
  ]);
8386
8615
  const server = createServer({
8387
8616
  apiKey,
@@ -8394,7 +8623,8 @@ async function main(argv = process.argv.slice(2), env = process.env, out = (line
8394
8623
  includePartiesTools,
8395
8624
  includeMasterRecordsTools,
8396
8625
  includeSubmissionsTools,
8397
- includePriceBaselineTools
8626
+ includePriceBaselineTools,
8627
+ includePortfolioTools
8398
8628
  });
8399
8629
  const transport = new StdioServerTransport();
8400
8630
  await server.connect(transport);