@cyanheads/secedgar-mcp-server 0.15.7 → 0.15.8

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.
Files changed (61) hide show
  1. package/AGENTS.md +18 -10
  2. package/CLAUDE.md +18 -10
  3. package/README.md +112 -162
  4. package/changelog/0.15.x/0.15.8.md +29 -0
  5. package/dist/config/server-config.d.ts.map +1 -1
  6. package/dist/config/server-config.js +1 -1
  7. package/dist/config/server-config.js.map +1 -1
  8. package/dist/mcp-server/tools/definitions/company-search.tool.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/company-search.tool.js +15 -26
  10. package/dist/mcp-server/tools/definitions/company-search.tool.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/dataframe-query.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/dataframe-query.tool.js +7 -1
  13. package/dist/mcp-server/tools/definitions/dataframe-query.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js +1 -1
  15. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-filing.tool.js +16 -11
  18. package/dist/mcp-server/tools/definitions/get-filing.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts +5 -2
  20. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js +151 -28
  22. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.d.ts +1 -1
  24. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js +89 -41
  26. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-material-events.tool.d.ts.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-material-events.tool.js +29 -33
  29. package/dist/mcp-server/tools/definitions/get-material-events.tool.js.map +1 -1
  30. package/dist/mcp-server/tools/definitions/index.d.ts +6 -3
  31. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  32. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/search-filings.tool.js +12 -20
  34. package/dist/mcp-server/tools/definitions/search-filings.tool.js.map +1 -1
  35. package/dist/services/edgar/edgar-api-service.d.ts +53 -41
  36. package/dist/services/edgar/edgar-api-service.d.ts.map +1 -1
  37. package/dist/services/edgar/edgar-api-service.js +213 -144
  38. package/dist/services/edgar/edgar-api-service.js.map +1 -1
  39. package/dist/services/edgar/filing-headers.d.ts +37 -9
  40. package/dist/services/edgar/filing-headers.d.ts.map +1 -1
  41. package/dist/services/edgar/filing-headers.js +40 -11
  42. package/dist/services/edgar/filing-headers.js.map +1 -1
  43. package/dist/services/edgar/filing-to-text.d.ts.map +1 -1
  44. package/dist/services/edgar/filing-to-text.js +24 -2
  45. package/dist/services/edgar/filing-to-text.js.map +1 -1
  46. package/dist/services/edgar/mirror/tickers-sync.d.ts +4 -2
  47. package/dist/services/edgar/mirror/tickers-sync.d.ts.map +1 -1
  48. package/dist/services/edgar/mirror/tickers-sync.js +4 -2
  49. package/dist/services/edgar/mirror/tickers-sync.js.map +1 -1
  50. package/dist/services/edgar/mirror/types.d.ts +6 -2
  51. package/dist/services/edgar/mirror/types.d.ts.map +1 -1
  52. package/dist/services/edgar/ownership-parser.d.ts +16 -0
  53. package/dist/services/edgar/ownership-parser.d.ts.map +1 -1
  54. package/dist/services/edgar/ownership-parser.js +19 -0
  55. package/dist/services/edgar/ownership-parser.js.map +1 -1
  56. package/dist/services/edgar/submissions-archive.d.ts +78 -0
  57. package/dist/services/edgar/submissions-archive.d.ts.map +1 -0
  58. package/dist/services/edgar/submissions-archive.js +87 -0
  59. package/dist/services/edgar/submissions-archive.js.map +1 -0
  60. package/package.json +1 -1
  61. package/server.json +3 -3
@@ -8,6 +8,7 @@ import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
8
8
  import { dataframeGuidance, getCanvasBridge, toDatasetField, } from '../../../services/canvas-bridge/canvas-bridge.js';
9
9
  import { getEdgarApiService } from '../../../services/edgar/edgar-api-service.js';
10
10
  import { parseForm4Xml, } from '../../../services/edgar/ownership-parser.js';
11
+ import { SubmissionsArchiveWalk } from '../../../services/edgar/submissions-archive.js';
11
12
  /** Transaction type filter → SEC transaction codes. */
12
13
  const PURCHASE_CODES = new Set(['P']);
13
14
  const SALE_CODES = new Set(['S']);
@@ -19,6 +20,36 @@ const SALE_CODES = new Set(['S']);
19
20
  * is met — no extra latency.
20
21
  */
21
22
  const INSIDER_CANVAS_FILING_SCAN = 40;
23
+ /** Most Form 4 filings one call parses — one rate-limited document request each. */
24
+ const INSIDER_FILING_SCAN_CAP = 100;
25
+ /** Structured Form 4 XML became mandatory for filings on and after this date. */
26
+ const STRUCTURED_FORM4_START = '2003-06-30';
27
+ /**
28
+ * The Form 4 / 4-A rows of a submissions block filed inside the window, in block order
29
+ * (newest first). Only rows whose primary document is ownership XML — EDGAR's
30
+ * structured Form 4 began in mid-2003, and an earlier HTML or text filing has nothing
31
+ * this tool can parse, so fetching it would spend a request on an empty result.
32
+ */
33
+ function windowForm4Rows(block, inWindow) {
34
+ const rows = [];
35
+ for (let i = 0; i < block.form.length; i++) {
36
+ const form = block.form[i];
37
+ const filingDate = block.filingDate[i] ?? '';
38
+ const primaryDocument = block.primaryDocument[i] ?? '';
39
+ if ((form !== '4' && form !== '4/A') || !inWindow(filingDate))
40
+ continue;
41
+ if (!/\.xml$/i.test(primaryDocument))
42
+ continue;
43
+ rows.push({ accessionNumber: block.accessionNumber[i] ?? '', filingDate, primaryDocument });
44
+ }
45
+ return rows;
46
+ }
47
+ /** "between A and B" / "on or after A" / "on or before B" for notices. */
48
+ function describeWindow(filedAfter, filedBefore) {
49
+ if (filedAfter && filedBefore)
50
+ return `between ${filedAfter} and ${filedBefore}`;
51
+ return filedAfter ? `on or after ${filedAfter}` : `on or before ${filedBefore}`;
52
+ }
22
53
  function matchesFilter(tx, filter) {
23
54
  if (filter === 'all')
24
55
  return true;
@@ -44,7 +75,7 @@ function ownerRelationship(owner) {
44
75
  }
45
76
  export const getInsiderTransactionsTool = tool('secedgar_get_insider_transactions', {
46
77
  title: 'Get Insider Transactions',
47
- description: 'Fetch Form 4 insider transactions (purchases, sales, grants, exercises) for a company by parsing SEC EDGAR ownership XML. Returns the reporting person, their relationship to the issuer, transaction date, type, shares traded (absolute magnitude), direction (acquire/dispose), price per share, and shares owned after the transaction. Covers nonDerivative transactions (open-market buys/sells, gifts) and derivative transactions (option exercises, RSU vests). When a canvas is available, the full set of transactions parsed from the scanned recent filings is materialized as df_<id> (the inline list is a preview capped at limit) — inspect it with secedgar_dataframe_describe, then query it with secedgar_dataframe_query to aggregate net buy/sell by insider: SUM(CASE WHEN direction=\'dispose\' THEN -shares_traded ELSE shares_traded END). Use secedgar_search_filings with forms=["4"] for broader date-range queries or to search across all companies.',
78
+ description: 'Fetch Form 4 insider transactions (purchases, sales, grants, exercises) for a company by parsing SEC EDGAR ownership XML. Returns the reporting person, their relationship to the issuer, transaction date, type, shares traded (absolute magnitude), direction (acquire/dispose), price per share, and shares owned after the transaction. Covers nonDerivative transactions (open-market buys/sells, gifts) and derivative transactions (option exercises, RSU vests). Without a date window it reads the newest Form 4 filings; filed_after / filed_before read any period since mid-2003, reaching past the recent submissions window into the archive (e.g. insider trades in the quarter before an earnings miss). When a canvas is available, the full set of transactions parsed from the scanned filings is materialized as df_<id> (the inline list is a preview capped at limit) — inspect it with secedgar_dataframe_describe, then query it with secedgar_dataframe_query to aggregate net buy/sell by insider: SUM(CASE WHEN direction=\'dispose\' THEN -shares_traded ELSE shares_traded END). Use secedgar_search_filings with forms=["4"] to search Form 4 filings across all companies.',
48
79
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
49
80
  errors: [
50
81
  {
@@ -56,8 +87,8 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
56
87
  {
57
88
  reason: 'no_filings_found',
58
89
  code: JsonRpcErrorCode.NotFound,
59
- when: 'No Form 4 filings exist for this company in the recent submissions window',
60
- recovery: 'Use secedgar_search_filings with forms=["4"] for broader historical coverage.',
90
+ when: 'A call without a date window finds no Form 4 filings in the recent submissions window',
91
+ recovery: 'Pass filed_after / filed_before to read an older period, or use secedgar_search_filings with forms=["4"] to find the filings.',
61
92
  },
62
93
  {
63
94
  reason: 'rate_limited',
@@ -84,9 +115,38 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
84
115
  .max(100)
85
116
  .default(20)
86
117
  .describe('Maximum number of transactions to return across all Form 4 filings fetched. Filings are scanned newest-first. Default 20.'),
118
+ filed_after: z
119
+ .union([
120
+ z.literal(''),
121
+ z
122
+ .string()
123
+ .regex(/^\d{4}-\d{2}-\d{2}$/, 'Expected YYYY-MM-DD')
124
+ .describe('YYYY-MM-DD'),
125
+ ])
126
+ .optional()
127
+ .describe('Only read Form 4 filings filed on or after this date (YYYY-MM-DD). A date window reaches filings older than the recent submissions window by paging into the archive, and with a canvas every Form 4 filed inside it is parsed, up to 100. Structured Form 4 XML begins in mid-2003, so an earlier window finds nothing.'),
128
+ filed_before: z
129
+ .union([
130
+ z.literal(''),
131
+ z
132
+ .string()
133
+ .regex(/^\d{4}-\d{2}-\d{2}$/, 'Expected YYYY-MM-DD')
134
+ .describe('YYYY-MM-DD'),
135
+ ])
136
+ .optional()
137
+ .describe('Only read Form 4 filings filed on or before this date (YYYY-MM-DD). Use alone or with filed_after. Without either bound the tool reads the newest Form 4 filings.'),
87
138
  }),
88
- // Other tools' spellings of the company parameter, and this tool's former one (#115).
89
- inputAliases: { ticker: 'company', cik: 'company', ticker_or_cik: 'company' },
139
+ // Other tools' spellings of the company and filing-date parameters, and this tool's
140
+ // former company name (#115).
141
+ inputAliases: {
142
+ ticker: 'company',
143
+ cik: 'company',
144
+ ticker_or_cik: 'company',
145
+ start_date: 'filed_after',
146
+ date_from: 'filed_after',
147
+ end_date: 'filed_before',
148
+ date_to: 'filed_before',
149
+ },
90
150
  output: z.object({
91
151
  issuer_name: z.string().describe('Issuer entity name (SEC-conformed).'),
92
152
  issuer_cik: z.string().describe('Issuer CIK, zero-padded to 10 digits.'),
@@ -148,6 +208,10 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
148
208
  .describe('One insider transaction parsed from a Form 4 filing.'))
149
209
  .describe('Insider transactions, newest filing first. Preview capped at `limit` — the full scanned set lives on the canvas dataframe (see `dataset`).'),
150
210
  filings_scanned: z.number().describe('Number of Form 4 filings scanned to produce the result.'),
211
+ history_scanned_through: z
212
+ .string()
213
+ .optional()
214
+ .describe('Filing date of the oldest Form 4 parsed (YYYY-MM-DD). Present only when a date window was given; absent when the window held no Form 4 filing.'),
151
215
  dataset: z
152
216
  .object({
153
217
  name: z
@@ -157,7 +221,7 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
157
221
  expires_at: z.string().describe('ISO 8601 expiry timestamp.'),
158
222
  truncated: z
159
223
  .boolean()
160
- .describe('True when more recent Form 4 filings exist beyond the scanned window — the dataframe is a recent sample, not the issuer\'s full Form 4 history. Use secedgar_search_filings with forms=["4"] for exhaustive coverage.'),
224
+ .describe('True when Form 4 filings exist beyond those parsed — past the newest-filings sample, or, with a date window, inside the window beyond the 100-filing cap or past the 10 archive pages read. Narrow the window to reach the rest.'),
161
225
  })
162
226
  .optional()
163
227
  .describe('Canvas dataframe holding the full parsed transaction set from the scanned filings (the inline transactions[] is a preview capped at limit). Each row carries the issuer (issuer_cik, issuer_ticker) plus the transaction fields, so it aggregates net buy/sell by insider and joins across issuers. Query with secedgar_dataframe_query. Absent when canvas is unavailable or no transactions were parsed.'),
@@ -184,18 +248,25 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
184
248
  ...ctx.recoveryFor('company_not_found'),
185
249
  });
186
250
  }
251
+ const filedAfter = input.filed_after || undefined;
252
+ const filedBefore = input.filed_before || undefined;
253
+ const dateWindow = filedAfter || filedBefore ? { filedAfter, filedBefore } : undefined;
187
254
  // With a canvas available, scan deeper than the inline `limit` so the dataframe
188
255
  // holds a useful window for aggregation; without one, stop as soon as the inline
189
- // limit is met (preserves the fast, low-fetch path).
256
+ // limit is met (preserves the fast, low-fetch path). A date window already bounds
257
+ // the set, so with a canvas every filing inside it is parsed, up to the cap (#127).
190
258
  const bridge = getCanvasBridge();
191
- const scanFloor = bridge ? INSIDER_CANVAS_FILING_SCAN : 0;
192
- // Fetch recent Form 4 filing metadata from the submissions API. Over-fetch by 5x
193
- // to account for multi-transaction filings and filter losses; with a canvas, also
194
- // fetch at least the scan floor so a small inline `limit` doesn't under-scan the
195
- // dataframe window (#63). Capped at 100; the +1 sentinel row (metadata only, one
196
- // submissions fetch regardless) detects Form 4 filings beyond the scan window so
259
+ const scanFloor = bridge
260
+ ? dateWindow
261
+ ? INSIDER_FILING_SCAN_CAP
262
+ : INSIDER_CANVAS_FILING_SCAN
263
+ : 0;
264
+ // Over-fetch Form 4 metadata by 5x to account for multi-transaction filings and
265
+ // filter losses; with a canvas, also fetch at least the scan floor so a small inline
266
+ // `limit` doesn't under-scan the dataframe window (#63). Capped at 100; the +1
267
+ // sentinel row (metadata only) detects Form 4 filings beyond the scan window so
197
268
  // `dataset.truncated` is truthful.
198
- const scanCap = Math.min(bridge ? Math.max(input.limit * 5, scanFloor) : input.limit * 5, 100);
269
+ const scanCap = Math.min(bridge ? Math.max(input.limit * 5, scanFloor) : input.limit * 5, INSIDER_FILING_SCAN_CAP);
199
270
  // Bare-CIK fallback: a numeric CIK absent from the ticker cache resolves to { cik }
200
271
  // with no name/ticker. The submissions feed 404s for such a CIK — it's a
201
272
  // filer/transmitter (e.g. an accession-number prefix), not a registrant. Convert
@@ -203,26 +274,58 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
203
274
  // A cache-hit or ticker-resolved match that 404s signals an EDGAR-side problem,
204
275
  // not a bad query — propagate unchanged, same reasoning as #55 and #76.
205
276
  const isBareCikFallback = !match.name && !match.ticker;
277
+ const readSubmissionsFeed = async (read) => {
278
+ try {
279
+ return await read;
280
+ }
281
+ catch (err) {
282
+ if (isBareCikFallback &&
283
+ err instanceof McpError &&
284
+ err.code === JsonRpcErrorCode.NotFound) {
285
+ ctx.log.debug('CIK has no submissions feed', { cik: match.cik });
286
+ throw ctx.fail('company_not_found', `No issuer found for CIK ${match.cik}. If this looks like an accession-number prefix, it's the filing agent, not the issuer — use secedgar_company_search to find the company.`, { ...ctx.recoveryFor('company_not_found') });
287
+ }
288
+ throw err;
289
+ }
290
+ };
206
291
  let filingBatch;
207
- try {
208
- filingBatch = await api.getRecentFilingsByForm(match.cik, ['4', '4/A'], scanCap + 1);
209
- }
210
- catch (err) {
211
- if (isBareCikFallback && err instanceof McpError && err.code === JsonRpcErrorCode.NotFound) {
212
- ctx.log.debug('CIK has no submissions feed', { cik: match.cik });
213
- throw ctx.fail('company_not_found', `No issuer found for CIK ${match.cik}. If this looks like an accession-number prefix, it's the filing agent, not the issuer — use secedgar_company_search to find the company.`, { ...ctx.recoveryFor('company_not_found') });
292
+ let walk;
293
+ if (dateWindow) {
294
+ // In-window Form 4 rows, newest first: the recent window, then the archive pages
295
+ // overlapping the window, read until the scan budget plus one sentinel row is in
296
+ // hand or the shared page cap ends the walk.
297
+ const submissions = await readSubmissionsFeed(api.getSubmissions(match.cik));
298
+ const inWindow = (date) => (!filedAfter || date >= filedAfter) && (!filedBefore || date <= filedBefore);
299
+ filingBatch = windowForm4Rows(submissions.filings.recent, inWindow);
300
+ walk = new SubmissionsArchiveWalk(api, submissions, {
301
+ filedAfter,
302
+ filedBefore,
303
+ order: 'newest-first',
304
+ });
305
+ if (filingBatch.length <= scanCap) {
306
+ for await (const { block } of walk) {
307
+ filingBatch.push(...windowForm4Rows(block, inWindow));
308
+ if (filingBatch.length > scanCap)
309
+ break;
310
+ }
214
311
  }
215
- throw err;
216
312
  }
217
- const moreBeyondWindow = filingBatch.length > scanCap;
218
- const filingsToScan = moreBeyondWindow ? filingBatch.slice(0, scanCap) : filingBatch;
219
- if (filingBatch.length === 0) {
313
+ else {
314
+ filingBatch = await readSubmissionsFeed(api.getRecentFilingsByForm(match.cik, ['4', '4/A'], scanCap + 1));
315
+ }
316
+ // Form 4 filings exist past the scan: the sentinel row turned up, or — in a date
317
+ // window — archive pages overlapping it went unread.
318
+ const moreBeyondWindow = filingBatch.length > scanCap || Boolean(walk?.truncated);
319
+ const filingsToScan = filingBatch.slice(0, scanCap);
320
+ if (filingBatch.length === 0 && !dateWindow) {
220
321
  throw ctx.fail('no_filings_found', `No Form 4 filings found for '${input.company}'.`, {
221
322
  ...ctx.recoveryFor('no_filings_found'),
222
323
  });
223
324
  }
224
325
  const transactions = [];
225
326
  let filingsScanned = 0;
327
+ /** Filing date of the last filing parsed — the oldest, since filings run newest first. */
328
+ let oldestParsed;
226
329
  let scannedWholeWindow = true;
227
330
  for (const filing of filingsToScan) {
228
331
  if (transactions.length >= input.limit && filingsScanned >= scanFloor) {
@@ -235,6 +338,7 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
235
338
  if (!xmlText)
236
339
  continue;
237
340
  filingsScanned++;
341
+ oldestParsed = filing.filingDate;
238
342
  let parsed;
239
343
  try {
240
344
  parsed = parseForm4Xml(xmlText);
@@ -279,11 +383,24 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
279
383
  });
280
384
  }
281
385
  }
282
- if (transactions.length === 0) {
386
+ const windowText = dateWindow && describeWindow(filedAfter, filedBefore);
387
+ if (windowText && filingBatch.length === 0) {
388
+ const walkNote = walk?.truncated
389
+ ? ` The archive scan stopped after ${walk.pagesRead} pages, at filings from ${walk.scannedThrough}; narrow the window to reach older ones.`
390
+ : '';
391
+ const eraNote = filedBefore && filedBefore < STRUCTURED_FORM4_START
392
+ ? ' Structured Form 4 filings begin in mid-2003, so an earlier window finds none.'
393
+ : '';
394
+ ctx.enrich.notice(`No Form 4 filings filed ${windowText} for '${input.company}'.${walkNote}${eraNote}`);
395
+ }
396
+ else if (transactions.length === 0) {
283
397
  const filterNote = input.transaction_type !== 'all'
284
398
  ? ` with transaction_type="${input.transaction_type}"`
285
399
  : '';
286
- ctx.enrich.notice(`No insider transactions found for '${input.company}'${filterNote} in the ${filingsScanned} most recent Form 4 filings. ` +
400
+ const scope = windowText
401
+ ? `the ${filingsScanned} Form 4 filings filed ${windowText}`
402
+ : `the ${filingsScanned} most recent Form 4 filings`;
403
+ ctx.enrich.notice(`No insider transactions found for '${input.company}'${filterNote} in ${scope}. ` +
287
404
  `Try transaction_type="all" or use secedgar_search_filings with forms=["4"] for broader coverage.`);
288
405
  }
289
406
  // Use issuer data from the resolved entity (the submissions API may not always
@@ -324,6 +441,8 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
324
441
  company: input.company,
325
442
  cik: match.cik,
326
443
  transaction_type: input.transaction_type,
444
+ filed_after: filedAfter,
445
+ filed_before: filedBefore,
327
446
  },
328
447
  truncated,
329
448
  });
@@ -355,6 +474,7 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
355
474
  issuer_ticker: issuerTicker,
356
475
  transactions: inlineTransactions,
357
476
  filings_scanned: filingsScanned,
477
+ ...(dateWindow && { history_scanned_through: oldestParsed }),
358
478
  dataset,
359
479
  };
360
480
  },
@@ -392,9 +512,12 @@ export const getInsiderTransactionsTool = tool('secedgar_get_insider_transaction
392
512
  lines.push(`${txDate} | ${tx.security_title} | ${sharesStr} ${priceStr}${ownedStr}${ownershipStr}${periodStr}`);
393
513
  lines.push(`Code: ${tx.transaction_code} | Filed: ${tx.filing_date} [${tx.accession_number}]`);
394
514
  }
515
+ if (result.history_scanned_through) {
516
+ lines.push(`\nHistory scanned through: ${result.history_scanned_through}`);
517
+ }
395
518
  if (result.dataset) {
396
519
  const truncatedNote = result.dataset.truncated
397
- ? ' (truncated — more recent Form 4 filings exist beyond the scanned window)'
520
+ ? ' (truncated — more Form 4 filings exist beyond those scanned)'
398
521
  : '';
399
522
  lines.push(`\nDataset: ${result.dataset.name} (${result.dataset.row_count} rows, expires ${result.dataset.expires_at})${truncatedNote} — query with secedgar_dataframe_query.`);
400
523
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-insider-transactions.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-insider-transactions.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAEL,aAAa,GAEd,MAAM,sCAAsC,CAAC;AAE9C,uDAAuD;AACvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACtC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC,SAAS,aAAa,CAAC,EAAsB,EAAE,MAAmC;IAChF,IAAI,MAAM,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;IAC1E,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,gBAAgB,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AAyC,CACpK,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"get-insider-transactions.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-insider-transactions.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAEL,aAAa,GAEd,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,uDAAuD;AACvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACtC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC,oFAAoF;AACpF,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC,iFAAiF;AACjF,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAS5C;;;;;GAKG;AACH,SAAS,eAAe,CAAC,KAAoB,EAAE,QAAmC;IAChF,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,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KAAK,EAAE,CAAC,gBAAgB,GAAG,CACnF,CAAC;QACJ,CAAC;QAED,IAAI,MAAM,CAAC,uBAAuB,EAAE,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,8BAA8B,MAAM,CAAC,uBAAuB,EAAE,CAAC,CAAC;QAC7E,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS;gBAC5C,CAAC,CAAC,+DAA+D;gBACjE,CAAC,CAAC,EAAE,CAAC;YACP,KAAK,CAAC,IAAI,CACR,cAAc,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,OAAO,CAAC,SAAS,kBAAkB,MAAM,CAAC,OAAO,CAAC,UAAU,IAAI,aAAa,yCAAyC,CACpK,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -62,7 +62,7 @@ export declare const getInstitutionalHoldingsTool: import("@cyanheads/mcp-ts-cor
62
62
  }, {
63
63
  readonly reason: "no_filings_found";
64
64
  readonly code: JsonRpcErrorCode.NotFound;
65
- readonly when: "No 13F-HR filings found for this entity in the recent submissions window";
65
+ readonly when: "No 13F-HR matches — the entity files none, none exists for the requested quarter in the recent submissions window or the archive pages searched, or the manager filed a 13F-NT notice instead (for the requested quarter, or as its only recent 13F filing when no quarter is given)";
66
66
  readonly recovery: "Use secedgar_search_filings with forms=[\"13F-HR\"] for broader search, or check that the entity is an institutional investment manager.";
67
67
  }, {
68
68
  readonly reason: "no_info_table";
@@ -1 +1 @@
1
- {"version":3,"file":"get-institutional-holdings.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-institutional-holdings.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAA6B,MAAM,+BAA+B,CAAC;AAyI5F,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyjBvC,CAAC"}
1
+ {"version":3,"file":"get-institutional-holdings.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-institutional-holdings.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAA6B,MAAM,+BAA+B,CAAC;AAoJ5F,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+lBvC,CAAC"}
@@ -10,7 +10,8 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
10
10
  import { JsonRpcErrorCode, McpError, validationError } from '@cyanheads/mcp-ts-core/errors';
11
11
  import { dataframeGuidance, getCanvasBridge, toDatasetField, } from '../../../services/canvas-bridge/canvas-bridge.js';
12
12
  import { getEdgarApiService } from '../../../services/edgar/edgar-api-service.js';
13
- import { parseInfoTableXml } from '../../../services/edgar/ownership-parser.js';
13
+ import { parseInfoTableXml, parseThirteenFCoverPage } from '../../../services/edgar/ownership-parser.js';
14
+ import { ARCHIVE_PAGE_SCAN_CAP, SubmissionsArchiveWalk, } from '../../../services/edgar/submissions-archive.js';
14
15
  /**
15
16
  * Map a quarter string like "2025-Q4" to its calendar quarter-end date (YYYY-MM-DD) — the
16
17
  * filing's reporting-period end (`reportDate`) in the SEC submissions API. Returns undefined
@@ -82,28 +83,38 @@ function findInfoTableDocument(items) {
82
83
  * secedgar_get_financials / secedgar_search_filings, not a 13F (#86).
83
84
  */
84
85
  const OPERATING_COMPANY_FORMS = ['10-K', '10-K/A', '10-Q', '10-Q/A', '8-K', '8-K/A'];
86
+ /** The holdings report, and the notice a manager files instead when others report its holdings. */
87
+ const HOLDINGS_REPORT_FORM = '13F-HR';
88
+ const NOTICE_FORMS = new Set(['13F-NT', '13F-NT/A']);
85
89
  /**
86
- * Zip the submissions recent-filings parallel arrays into records for the requested
87
- * form types, in submission order (newest first), capped at `limit`. Inlined here
88
- * rather than via `EdgarApiService.getRecentFilingsByForm` so this tool reads the full
89
- * recent-form list off the same submissions fetch for 404 handling (#76) and
90
- * operating-company classification (#86) — without a shared-method signature change
91
- * that would ripple into the insider-transactions tool.
90
+ * Zip a submissions block (the recent window or an archive page) into its 13F-HR and
91
+ * 13F-NT rows, in block order — newest filed first. Read off the submissions fetch the
92
+ * tool already holds, which also feeds the 404 handling (#76) and the operating-company
93
+ * classification (#86).
92
94
  */
93
- function recentFilingsOfForm(recent, formTypes, limit) {
95
+ function thirteenFRows(block) {
94
96
  const out = [];
95
- for (let i = 0; i < recent.form.length && out.length < limit; i++) {
96
- if (formTypes.includes(recent.form[i] ?? '')) {
97
- out.push({
98
- accessionNumber: recent.accessionNumber[i] ?? '',
99
- filingDate: recent.filingDate[i] ?? '',
100
- primaryDocument: recent.primaryDocument[i] ?? '',
101
- reportDate: recent.reportDate[i] ?? '',
102
- });
103
- }
97
+ for (let i = 0; i < block.form.length; i++) {
98
+ const form = block.form[i] ?? '';
99
+ if (form !== HOLDINGS_REPORT_FORM && !NOTICE_FORMS.has(form))
100
+ continue;
101
+ out.push({
102
+ accessionNumber: block.accessionNumber[i] ?? '',
103
+ filingDate: block.filingDate[i] ?? '',
104
+ form,
105
+ reportDate: block.reportDate[i] ?? '',
106
+ });
104
107
  }
105
108
  return out;
106
109
  }
110
+ /** The newest-filed 13F-HR and 13F-NT for one period among `rows`. */
111
+ function forPeriod(rows, periodEnd) {
112
+ const inPeriod = rows.filter((r) => r.reportDate === periodEnd);
113
+ return {
114
+ report: inPeriod.find((r) => r.form === HOLDINGS_REPORT_FORM),
115
+ notice: inPeriod.find((r) => NOTICE_FORMS.has(r.form)),
116
+ };
117
+ }
107
118
  export const getInstitutionalHoldingsTool = tool('secedgar_get_institutional_holdings', {
108
119
  title: 'Get Institutional Holdings',
109
120
  description: 'Fetch 13F-HR quarterly institutional holdings by parsing the SEC EDGAR information table XML. company is the institutional filer — its 10-digit CIK (e.g. 0000102909), a ticker, or an entity name (names outside EDGAR\'s ticker file resolve through EDGAR entity search) — and the tool returns what that institution holds. A name that matches several EDGAR filers (some legal names are shared across entities) returns those candidates so you can retry with the exact CIK, rather than guessing. For the reverse direction — which institutions hold a given portfolio company — use secedgar_find_holders, whose filer_cik results feed straight back into this tool. The 13F information table lists each position: issuer name, CUSIP, shares held, market value (in whole USD), and put/call designation for options. Sub-lines for the same security are consolidated into distinct positions sorted by value by default (set consolidate=false for raw filing rows). The inline holdings list is one page of limit rows starting at offset — pass the returned next_offset to walk further down a large information table. The full parsed holdings set is also materialized as df_<id> when a canvas is available — inspect it with secedgar_dataframe_describe, then query it with secedgar_dataframe_query to aggregate the whole filing or self-join across quarters on cusip + reporting_period. Institutions with less than $100M in 13(f) securities are exempt and may not file. Use secedgar_search_filings with forms=["13F-HR"] for broader search.',
@@ -124,7 +135,7 @@ export const getInstitutionalHoldingsTool = tool('secedgar_get_institutional_hol
124
135
  {
125
136
  reason: 'no_filings_found',
126
137
  code: JsonRpcErrorCode.NotFound,
127
- when: 'No 13F-HR filings found for this entity in the recent submissions window',
138
+ when: 'No 13F-HR matches — the entity files none, none exists for the requested quarter in the recent submissions window or the archive pages searched, or the manager filed a 13F-NT notice instead (for the requested quarter, or as its only recent 13F filing when no quarter is given)',
128
139
  recovery: 'Use secedgar_search_filings with forms=["13F-HR"] for broader search, or check that the entity is an institutional investment manager.',
129
140
  },
130
141
  {
@@ -150,7 +161,7 @@ export const getInstitutionalHoldingsTool = tool('secedgar_get_institutional_hol
150
161
  quarter: z
151
162
  .string()
152
163
  .optional()
153
- .describe('Reporting quarter to target, in "YYYY-QN" format (e.g., "2025-Q4"). When omitted, returns the most recent 13F-HR available. Quarters map to the filing window: Q4 2025 = filings submitted roughly Jan–Mar 2026.'),
164
+ .describe('Reporting quarter to target, in "YYYY-QN" format (e.g., "2025-Q4"), matched exactly against each 13F-HR\'s period of report. When omitted, returns the most recent 13F-HR in the submissions feed\'s recent window (the last year or 1,000 filings, whichever holds more). Quarters map to the filing window: Q4 2025 = filings submitted roughly Jan–Mar 2026. A quarter older than the recent window is looked up in the archive, reading forward from the quarter end up to 10 archive pages. A quarter the manager covered with a 13F-NT notice (holdings reported by other managers) fails naming that notice.'),
154
165
  limit: z
155
166
  .number()
156
167
  .int()
@@ -318,13 +329,59 @@ export const getInstitutionalHoldingsTool = tool('secedgar_get_institutional_hol
318
329
  // Each 13F-HR carries a reportDate (the period-end), so a requested quarter is
319
330
  // matched exactly. No quarter → most-recent; with a quarter, a miss is reported,
320
331
  // never silently the latest filing.
321
- const recentFilings = recentFilingsOfForm(submissions.filings.recent, ['13F-HR'], 80);
322
- const filingMeta = periodEnd
323
- ? recentFilings.find((f) => f.reportDate === periodEnd)
324
- : recentFilings[0];
332
+ const recentRows = thirteenFRows(submissions.filings.recent);
333
+ // A 13F-HR or a notice either one marks a 13F manager; only an entity whose rows
334
+ // read hold neither gets the #86 classification below.
335
+ let filesThirteenF = recentRows.length > 0;
336
+ let filingMeta;
337
+ let notice;
338
+ let walk;
339
+ if (!periodEnd) {
340
+ filingMeta = recentRows.find((r) => r.form === HOLDINGS_REPORT_FORM);
341
+ // A manager whose recent filings are notices only: name its newest notice rather
342
+ // than calling it a non-filer (#133).
343
+ if (!filingMeta)
344
+ notice = recentRows.find((r) => NOTICE_FORMS.has(r.form));
345
+ }
346
+ else {
347
+ ({ report: filingMeta, notice } = forPeriod(recentRows, periodEnd));
348
+ // A quarter the recent window does not reach: a 13F-HR is filed after its period
349
+ // ends, so read the archive forward in time from the page covering the quarter
350
+ // end and stop on the first page holding a report or notice for it (#117, #133).
351
+ // A quarter ending on or after the window's oldest filing selects no page.
352
+ if (!filingMeta && !notice) {
353
+ walk = new SubmissionsArchiveWalk(api, submissions, {
354
+ filedAfter: periodEnd,
355
+ order: 'oldest-first',
356
+ });
357
+ for await (const { block } of walk) {
358
+ const rows = thirteenFRows(block);
359
+ filesThirteenF ||= rows.length > 0;
360
+ ({ report: filingMeta, notice } = forPeriod(rows, periodEnd));
361
+ if (filingMeta || notice)
362
+ break;
363
+ }
364
+ }
365
+ }
325
366
  if (!filingMeta) {
326
- if (recentFilings.length === 0) {
327
- // Entity files no 13F-HR at all. Classify from the recent-form list (#86): an
367
+ if (notice) {
368
+ // The manager filed a notice for this quarter — or, asked for no quarter, files
369
+ // only notices: another manager's 13F-HR carries its holdings, so there is no
370
+ // information table here to read (#133).
371
+ const scope = input.quarter
372
+ ? `for quarter "${input.quarter}"`
373
+ : 'in its recent submissions window';
374
+ throw ctx.fail('no_filings_found', `No 13F-HR filed by '${input.company}' (${submissions.name}) ${scope} — it filed a ${notice.form} notice (accession ${notice.accessionNumber}, period ${notice.reportDate}, filed ${notice.filingDate}) instead: its holdings for that quarter are reported by other managers in their own 13F-HR filings.`, {
375
+ recovery: {
376
+ hint: `Read notice ${notice.accessionNumber} with secedgar_get_filing — its cover page lists the managers reporting these holdings — then call this tool with one of those managers' CIKs.`,
377
+ },
378
+ notice_accession_number: notice.accessionNumber,
379
+ notice_form: notice.form,
380
+ notice_period: notice.reportDate,
381
+ });
382
+ }
383
+ if (!filesThirteenF) {
384
+ // Entity files no 13F-HR or notice at all. Classify from the recent-form list (#86): an
328
385
  // entity filing 10-K/10-Q/8-K is an operating company, not an institutional
329
386
  // manager — route the caller to the tools that fit. Use the submissions identity
330
387
  // so it works for CIKs absent from the ticker cache too.
@@ -359,7 +416,10 @@ export const getInstitutionalHoldingsTool = tool('secedgar_get_institutional_hol
359
416
  throw ctx.fail('no_filings_found', `No 13F-HR filings found for '${input.company}' (resolves to ${submissions.name}). This entity is not a 13F institutional filer.`, { ...ctx.recoveryFor('no_filings_found') });
360
417
  }
361
418
  // 13F filings exist, but none for the requested quarter (#31) — a real 13F filer.
362
- throw ctx.fail('no_filings_found', `No 13F-HR filings found for '${input.company}' for quarter "${input.quarter}".`, { ...ctx.recoveryFor('no_filings_found') });
419
+ const searched = walk && walk.pagesRead > 0
420
+ ? ` Searched the recent submissions window and ${walk.pagesRead} archive page${walk.pagesRead === 1 ? '' : 's'} filed from ${walk.scannedThrough} forward${walk.truncated ? `; the ${ARCHIVE_PAGE_SCAN_CAP}-page cap stopped the search before later pages` : ''}.`
421
+ : '';
422
+ throw ctx.fail('no_filings_found', `No 13F-HR filings found for '${input.company}' for quarter "${input.quarter}".${searched}`, { ...ctx.recoveryFor('no_filings_found') });
363
423
  }
364
424
  // Get the filing index to find the information table document
365
425
  const filingIndex = await api.tryGetFilingIndex(match.cik, filingMeta.accessionNumber);
@@ -381,22 +441,10 @@ export const getInstitutionalHoldingsTool = tool('secedgar_get_institutional_hol
381
441
  // Pull reporting period and filing-manager name from the primary_doc.xml cover page.
382
442
  // The CIK resolver only knows names for ticker-listed entities, but most 13F filers
383
443
  // are investment managers that aren't listed — the cover page is the reliable source.
384
- let reportingPeriod;
385
- let filerName;
386
444
  const primaryXml = await api.tryGetFilingDocument(match.cik, filingMeta.accessionNumber, 'primary_doc.xml');
387
- if (primaryXml) {
388
- // <periodOfReport>12-31-2025</periodOfReport> or <reportCalendarOrQuarter>12-31-2025</reportCalendarOrQuarter>
389
- const periodMatch = primaryXml.match(/<periodOfReport>(\d{2}-\d{2}-\d{4})<\/periodOfReport>/) ??
390
- primaryXml.match(/<reportCalendarOrQuarter>(\d{2}-\d{2}-\d{4})<\/reportCalendarOrQuarter>/);
391
- if (periodMatch?.[1]) {
392
- // Convert MM-DD-YYYY to YYYY-MM-DD
393
- const [mm, dd, yyyy] = periodMatch[1].split('-');
394
- reportingPeriod = `${yyyy}-${mm}-${dd}`;
395
- }
396
- const nameMatch = primaryXml.match(/<(?:\w+:)?filingManager>[\s\S]*?<(?:\w+:)?name>([^<]+)<\/(?:\w+:)?name>/i);
397
- if (nameMatch?.[1])
398
- filerName = nameMatch[1].trim();
399
- }
445
+ const { filerName, reportingPeriod } = primaryXml
446
+ ? parseThirteenFCoverPage(primaryXml)
447
+ : { filerName: undefined, reportingPeriod: undefined };
400
448
  let parsed;
401
449
  try {
402
450
  parsed = parseInfoTableXml(xmlText);