@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/index.d.ts CHANGED
@@ -77,6 +77,11 @@ 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_portfolio_*` tools. Callers set this only after
82
+ * `probePortfolioAccess` passed (the workspace has the Portfolio app).
83
+ */
84
+ includePortfolioTools?: boolean;
80
85
  /**
81
86
  * Register the `talonic_master_records_*` tools. Callers set this only after
82
87
  * `probeMasterRecordsAccess` passed, so a deployment without the Master
package/dist/index.js CHANGED
@@ -3011,7 +3011,7 @@ async function growthGet(getToken, baseUrl, path, params) {
3011
3011
  if (res.status === 403) {
3012
3012
  return toolError(
3013
3013
  new Error(
3014
- "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)."
3014
+ "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)."
3015
3015
  )
3016
3016
  );
3017
3017
  }
@@ -3073,6 +3073,82 @@ var toolsUsageInput = {
3073
3073
  source: z.string().optional().describe("Restrict to an acquisition source (UTM value or referrer host)."),
3074
3074
  funnel_stage: z.enum(["attempted", "succeeded", "downloaded", "cta"]).optional().describe("Keep only tools with at least one event at this funnel stage.")
3075
3075
  };
3076
+ var pageArgs = {
3077
+ limit: z.number().int().min(1).max(500).optional().describe("Rows per page (default 100, max 500)."),
3078
+ offset: z.number().int().min(0).optional().describe("Rows to skip, for paging.")
3079
+ };
3080
+ var ATTRIBUTION_DESCRIPTION = [
3081
+ "Read where conversions come from: per landing page or per source, the page views, website conversions",
3082
+ "(total and per event, e.g. lead_submitted, demo_booked), signups and activated signups.",
3083
+ "",
3084
+ "USE WHEN: asked which landing pages or sources produce leads, demo bookings or signups.",
3085
+ "INTERNAL: Talonic growth data; other accounts are rejected by the platform.",
3086
+ "ARGS: range (optional: 7d | 30d | 90d, default 30d), by (optional: landing_page | source, default landing_page).",
3087
+ "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)'."
3088
+ ].join("\n");
3089
+ var EVENTS_DESCRIPTION = [
3090
+ "List identified website conversions (any event the website sent with an email: lead forms, demo bookings, ...),",
3091
+ "newest first, with landing page, UTM tags, referrer and the event's own properties.",
3092
+ "",
3093
+ "USE WHEN: asked who converted, to check that a new website event arrives, or to inspect one person's conversions.",
3094
+ "INTERNAL: Talonic growth data, contains personal data (emails); other accounts are rejected by the platform.",
3095
+ "ARGS: all optional: range (7d | 30d | 90d, default all time), event (exact name), email, source (UTM source or referrer host), limit, offset.",
3096
+ "RETURNS: { events[], total, limit, offset }; hubspot_synced_at is null until the row reached HubSpot."
3097
+ ].join("\n");
3098
+ var SIGNUPS_DESCRIPTION = [
3099
+ "List platform signups, newest first: email, signup method, organisation, where they came from",
3100
+ "(acquisition + acquisition_origin: 'signup' = stored at signup, 'lead' = inherited from an earlier website conversion) and usage so far.",
3101
+ "",
3102
+ "USE WHEN: asked who signed up, from which source or landing page, or what a signup did afterwards.",
3103
+ "INTERNAL: Talonic growth data, contains personal data (emails); other accounts are rejected by the platform.",
3104
+ "ARGS: all optional: range (7d | 30d | 90d, default all time), limit, offset.",
3105
+ "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."
3106
+ ].join("\n");
3107
+ var ACCOUNTS_DESCRIPTION = [
3108
+ "List usage per organisation, newest first: users, last login, documents (total and last 30 days),",
3109
+ "API calls and credits (last 30 days), plan, status, and where its first user came from.",
3110
+ "",
3111
+ "USE WHEN: asked how much an organisation uses Talonic, which accounts are active, or usage by acquisition source.",
3112
+ "INTERNAL: Talonic growth data; other accounts are rejected by the platform.",
3113
+ "ARGS: limit, offset (both optional).",
3114
+ "RETURNS: { accounts[], total, limit, offset }. Personal signups are not organisations; they are in talonic_growth_signups."
3115
+ ].join("\n");
3116
+ var page = (a) => ({ limit: a.limit?.toString(), offset: a.offset?.toString() });
3117
+ async function handleGrowthAttribution(getToken, baseUrl, args) {
3118
+ return growthGet(getToken, baseUrl, "attribution", { range: args.range, by: args.by });
3119
+ }
3120
+ async function handleGrowthEvents(getToken, baseUrl, args) {
3121
+ return growthGet(getToken, baseUrl, "events", {
3122
+ range: args.range,
3123
+ event: args.event,
3124
+ email: args.email,
3125
+ source: args.source,
3126
+ ...page(args)
3127
+ });
3128
+ }
3129
+ async function handleGrowthSignups(getToken, baseUrl, args) {
3130
+ return growthGet(getToken, baseUrl, "signups", { range: args.range, ...page(args) });
3131
+ }
3132
+ async function handleGrowthAccounts(getToken, baseUrl, args) {
3133
+ return growthGet(getToken, baseUrl, "accounts", page(args));
3134
+ }
3135
+ var SITE_EVENTS_DESCRIPTION = [
3136
+ "Count anonymous website events (page views, CTA clicks, and any custom event the website sends, e.g. a calculator",
3137
+ "interaction), grouped by one dimension.",
3138
+ "",
3139
+ "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.",
3140
+ "INTERNAL: Talonic growth data; other accounts are rejected by the platform.",
3141
+ "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.",
3142
+ "RETURNS: { rangeDays, by, rows[] } with each row { key, count, first_seen, last_seen }. Event counts, never visitors: anonymous events carry no visitor identity."
3143
+ ].join("\n");
3144
+ async function handleGrowthSiteEvents(getToken, baseUrl, args) {
3145
+ return growthGet(getToken, baseUrl, "site-events", {
3146
+ range: args.range,
3147
+ event: args.event,
3148
+ page: args.page,
3149
+ by: args.by
3150
+ });
3151
+ }
3076
3152
  async function handleGrowthFunnel(getToken, baseUrl, args) {
3077
3153
  return growthGet(getToken, baseUrl, "funnel", { range: args.range });
3078
3154
  }
@@ -3139,6 +3215,75 @@ function registerGrowthTools(server, getToken, baseUrl) {
3139
3215
  },
3140
3216
  async (args) => handleGrowthToolsUsage(getToken, baseUrl, args)
3141
3217
  );
3218
+ server.registerTool(
3219
+ "talonic_growth_attribution",
3220
+ {
3221
+ title: "Growth: Attribution",
3222
+ description: ATTRIBUTION_DESCRIPTION,
3223
+ inputSchema: {
3224
+ range: rangeArg,
3225
+ by: z.enum(["landing_page", "source"]).optional().describe("Group by (default landing_page).")
3226
+ },
3227
+ annotations: { title: "Growth: Attribution", ...READ_ONLY }
3228
+ },
3229
+ async (args) => handleGrowthAttribution(getToken, baseUrl, args)
3230
+ );
3231
+ server.registerTool(
3232
+ "talonic_growth_events",
3233
+ {
3234
+ title: "Growth: Website Conversions",
3235
+ description: EVENTS_DESCRIPTION,
3236
+ inputSchema: {
3237
+ range: z.enum(RANGES).optional().describe("Trailing window (default all time)."),
3238
+ event: z.string().optional().describe("Exact event name, e.g. 'lead_submitted'."),
3239
+ email: z.string().optional().describe("One person's conversions."),
3240
+ source: z.string().optional().describe("UTM source or referrer host."),
3241
+ ...pageArgs
3242
+ },
3243
+ annotations: { title: "Growth: Website Conversions", ...READ_ONLY }
3244
+ },
3245
+ async (args) => handleGrowthEvents(getToken, baseUrl, args)
3246
+ );
3247
+ server.registerTool(
3248
+ "talonic_growth_signups",
3249
+ {
3250
+ title: "Growth: Signups",
3251
+ description: SIGNUPS_DESCRIPTION,
3252
+ inputSchema: {
3253
+ range: z.enum(RANGES).optional().describe("Trailing window (default all time)."),
3254
+ ...pageArgs
3255
+ },
3256
+ annotations: { title: "Growth: Signups", ...READ_ONLY }
3257
+ },
3258
+ async (args) => handleGrowthSignups(getToken, baseUrl, args)
3259
+ );
3260
+ server.registerTool(
3261
+ "talonic_growth_accounts",
3262
+ {
3263
+ title: "Growth: Account Usage",
3264
+ description: ACCOUNTS_DESCRIPTION,
3265
+ inputSchema: pageArgs,
3266
+ annotations: { title: "Growth: Account Usage", ...READ_ONLY }
3267
+ },
3268
+ async (args) => handleGrowthAccounts(getToken, baseUrl, args)
3269
+ );
3270
+ server.registerTool(
3271
+ "talonic_growth_site_events",
3272
+ {
3273
+ title: "Growth: Anonymous Website Events",
3274
+ description: SITE_EVENTS_DESCRIPTION,
3275
+ inputSchema: {
3276
+ range: rangeArg,
3277
+ event: z.string().optional().describe("Exact event name, e.g. 'page_cta_clicked'."),
3278
+ page: z.string().optional().describe("Exact page path, e.g. '/pricing'."),
3279
+ by: z.string().optional().describe(
3280
+ "Group by: event | page | landing_page | source | country | device | prop:<key> (default event)."
3281
+ )
3282
+ },
3283
+ annotations: { title: "Growth: Anonymous Website Events", ...READ_ONLY }
3284
+ },
3285
+ async (args) => handleGrowthSiteEvents(getToken, baseUrl, args)
3286
+ );
3142
3287
  }
3143
3288
  var contractIdArg = z.string().uuid().describe("Contract id (from talonic_contracts_register or talonic_contracts_issues).");
3144
3289
  var rowIdArg = z.string().uuid().describe(
@@ -5124,7 +5269,75 @@ var readOnly5 = {
5124
5269
  idempotentHint: true,
5125
5270
  openWorldHint: false
5126
5271
  };
5127
- var write5 = (idempotent, destructive = false) => ({
5272
+ var write5 = {
5273
+ readOnlyHint: false,
5274
+ destructiveHint: false,
5275
+ idempotentHint: true,
5276
+ openWorldHint: false
5277
+ };
5278
+ 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.";
5279
+ 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.";
5280
+ 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'.";
5281
+ 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.";
5282
+ function registerPortfolioTools(server, getToken, baseUrl) {
5283
+ const tools = [
5284
+ [
5285
+ "talonic_portfolio_companies",
5286
+ "Portfolio companies",
5287
+ COMPANIES_DESCRIPTION,
5288
+ {},
5289
+ readOnly5,
5290
+ () => runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/portfolio"))
5291
+ ],
5292
+ [
5293
+ "talonic_portfolio_company",
5294
+ "Portfolio company KPI table",
5295
+ COMPANY_DESCRIPTION,
5296
+ {
5297
+ account_id: z.string().uuid().describe("The company's account_id from talonic_portfolio_companies")
5298
+ },
5299
+ readOnly5,
5300
+ (a) => runTool(
5301
+ () => apiJson(
5302
+ getToken,
5303
+ baseUrl,
5304
+ "GET",
5305
+ `/v1/portfolio/companies/${encodeURIComponent(a.account_id)}`
5306
+ )
5307
+ )
5308
+ ],
5309
+ [
5310
+ "talonic_portfolio_conflicts",
5311
+ "Portfolio conflicts",
5312
+ CONFLICTS_DESCRIPTION,
5313
+ {},
5314
+ readOnly5,
5315
+ () => runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/portfolio/conflicts"))
5316
+ ],
5317
+ [
5318
+ "talonic_portfolio_refresh",
5319
+ "Read new portfolio documents",
5320
+ REFRESH_DESCRIPTION,
5321
+ {},
5322
+ write5,
5323
+ () => runTool(() => apiJson(getToken, baseUrl, "POST", "/v1/portfolio/refresh"))
5324
+ ]
5325
+ ];
5326
+ for (const [name, title, description, inputSchema11, annotations, handler] of tools) {
5327
+ server.registerTool(
5328
+ name,
5329
+ { title, description, inputSchema: inputSchema11, annotations: { title, ...annotations } },
5330
+ async (args) => handler(args)
5331
+ );
5332
+ }
5333
+ }
5334
+ var readOnly6 = {
5335
+ readOnlyHint: true,
5336
+ destructiveHint: false,
5337
+ idempotentHint: true,
5338
+ openWorldHint: false
5339
+ };
5340
+ var write6 = (idempotent, destructive = false) => ({
5128
5341
  readOnlyHint: false,
5129
5342
  destructiveHint: destructive,
5130
5343
  idempotentHint: idempotent,
@@ -5280,7 +5493,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5280
5493
  "Read the Master Records configuration",
5281
5494
  CONFIG_DESCRIPTION2,
5282
5495
  {},
5283
- readOnly5,
5496
+ readOnly6,
5284
5497
  () => handleConfig2(getToken, baseUrl)
5285
5498
  ],
5286
5499
  [
@@ -5288,7 +5501,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5288
5501
  "Save the Master Records configuration",
5289
5502
  SAVE_CONFIG_DESCRIPTION2,
5290
5503
  saveConfigInputSchema2,
5291
- write5(true, true),
5504
+ write6(true, true),
5292
5505
  (a) => handleSaveConfig2(getToken, baseUrl, a)
5293
5506
  ],
5294
5507
  [
@@ -5296,7 +5509,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5296
5509
  "Resolve master records",
5297
5510
  RUN_DESCRIPTION,
5298
5511
  runInputSchema,
5299
- write5(true),
5512
+ write6(true),
5300
5513
  (a) => handleRun(getToken, baseUrl, a)
5301
5514
  ],
5302
5515
  [
@@ -5304,7 +5517,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5304
5517
  "Master records overview",
5305
5518
  OVERVIEW_DESCRIPTION2,
5306
5519
  overviewInputSchema,
5307
- readOnly5,
5520
+ readOnly6,
5308
5521
  (a) => handleOverview2(getToken, baseUrl, a)
5309
5522
  ],
5310
5523
  [
@@ -5312,7 +5525,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5312
5525
  "One golden record",
5313
5526
  RECORD_DESCRIPTION,
5314
5527
  recordInputSchema,
5315
- readOnly5,
5528
+ readOnly6,
5316
5529
  (a) => handleGetRecord(getToken, baseUrl, a)
5317
5530
  ],
5318
5531
  [
@@ -5320,7 +5533,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5320
5533
  "Accept or split a golden record",
5321
5534
  DECIDE_DESCRIPTION2,
5322
5535
  decideInputSchema2,
5323
- write5(true),
5536
+ write6(true),
5324
5537
  (a) => handleDecide2(getToken, baseUrl, a)
5325
5538
  ],
5326
5539
  [
@@ -5328,7 +5541,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5328
5541
  "Master data changes checked against documents",
5329
5542
  CHANGES_DESCRIPTION,
5330
5543
  changesInputSchema,
5331
- readOnly5,
5544
+ readOnly6,
5332
5545
  (a) => handleChanges(getToken, baseUrl, a)
5333
5546
  ],
5334
5547
  [
@@ -5336,7 +5549,7 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5336
5549
  "Source id to golden record crosswalk",
5337
5550
  CROSSWALK_DESCRIPTION,
5338
5551
  crosswalkInputSchema,
5339
- readOnly5,
5552
+ readOnly6,
5340
5553
  (a) => handleCrosswalk(getToken, baseUrl, a)
5341
5554
  ]
5342
5555
  ];
@@ -5348,13 +5561,13 @@ function registerMasterRecordsTools(server, getToken, baseUrl) {
5348
5561
  );
5349
5562
  }
5350
5563
  }
5351
- var readOnly6 = {
5564
+ var readOnly7 = {
5352
5565
  readOnlyHint: true,
5353
5566
  destructiveHint: false,
5354
5567
  idempotentHint: true,
5355
5568
  openWorldHint: false
5356
5569
  };
5357
- var write6 = (idempotent, destructive = false) => ({
5570
+ var write7 = (idempotent, destructive = false) => ({
5358
5571
  readOnlyHint: false,
5359
5572
  destructiveHint: destructive,
5360
5573
  idempotentHint: idempotent,
@@ -5598,7 +5811,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5598
5811
  "Submission target structures",
5599
5812
  SPECS_DESCRIPTION,
5600
5813
  {},
5601
- readOnly6,
5814
+ readOnly7,
5602
5815
  () => handleSpecs(getToken, baseUrl)
5603
5816
  ],
5604
5817
  [
@@ -5606,7 +5819,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5606
5819
  "Submissions inbox",
5607
5820
  LIST_DESCRIPTION2,
5608
5821
  listInputSchema,
5609
- readOnly6,
5822
+ readOnly7,
5610
5823
  (a) => handleList(getToken, baseUrl, a)
5611
5824
  ],
5612
5825
  [
@@ -5614,7 +5827,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5614
5827
  "Submissions worklist",
5615
5828
  ISSUES_DESCRIPTION5,
5616
5829
  issuesInputSchema3,
5617
- readOnly6,
5830
+ readOnly7,
5618
5831
  (a) => handleIssues5(getToken, baseUrl, a)
5619
5832
  ],
5620
5833
  [
@@ -5622,7 +5835,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5622
5835
  "Capture and map submissions",
5623
5836
  PROCESS_DESCRIPTION2,
5624
5837
  processInputSchema2,
5625
- write6(true),
5838
+ write7(true),
5626
5839
  (a) => handleProcess2(getToken, baseUrl, a)
5627
5840
  ],
5628
5841
  [
@@ -5630,7 +5843,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5630
5843
  "Submission completeness",
5631
5844
  COMPLETENESS_DESCRIPTION,
5632
5845
  completenessInputSchema,
5633
- readOnly6,
5846
+ readOnly7,
5634
5847
  (a) => handleCompleteness(getToken, baseUrl, a)
5635
5848
  ],
5636
5849
  [
@@ -5638,7 +5851,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5638
5851
  "Submission facts by metric and year",
5639
5852
  MATRIX_DESCRIPTION,
5640
5853
  matrixInputSchema,
5641
- readOnly6,
5854
+ readOnly7,
5642
5855
  (a) => handleMatrix(getToken, baseUrl, a)
5643
5856
  ],
5644
5857
  [
@@ -5646,7 +5859,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5646
5859
  "Submission figures",
5647
5860
  FACTS_DESCRIPTION,
5648
5861
  factsInputSchema,
5649
- readOnly6,
5862
+ readOnly7,
5650
5863
  (a) => handleFacts(getToken, baseUrl, a)
5651
5864
  ],
5652
5865
  [
@@ -5654,7 +5867,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5654
5867
  "Submission checks",
5655
5868
  CHECKS_DESCRIPTION,
5656
5869
  checksInputSchema,
5657
- readOnly6,
5870
+ readOnly7,
5658
5871
  (a) => handleChecks(getToken, baseUrl, a)
5659
5872
  ],
5660
5873
  [
@@ -5662,7 +5875,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5662
5875
  "Review label mappings",
5663
5876
  REVIEW_DESCRIPTION,
5664
5877
  reviewInputSchema,
5665
- write6(true),
5878
+ write7(true),
5666
5879
  (a) => handleReview(getToken, baseUrl, a)
5667
5880
  ],
5668
5881
  [
@@ -5670,7 +5883,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5670
5883
  "Questions for the client's experts",
5671
5884
  QUESTIONS_DESCRIPTION,
5672
5885
  questionsInputSchema,
5673
- write6(true),
5886
+ write7(true),
5674
5887
  (a) => handleQuestions(getToken, baseUrl, a)
5675
5888
  ],
5676
5889
  [
@@ -5678,7 +5891,7 @@ function registerSubmissionsTools(server, getToken, baseUrl) {
5678
5891
  "Export submission facts",
5679
5892
  EXPORT_DESCRIPTION,
5680
5893
  exportInputSchema,
5681
- readOnly6,
5894
+ readOnly7,
5682
5895
  (a) => handleExport(getToken, baseUrl, a)
5683
5896
  ]
5684
5897
  ];
@@ -5695,7 +5908,7 @@ var INDEX_PERIOD_RE = /^\d{4}(-\d{2}|-Q[1-4]|-H[12])?$/;
5695
5908
  var modelIdArg = z.string().uuid().describe("Price model id (from talonic_price_baseline_models).");
5696
5909
  var fromArg = z.string().regex(MONTH_RE).describe("First month of the evaluation window, `YYYY-MM`.");
5697
5910
  var toArg = z.string().regex(MONTH_RE).describe("Last month of the evaluation window, `YYYY-MM`.");
5698
- var readOnly7 = {
5911
+ var readOnly8 = {
5699
5912
  readOnlyHint: true,
5700
5913
  destructiveHint: false,
5701
5914
  idempotentHint: true,
@@ -5954,7 +6167,7 @@ function handleIndices(getToken, baseUrl, args) {
5954
6167
  }
5955
6168
  return runTool(() => apiJson(getToken, baseUrl, "GET", "/v1/price-baseline/indices"));
5956
6169
  }
5957
- var REFRESH_DESCRIPTION = [
6170
+ var REFRESH_DESCRIPTION2 = [
5958
6171
  "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).",
5959
6172
  "USE WHEN: talonic_price_baseline_prices reports a missing public index for a specific year range (backfill).",
5960
6173
  "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).",
@@ -6295,7 +6508,7 @@ function handleImport2(getToken, baseUrl, args) {
6295
6508
  );
6296
6509
  }
6297
6510
  function registerPriceBaselineTools(server, getToken, baseUrl) {
6298
- const write7 = (idempotent) => ({
6511
+ const write8 = (idempotent) => ({
6299
6512
  readOnlyHint: false,
6300
6513
  destructiveHint: false,
6301
6514
  idempotentHint: idempotent,
@@ -6307,7 +6520,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6307
6520
  title: "Find contracts and invoices",
6308
6521
  description: DOCUMENTS_DESCRIPTION,
6309
6522
  inputSchema: documentsInputSchema,
6310
- annotations: readOnly7
6523
+ annotations: readOnly8
6311
6524
  },
6312
6525
  async (args) => handleDocuments(getToken, baseUrl, args)
6313
6526
  );
@@ -6317,7 +6530,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6317
6530
  title: "Build or enrich a price model from a contract",
6318
6531
  description: EXTRACT_DESCRIPTION,
6319
6532
  inputSchema: extractInputSchema,
6320
- annotations: write7(false)
6533
+ annotations: write8(false)
6321
6534
  },
6322
6535
  async (args) => handleExtract2(getToken, baseUrl, args)
6323
6536
  );
@@ -6327,7 +6540,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6327
6540
  title: "List or read price models",
6328
6541
  description: MODELS_DESCRIPTION,
6329
6542
  inputSchema: modelsInputSchema,
6330
- annotations: readOnly7
6543
+ annotations: readOnly8
6331
6544
  },
6332
6545
  async (args) => handleModels(getToken, baseUrl, args)
6333
6546
  );
@@ -6337,7 +6550,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6337
6550
  title: "Edit or confirm a price model",
6338
6551
  description: UPDATE_DESCRIPTION,
6339
6552
  inputSchema: updateInputSchema,
6340
- annotations: write7(true)
6553
+ annotations: write8(true)
6341
6554
  },
6342
6555
  async (args) => handleUpdate(getToken, baseUrl, args)
6343
6556
  );
@@ -6347,7 +6560,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6347
6560
  title: "Recompute contract prices",
6348
6561
  description: PRICES_DESCRIPTION,
6349
6562
  inputSchema: pricesInputSchema,
6350
- annotations: readOnly7
6563
+ annotations: readOnly8
6351
6564
  },
6352
6565
  async (args) => handlePrices(getToken, baseUrl, args)
6353
6566
  );
@@ -6357,7 +6570,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6357
6570
  title: "Download the price baseline workbook",
6358
6571
  description: WORKBOOK_DESCRIPTION,
6359
6572
  inputSchema: workbookInputSchema,
6360
- annotations: readOnly7
6573
+ annotations: readOnly8
6361
6574
  },
6362
6575
  async (args) => handleWorkbook(getToken, baseUrl, args)
6363
6576
  );
@@ -6367,7 +6580,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6367
6580
  title: "Check an invoice against the contract",
6368
6581
  description: COMPARE_DESCRIPTION,
6369
6582
  inputSchema: compareInputSchema,
6370
- annotations: write7(false)
6583
+ annotations: write8(false)
6371
6584
  },
6372
6585
  async (args) => handleCompare(getToken, baseUrl, args)
6373
6586
  );
@@ -6377,7 +6590,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6377
6590
  title: "Audit-proof invoice",
6378
6591
  description: PROOF_INVOICE_DESCRIPTION,
6379
6592
  inputSchema: proofInvoiceInputSchema,
6380
- annotations: readOnly7
6593
+ annotations: readOnly8
6381
6594
  },
6382
6595
  async (args) => handleProofInvoice(getToken, baseUrl, args)
6383
6596
  );
@@ -6387,7 +6600,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6387
6600
  title: "Index catalog and values",
6388
6601
  description: INDICES_DESCRIPTION,
6389
6602
  inputSchema: indicesInputSchema,
6390
- annotations: readOnly7
6603
+ annotations: readOnly8
6391
6604
  },
6392
6605
  async (args) => handleIndices(getToken, baseUrl, args)
6393
6606
  );
@@ -6395,9 +6608,9 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6395
6608
  "talonic_price_baseline_refresh_indices",
6396
6609
  {
6397
6610
  title: "Fetch public index values",
6398
- description: REFRESH_DESCRIPTION,
6611
+ description: REFRESH_DESCRIPTION2,
6399
6612
  inputSchema: refreshInputSchema,
6400
- annotations: { ...write7(true), openWorldHint: true }
6613
+ annotations: { ...write8(true), openWorldHint: true }
6401
6614
  },
6402
6615
  async (args) => handleRefresh(getToken, baseUrl, args)
6403
6616
  );
@@ -6407,7 +6620,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6407
6620
  title: "Enter sourced index values",
6408
6621
  description: MANUAL_DESCRIPTION,
6409
6622
  inputSchema: manualInputSchema,
6410
- annotations: write7(true)
6623
+ annotations: write8(true)
6411
6624
  },
6412
6625
  async (args) => handleManual(getToken, baseUrl, args)
6413
6626
  );
@@ -6417,7 +6630,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6417
6630
  title: "Contract register and expected invoices",
6418
6631
  description: REGISTER_DESCRIPTION2,
6419
6632
  inputSchema: registerInputSchema2,
6420
- annotations: readOnly7
6633
+ annotations: readOnly8
6421
6634
  },
6422
6635
  async (args) => handleRegister2(getToken, baseUrl, args)
6423
6636
  );
@@ -6427,7 +6640,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6427
6640
  title: "Contract workbook and open inputs",
6428
6641
  description: CONTRACT_DESCRIPTION3,
6429
6642
  inputSchema: contractInputSchema3,
6430
- annotations: readOnly7
6643
+ annotations: readOnly8
6431
6644
  },
6432
6645
  async (args) => handleContract3(getToken, baseUrl, args)
6433
6646
  );
@@ -6437,7 +6650,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6437
6650
  title: "Answer an open contract input",
6438
6651
  description: ANSWER_DESCRIPTION,
6439
6652
  inputSchema: answerInputSchema,
6440
- annotations: write7(true)
6653
+ annotations: write8(true)
6441
6654
  },
6442
6655
  async (args) => handleAnswer(getToken, baseUrl, args)
6443
6656
  );
@@ -6447,7 +6660,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6447
6660
  title: "List assumptions",
6448
6661
  description: ASSUMPTIONS_DESCRIPTION,
6449
6662
  inputSchema: assumptionsInputSchema,
6450
- annotations: readOnly7
6663
+ annotations: readOnly8
6451
6664
  },
6452
6665
  async (args) => handleAssumptions(getToken, baseUrl, args)
6453
6666
  );
@@ -6457,7 +6670,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6457
6670
  title: "Make, replace or withdraw an assumption",
6458
6671
  description: ASSUME_DESCRIPTION,
6459
6672
  inputSchema: assumeInputSchema,
6460
- annotations: { ...write7(false), destructiveHint: true }
6673
+ annotations: { ...write8(false), destructiveHint: true }
6461
6674
  },
6462
6675
  async (args) => handleAssume(getToken, baseUrl, args)
6463
6676
  );
@@ -6467,7 +6680,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6467
6680
  title: "Sync external price data",
6468
6681
  description: SYNC_DESCRIPTION,
6469
6682
  inputSchema: syncInputSchema,
6470
- annotations: { ...write7(true), openWorldHint: true }
6683
+ annotations: { ...write8(true), openWorldHint: true }
6471
6684
  },
6472
6685
  async (args) => handleSync(getToken, baseUrl, args)
6473
6686
  );
@@ -6477,7 +6690,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6477
6690
  title: "Import candidates and status",
6478
6691
  description: IMPORTS_DESCRIPTION,
6479
6692
  inputSchema: importsInputSchema,
6480
- annotations: readOnly7
6693
+ annotations: readOnly8
6481
6694
  },
6482
6695
  async (args) => handleImports(getToken, baseUrl, args)
6483
6696
  );
@@ -6487,7 +6700,7 @@ function registerPriceBaselineTools(server, getToken, baseUrl) {
6487
6700
  title: "Import contracts from data capture",
6488
6701
  description: IMPORT_DESCRIPTION2,
6489
6702
  inputSchema: importInputSchema2,
6490
- annotations: write7(true)
6703
+ annotations: write8(true)
6491
6704
  },
6492
6705
  async (args) => handleImport2(getToken, baseUrl, args)
6493
6706
  );
@@ -7320,14 +7533,14 @@ async function handleFieldValues(getToken, baseUrl, args) {
7320
7533
  limit: args.limit,
7321
7534
  cursor: args.cursor
7322
7535
  };
7323
- const page = await apiJson(
7536
+ const page2 = await apiJson(
7324
7537
  getToken,
7325
7538
  baseUrl,
7326
7539
  "GET",
7327
7540
  `/v1/fields/${id}/values`,
7328
7541
  { params }
7329
7542
  );
7330
- return resolution ? { ...page, resolution } : page;
7543
+ return resolution ? { ...page2, resolution } : page2;
7331
7544
  });
7332
7545
  }
7333
7546
  function registerFieldTools(server, getToken, baseUrl) {
@@ -8031,7 +8244,7 @@ function registerAskTools(server, getToken, baseUrl) {
8031
8244
 
8032
8245
  // package.json
8033
8246
  var package_default = {
8034
- version: "0.1.94"};
8247
+ version: "0.1.95"};
8035
8248
 
8036
8249
  // src/version.ts
8037
8250
  var VERSION = package_default.version;
@@ -8199,6 +8412,9 @@ function createServer(options) {
8199
8412
  if (options.includePartiesTools) {
8200
8413
  registerPartiesTools(server, rawToken, baseUrl);
8201
8414
  }
8415
+ if (options.includePortfolioTools) {
8416
+ registerPortfolioTools(server, rawToken, baseUrl);
8417
+ }
8202
8418
  if (options.includeMasterRecordsTools) {
8203
8419
  registerMasterRecordsTools(server, rawToken, baseUrl);
8204
8420
  }