@cyanheads/secedgar-mcp-server 0.20.0 → 0.20.1

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 (79) hide show
  1. package/AGENTS.md +23 -22
  2. package/CLAUDE.md +23 -22
  3. package/README.md +21 -9
  4. package/changelog/0.20.x/0.20.1.md +39 -0
  5. package/changelog/template.md +10 -8
  6. package/dist/index.js +2 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/mcp-server/tools/definitions/company-search.tool.js +1 -1
  9. package/dist/mcp-server/tools/definitions/company-search.tool.js.map +1 -1
  10. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/compare-companies.tool.js +35 -21
  12. package/dist/mcp-server/tools/definitions/compare-companies.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/dataframe-query.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/dataframe-query.tool.js +28 -5
  15. package/dist/mcp-server/tools/definitions/dataframe-query.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/fetch-frames.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js +4 -2
  18. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/find-holders.tool.js +3 -3
  20. package/dist/mcp-server/tools/definitions/find-holders.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js +1 -1
  22. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts +14 -2
  24. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-filing.tool.js +220 -86
  26. package/dist/mcp-server/tools/definitions/get-filing.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-financials.tool.js +82 -18
  29. package/dist/mcp-server/tools/definitions/get-financials.tool.js.map +1 -1
  30. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.js +3 -3
  31. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts +18 -2
  33. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js +299 -104
  35. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js.map +1 -1
  36. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js +5 -5
  37. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js.map +1 -1
  38. package/dist/mcp-server/tools/definitions/get-material-events.tool.js +1 -1
  39. package/dist/mcp-server/tools/definitions/get-material-events.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js +24 -22
  42. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/definitions/index.d.ts +17 -2
  44. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  45. package/dist/mcp-server/tools/definitions/search-concepts.tool.d.ts.map +1 -1
  46. package/dist/mcp-server/tools/definitions/search-concepts.tool.js +16 -11
  47. package/dist/mcp-server/tools/definitions/search-concepts.tool.js.map +1 -1
  48. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts +2 -0
  49. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts.map +1 -1
  50. package/dist/mcp-server/tools/definitions/search-filings.tool.js +88 -40
  51. package/dist/mcp-server/tools/definitions/search-filings.tool.js.map +1 -1
  52. package/dist/services/edgar/call-scope.d.ts +13 -1
  53. package/dist/services/edgar/call-scope.d.ts.map +1 -1
  54. package/dist/services/edgar/call-scope.js +4 -1
  55. package/dist/services/edgar/call-scope.js.map +1 -1
  56. package/dist/services/edgar/concept-map.d.ts.map +1 -1
  57. package/dist/services/edgar/concept-map.js +18 -2
  58. package/dist/services/edgar/concept-map.js.map +1 -1
  59. package/dist/services/edgar/concept-series.d.ts +32 -1
  60. package/dist/services/edgar/concept-series.d.ts.map +1 -1
  61. package/dist/services/edgar/concept-series.js +72 -1
  62. package/dist/services/edgar/concept-series.js.map +1 -1
  63. package/dist/services/edgar/edgar-api-service.d.ts +2 -12
  64. package/dist/services/edgar/edgar-api-service.d.ts.map +1 -1
  65. package/dist/services/edgar/edgar-api-service.js +18 -31
  66. package/dist/services/edgar/edgar-api-service.js.map +1 -1
  67. package/dist/services/edgar/filing-to-text.d.ts +20 -8
  68. package/dist/services/edgar/filing-to-text.d.ts.map +1 -1
  69. package/dist/services/edgar/filing-to-text.js +583 -51
  70. package/dist/services/edgar/filing-to-text.js.map +1 -1
  71. package/dist/services/edgar/fiscal-periods.d.ts +2 -0
  72. package/dist/services/edgar/fiscal-periods.d.ts.map +1 -1
  73. package/dist/services/edgar/fiscal-periods.js +1 -1
  74. package/dist/services/edgar/fiscal-periods.js.map +1 -1
  75. package/dist/services/edgar/types.d.ts +9 -6
  76. package/dist/services/edgar/types.d.ts.map +1 -1
  77. package/package.json +8 -8
  78. package/server.json +3 -3
  79. package/skills/secedgar-guide/SKILL.md +16 -2
@@ -282,6 +282,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
282
282
  total: import("zod").ZodNumber;
283
283
  total_is_exact: import("zod").ZodBoolean;
284
284
  total_documents: import("zod").ZodOptional<import("zod").ZodNumber>;
285
+ next_offset: import("zod").ZodOptional<import("zod").ZodNumber>;
285
286
  results: import("zod").ZodArray<import("zod").ZodObject<{
286
287
  accession_number: import("zod").ZodString;
287
288
  form: import("zod").ZodOptional<import("zod").ZodString>;
@@ -476,8 +477,14 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
476
477
  }, {
477
478
  readonly reason: "filing_not_found";
478
479
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
479
- readonly when: "No filing matches the accession number under any candidate CIK";
480
+ readonly when: "No EDGAR source lists the accession number — no directory tried holds it, full-text search has no record of it, and SEC serves no index page for it — or the lookups that could show it were unavailable";
480
481
  readonly recovery: "Verify the accession number and pass the company CIK explicitly.";
482
+ }, {
483
+ readonly reason: "filing_not_served";
484
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
485
+ readonly when: "EDGAR shows the filing exists — full-text search lists it, SEC serves its index page, or this server read it earlier — but the SEC archive answered 404 for its directory listing under every CIK tried, an answer SEC caches for several minutes";
486
+ readonly recovery: "Retry the same call in a few minutes — the SEC archive is not serving this existing filing right now, and nothing in the request needs to change.";
487
+ readonly retryable: true;
481
488
  }, {
482
489
  readonly reason: "offset_out_of_range";
483
490
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
@@ -795,6 +802,10 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
795
802
  readonly resolvedAs: import("zod").ZodOptional<import("zod").ZodString>;
796
803
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
797
804
  company: import("zod").ZodString;
805
+ role: import("zod").ZodDefault<import("zod").ZodEnum<{
806
+ issuer: "issuer";
807
+ reporting_owner: "reporting_owner";
808
+ }>>;
798
809
  transaction_type: import("zod").ZodDefault<import("zod").ZodEnum<{
799
810
  all: "all";
800
811
  purchase: "purchase";
@@ -807,12 +818,16 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
807
818
  issuer_name: import("zod").ZodString;
808
819
  issuer_cik: import("zod").ZodString;
809
820
  issuer_ticker: import("zod").ZodOptional<import("zod").ZodString>;
821
+ role: import("zod").ZodOptional<import("zod").ZodLiteral<"reporting_owner">>;
810
822
  transactions: import("zod").ZodArray<import("zod").ZodObject<{
811
823
  filing_date: import("zod").ZodString;
812
824
  period_of_report: import("zod").ZodOptional<import("zod").ZodString>;
813
825
  accession_number: import("zod").ZodString;
814
826
  reporting_person: import("zod").ZodString;
815
827
  relationship: import("zod").ZodString;
828
+ issuer_cik: import("zod").ZodOptional<import("zod").ZodString>;
829
+ issuer_name: import("zod").ZodOptional<import("zod").ZodString>;
830
+ issuer_ticker: import("zod").ZodOptional<import("zod").ZodString>;
816
831
  security_title: import("zod").ZodString;
817
832
  transaction_date: import("zod").ZodOptional<import("zod").ZodString>;
818
833
  transaction_code: import("zod").ZodString;
@@ -853,7 +868,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
853
868
  }, {
854
869
  readonly reason: "no_filings_found";
855
870
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
856
- readonly when: "A call without a date window finds no Form 4 filings in the recent submissions window";
871
+ readonly when: "A call without a date window finds no Form 4 filings in the recent submissions window, or under role reporting_owner none listing the company as a reporting owner";
857
872
  readonly recovery: "Pass filed_after / filed_before to read an older period, or use secedgar_search_filings with forms=[\"4\"] to find the filings.";
858
873
  }, {
859
874
  readonly reason: 'rate_limited';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAmB3E;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0BlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-concepts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAmBjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+K7B,CAAC"}
1
+ {"version":3,"file":"search-concepts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAoBjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmL7B,CAAC"}
@@ -8,6 +8,7 @@
8
8
  import { tool, z } from '@cyanheads/mcp-ts-core';
9
9
  import { escapeMarkdownInline } from '@cyanheads/mcp-ts-core/utils';
10
10
  import { searchConcepts } from '../../../services/edgar/concept-map.js';
11
+ import { relatedTagsFor } from '../../../services/edgar/concept-series.js';
11
12
  const GROUP_VALUES = [
12
13
  'income_statement',
13
14
  'balance_sheet',
@@ -31,7 +32,7 @@ export const searchConceptsTool = tool('secedgar_search_concepts', {
31
32
  group: z
32
33
  .enum(GROUP_VALUES)
33
34
  .optional()
34
- .describe('Filter to a single financial statement group. income_statement covers P&L items; balance_sheet covers position items (use instant periods in secedgar_fetch_frames); cash_flow covers CF statement items; per_share covers EPS and the diluted share count it divides by; entity_info covers DEI items like shares outstanding.'),
35
+ .describe('One statement group: income_statement (P&L), balance_sheet (positions; use instant periods in secedgar_fetch_frames), cash_flow, per_share (EPS and the diluted share count it divides by), or entity_info (DEI items such as shares outstanding).'),
35
36
  taxonomy: z
36
37
  .enum(TAXONOMY_VALUES)
37
38
  .optional()
@@ -118,16 +119,20 @@ export const searchConceptsTool = tool('secedgar_search_concepts', {
118
119
  }
119
120
  return {
120
121
  total: results.length,
121
- concepts: results.map((c) => ({
122
- name: c.name,
123
- label: c.label,
124
- tags: c.tags,
125
- ...(c.ifrsTags?.length ? { ifrs_tags: c.ifrsTags } : {}),
126
- ...(c.relatedTags?.length ? { related_tags: c.relatedTags } : {}),
127
- taxonomy: c.taxonomy,
128
- unit: c.unit,
129
- group: c.group,
130
- })),
122
+ concepts: results.map((c) => {
123
+ // us-gaap elements: none is listed under an ifrs-full filter (#258).
124
+ const related = relatedTagsFor(c.name, input.taxonomy ?? 'us-gaap');
125
+ return {
126
+ name: c.name,
127
+ label: c.label,
128
+ tags: c.tags,
129
+ ...(c.ifrsTags?.length ? { ifrs_tags: c.ifrsTags } : {}),
130
+ ...(related.length ? { related_tags: [...related] } : {}),
131
+ taxonomy: c.taxonomy,
132
+ unit: c.unit,
133
+ group: c.group,
134
+ };
135
+ }),
131
136
  };
132
137
  },
133
138
  format: (result) => {
@@ -1 +1 @@
1
- {"version":3,"file":"search-concepts.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,MAAM,YAAY,GAAG;IACnB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,WAAW;IACX,aAAa;CAC6B,CAAC;AAE7C,MAAM,eAAe,GAAG;IACtB,SAAS;IACT,WAAW;IACX,KAAK;CACwC,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACjE,WAAW,EACT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AAK,CAAC,IAAI,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC;YAC3D,CAAC;QACH,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;AAEH,SAAS,WAAW,CAAC,KAAmB;IACtC,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
@@ -31,6 +31,7 @@ export declare const searchFilingsTool: import("@cyanheads/mcp-ts-core").ToolDef
31
31
  total: z.ZodNumber;
32
32
  total_is_exact: z.ZodBoolean;
33
33
  total_documents: z.ZodOptional<z.ZodNumber>;
34
+ next_offset: z.ZodOptional<z.ZodNumber>;
34
35
  results: z.ZodArray<z.ZodObject<{
35
36
  accession_number: z.ZodString;
36
37
  form: z.ZodOptional<z.ZodString>;
@@ -163,6 +164,7 @@ export declare function createSearchFilingsTool(options: LimitClampOptions): imp
163
164
  total: z.ZodNumber;
164
165
  total_is_exact: z.ZodBoolean;
165
166
  total_documents: z.ZodOptional<z.ZodNumber>;
167
+ next_offset: z.ZodOptional<z.ZodNumber>;
166
168
  results: z.ZodArray<z.ZodObject<{
167
169
  accession_number: z.ZodString;
168
170
  form: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"search-filings.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-filings.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EACL,gBAAgB,EAIjB,MAAM,+BA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEjE"}
@@ -390,14 +390,16 @@ function sortRows(rows, sort) {
390
390
  * `total` is the assembled filing count. When `totalIsExact` is false the sources
391
391
  * held more than was read (an archive cap, a scan cap, or a full-text window short
392
392
  * of its document total), so the dataframe is flagged truncated and the truncation
393
- * notice fires even when every assembled row is shown.
393
+ * notice says to narrow even on the last page, since no offset reaches those rows.
394
+ * `next_offset` names the next page while assembled rows lie past this one (#259).
394
395
  */
395
396
  async function finishAssembledResult(ctx, args) {
396
397
  const sorted = sortRows(args.matched, args.sort);
397
398
  const total = sorted.length;
398
399
  const truncated = !args.totalIsExact;
399
- const sliced = sorted.slice(args.offset, args.offset + args.limit);
400
- const results = sliced.map(toInlineResult);
400
+ const pageEnd = args.offset + args.limit;
401
+ const nextOffset = pageEnd < total ? pageEnd : undefined;
402
+ const results = sorted.slice(args.offset, pageEnd).map(toInlineResult);
401
403
  const formDistribution = buildFormDistribution(sorted.map((row) => row.form));
402
404
  let dataset;
403
405
  const bridge = getCanvasBridge();
@@ -427,27 +429,31 @@ async function finishAssembledResult(ctx, args) {
427
429
  notice.push(dataframeGuidance(dataset));
428
430
  ctx.enrich.notice(notice.join(' '));
429
431
  }
430
- else if (total > results.length || !args.totalIsExact) {
432
+ else if (nextOffset !== undefined || truncated) {
431
433
  // `notice` is last-wins across notice/truncated, so every applicable clause —
432
- // coverage, the fetch boundary, the staged-dataframe pointer — is composed
433
- // into this one guidance string rather than emitted as competing notices (#104).
434
+ // coverage, the next page, the fetch boundary, the staged-dataframe pointer — is
435
+ // composed into this one guidance string rather than emitted as competing notices (#104).
434
436
  const guidance = [args.coverageNote];
437
+ if (nextOffset !== undefined)
438
+ guidance.push(`Page on with offset ${nextOffset}.`);
435
439
  if (truncated)
436
440
  guidance.push(MORE_MATCHES_BEYOND_ROWS);
437
441
  if (dataset)
438
442
  guidance.push(dataframeGuidance(dataset));
439
- else if (!truncated)
440
- guidance.push('Page further with offset.');
441
443
  ctx.enrich.truncated({
442
444
  shown: results.length,
443
445
  cap: args.limit,
444
446
  guidance: guidance.join(' '),
445
447
  });
446
448
  }
449
+ else if (dataset) {
450
+ ctx.enrich.notice(`${args.coverageNote} ${dataframeGuidance(dataset)}`);
451
+ }
447
452
  return {
448
453
  total,
449
454
  total_is_exact: args.totalIsExact,
450
455
  total_documents: args.totalDocuments,
456
+ next_offset: nextOffset,
451
457
  results,
452
458
  form_distribution: formDistribution,
453
459
  scan: args.scan,
@@ -672,13 +678,13 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
672
678
  notice: z
673
679
  .string()
674
680
  .optional()
675
- .describe('Why nothing matched, what lies past a truncated list and how to reach it, or that offset passed the filings available.'),
681
+ .describe('Why nothing matched, how to reach filings past this page, or that offset passed the filings available.'),
676
682
  truncated: z
677
683
  .boolean()
678
684
  .optional()
679
- .describe('True when more filings match than are shown: limit capped the list, or total is a lower bound.'),
680
- shown: z.number().optional().describe('Number of results shown inline.'),
681
- cap: z.number().optional().describe('The limit cap applied.'),
685
+ .describe('True when filings lie past this page: next_offset reaches them, or only narrowing does.'),
686
+ shown: z.number().optional().describe('Results shown inline.'),
687
+ cap: z.number().optional().describe('The limit applied.'),
682
688
  },
683
689
  errors: [
684
690
  {
@@ -749,11 +755,11 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
749
755
  .describe('Full-text search query. Supports: exact phrases ("material weakness"), boolean operators (revenue OR income), exclusion (-preliminary), wildcard suffix (account*), entity targeting (one ticker:AAPL or cik:320193 term, never led by - or NOT). Terms are AND\'d by default.'),
750
756
  ])
751
757
  .optional()
752
- .describe('Full-text search query. Optional — omit (or pass "") to browse by form type and/or entity instead, e.g. every S-1 in a date window, or a company\'s filings via ticker:/cik:. A date range alone is not a valid search; pair it with forms or entity targeting. The EFTS index that serves free text starts at 2001-01-01; a date range reaching earlier needs ticker:/cik: entity scope, which lets the tool read that entity\'s filings and match the terms locally (bounded to 50 documents, a few seconds at SEC\'s request rate), or drop the text terms and browse by form type (forms) and date. When present, supports exact phrases ("material weakness"), boolean operators (revenue OR income), exclusion (-preliminary), wildcard suffix (account*), and entity targeting (ticker:AAPL or cik:320193 in the query); terms are AND\'d by default. Entity targeting takes one ticker: or cik: term, never led by - or NOT: it scopes the search to one company and cannot exclude one. A multi-class share ticker resolves in either form — ticker:BRK-B and ticker:BRK.B scope to the same issuer — and an uppercase ticker also resolves as market-data feeds write it: venue-coded (UEC.N), a preferred class run together (CFGPH), or a class root (GLOP); a former ticker scopes to the company that last held it (ticker:AMRK, Gold.com). The pre-2001 local scan honors the same phrase / OR / exclusion / wildcard syntax.'),
758
+ .describe('Full-text search terms. Omit or pass "" to browse by forms and/or ticker:/cik: scope instead; a date range alone is not a search. Full text covers 2001 onward: an earlier range needs ticker:/cik: scope, or no text terms and a forms filter. ticker: reads tickers as secedgar_company_search does.'),
753
759
  forms: z
754
760
  .array(z.string())
755
761
  .optional()
756
- .describe('Filter to specific form types (e.g., ["10-K", "10-Q", "8-K"]). Without this, searches all form types. Note: "10-K" also matches amendments filed as 10-K/A. SEC renamed the blockholder schedules on 2024-12-18 — filings before that date are "SC 13D"/"SC 13G", filings after are "SCHEDULE 13D"/"SCHEDULE 13G" — so a filter spanning that boundary must list both spellings. Ownership forms (3, 4, 5) are indexed by the reporting person (e.g., "LEVINSON ARTHUR D"), not the issuer — rows carry no transaction code, share count, or price. Use secedgar_get_insider_transactions to retrieve parsed ownership XML with person, relationship, transaction code, shares, and price.'),
762
+ .describe('Form types to filter to (e.g. ["10-K", "8-K"]); omit for all. "10-K" also matches 10-K/A. "SC 13D"/"SC 13G" became "SCHEDULE 13D"/"SCHEDULE 13G" on 2024-12-18; list both across that date. Forms 3, 4, 5 index by reporting person, with no trades; secedgar_get_insider_transactions parses Form 4.'),
757
763
  filed_after: z
758
764
  .union([
759
765
  z.literal(''),
@@ -781,11 +787,11 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
781
787
  .min(0)
782
788
  .max(9999)
783
789
  .default(0)
784
- .describe(`Pagination offset. For sort=relevance on a 2001-onward search, EDGAR pages server-side, and the offset counts matching documents, not filings — EDGAR indexes each document of a filing separately — so a page lists the filings among its limit documents, which can be fewer than limit, and a filing whose matching documents straddle a page edge can recur on the next page; stepping by limit never skips one. EDGAR serves offsets up to ${MAX_RELEVANCE_OFFSET} there, where a page of limit 100 reaches its 10,000-document cap, and a deeper offset is rejected. Everywhere else the offset indexes the filings this call assembled and sorted: the filings of a single 100-document window for date sorts and entity targeting, the full matched set on a pre-2001 archive path, or both together on a range that crosses 2001-01-01. Offsets at or past those rows return nothing even when more filings match (a total above the rows fetched, or total_is_exact false) — switch to sort=relevance for deep pagination on a 2001-onward search, narrow the search (forms, dates, entity targeting), or query the dataframe. On a crossing range the two sides are assembled unevenly — the archive side contributes every row it matched, the full-text side the filings of one document window — so once the window runs out the rows jump to the pre-2001 era with the remaining full-text matches absent from the middle; search the 2001-onward era on its own to page through those.`),
790
+ .describe(`Where the page starts; pass next_offset to page on. Under sort=relevance on a 2001-onward search it counts documents (a filing can recur); EDGAR serves offsets up to ${MAX_RELEVANCE_OFFSET} there, and a deeper offset is rejected. Elsewhere it indexes this call's rows; the notice says when only narrowing reaches more.`),
785
791
  sort: z
786
792
  .enum(['filing_date_desc', 'filing_date_asc', 'relevance'])
787
793
  .default('filing_date_desc')
788
- .describe('Result ordering. "filing_date_desc" (default) returns most recent first. "filing_date_asc" returns oldest first. "relevance" returns SEC\'s native search-score order, which weights term match strength over recency. Date sorts re-order the top 100 hits returned by the search index — for broad queries with more than 100 matches and no entity targeting, date-newest filings may sit outside that window. Entity targeting (ticker:/cik:) or a narrower query keeps matches inside the window when absolute recency matters. On the no-query browse path (forms/entity only), EFTS has no relevance signal — every hit scores null — and returns filings in natural date-descending order, so all sort modes effectively yield newest-first. Pre-2001 archive results carry no relevance score either, so relevance collapses to date-descending there.'),
794
+ .describe('"filing_date_desc" (default, newest first), "filing_date_asc", or "relevance" (SEC\'s search score). Date sorts reorder the top 100 hits, so a broad search without ticker:/cik: scope can miss newer filings past them. A no-query browse and pre-2001 rows have no score; there relevance is newest first.'),
789
795
  }),
790
796
  // This tool's former date spellings, and other spellings in use across tools (#115):
791
797
  // company_search names its filing count filing_limit (#212).
@@ -808,6 +814,10 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
808
814
  .number()
809
815
  .optional()
810
816
  .describe("EDGAR's count of matching full-text documents, capped at 10,000; a search counts a filing once per matching document, a browse one document per filing. Absent on pure pre-2001 archive paths."),
817
+ next_offset: z
818
+ .number()
819
+ .optional()
820
+ .describe("The next page's offset (documents under sort=relevance). Absent on the last page or when only narrowing reaches more."),
811
821
  results: z
812
822
  .array(z
813
823
  .object({
@@ -815,7 +825,7 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
815
825
  form: z
816
826
  .string()
817
827
  .optional()
818
- .describe('Form type (e.g. "10-K"). Absent for hits where the index lacks a form tag.'),
828
+ .describe('Form type (e.g. "10-K"). Absent when the index has none.'),
819
829
  filing_date: z.string().describe('Date the filing was submitted (YYYY-MM-DD).'),
820
830
  period_ending: z
821
831
  .string()
@@ -846,7 +856,7 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
846
856
  })
847
857
  .describe('One document of this filing that matched the query.'))
848
858
  .optional()
849
- .describe('Documents of this filing that matched, in rank order; the dataframe holds their filenames as a comma-separated column.'),
859
+ .describe('Documents of this filing that matched, in rank order; a comma-separated filename column in the dataframe.'),
850
860
  sic: z
851
861
  .string()
852
862
  .optional()
@@ -858,7 +868,7 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
858
868
  source: z
859
869
  .enum(['efts', 'submissions', 'full-index'])
860
870
  .optional()
861
- .describe('"efts" (2001+ full-text), "submissions" (pre-2001 entity history), or "full-index" (pre-2001 quarterly index). A range crossing 2001-01-01 mixes sources; total sums its archive rows and the filings of one 100-document full-text window. Also a dataframe column.'),
871
+ .describe('"efts" (2001+ full-text), "submissions" (pre-2001 entity history), or "full-index" (pre-2001 quarterly index). A range crossing 2001-01-01 mixes sources; total sums its archive rows and the filings of one 100-document full-text window.'),
862
872
  })
863
873
  .describe('One matching filing. period_ending, ticker, file_description, matched_documents, sic, and location are absent on pre-2001 archive rows (source submissions or full-index).'))
864
874
  .describe('Matching filings.'),
@@ -876,7 +886,7 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
876
886
  .describe('True when candidates exceeded the 50-document cap; unread filings may match, so narrow forms or dates.'),
877
887
  })
878
888
  .optional()
879
- .describe("Pre-2001 entity-scoped free-text path only. Each candidate's whole accession .txt is read, so a match may sit in an exhibit, not the requested form's body."),
889
+ .describe("Pre-2001 entity-scoped free-text path only; each candidate's whole accession .txt is read, so a match may sit in an exhibit."),
880
890
  dataset: datasetSchema
881
891
  .extend({
882
892
  truncated: z
@@ -1076,6 +1086,24 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
1076
1086
  ? rows.slice(input.offset, input.offset + limit)
1077
1087
  : rows.slice(0, collapseEftsHits(response.hits.hits.slice(0, limit)).length);
1078
1088
  const results = pageRows.map(toInlineResult);
1089
+ // The next page in this path's `offset` unit, named only when that offset returns rows
1090
+ // (#259). Under sort=relevance it is a document offset EDGAR serves, short of a total it
1091
+ // calls exact — never offset plus the documents fetched, since EDGAR answers up to 100
1092
+ // from `from` whatever `size` asks; elsewhere a row of the one window this call sorted.
1093
+ // `unreachable` marks matches no offset reaches: past that one window, or past the
1094
+ // deepest relevance page EDGAR serves.
1095
+ const pageEnd = input.offset + limit;
1096
+ const documentsPastPage = response.hits.total.relation !== 'eq' || pageEnd < totalDocuments;
1097
+ const nextOffset = wideFetch
1098
+ ? pageEnd < rows.length
1099
+ ? pageEnd
1100
+ : undefined
1101
+ : documentsPastPage && pageEnd <= MAX_RELEVANCE_OFFSET
1102
+ ? pageEnd
1103
+ : undefined;
1104
+ const unreachable = wideFetch
1105
+ ? !windowComplete
1106
+ : documentsPastPage && pageEnd > MAX_RELEVANCE_OFFSET;
1079
1107
  // The filings in hand — the rows the dataframe holds. EFTS's own form_filter
1080
1108
  // aggregation counts documents by root form (amendments folded in), so it
1081
1109
  // describes neither these rows nor `total` (#6, #124).
@@ -1119,6 +1147,8 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
1119
1147
  ? `${searched} (filed ${dates.startDate} to ${dates.endDate})`
1120
1148
  : searched;
1121
1149
  ctx.enrich.echo(effectiveQuery);
1150
+ // EDGAR caps its count at 10,000 and calls it `gte` there: a floor, not the count.
1151
+ const documentCount = `${totalDocuments}${response.hits.total.relation === 'eq' ? '' : '+'}`;
1122
1152
  if (totalDocuments === 0) {
1123
1153
  // Genuine no-match — EFTS returned zero hits. Echo all active criteria; on the
1124
1154
  // browse path (no query text) lead with the form/entity criteria instead of an
@@ -1153,38 +1183,53 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
1153
1183
  : 'switch to sort=relevance for EDGAR-side pagination up to 10,000 matching documents, or narrow the search with forms, dates, or entity targeting';
1154
1184
  ctx.enrich.notice((windowComplete
1155
1185
  ? `Offset (${input.offset}) exceeds the ${rows.length} matching filings — lower the offset.`
1156
- : `Offset (${input.offset}) exceeds the ${rows.length} filings in the fetched window (the first ${fetchedDocuments} of ${totalDocuments} matching ${countsFilings ? 'filings' : 'documents'} — date sorts and entity targeting fetch a single window): ${deeperPaging}.`) +
1186
+ : `Offset (${input.offset}) exceeds the ${rows.length} filings in the fetched window (the first ${fetchedDocuments} of ${documentCount} matching ${countsFilings ? 'filings' : 'documents'} — date sorts and entity targeting fetch a single window): ${deeperPaging}.`) +
1157
1187
  (dataset ? ` ${dataframeGuidance(dataset)}` : ''));
1158
1188
  }
1159
- else if (total > results.length || !totalIsExact) {
1160
- // `notice` is last-wins across notice/truncated, so the window boundary and the
1161
- // dataframe pointer compose into one guidance string (#104).
1189
+ else if (nextOffset !== undefined || unreachable) {
1190
+ // `notice` is last-wins across notice/truncated, so the next page, the window
1191
+ // boundary, and the dataframe pointer compose into one guidance string (#104).
1162
1192
  const guidance = [];
1163
- if (!windowComplete) {
1164
- const reach = entityCik
1165
- ? 'narrow with forms or dates'
1166
- : 'switch to sort=relevance to page deeper, or narrow with forms, dates, or entity targeting';
1167
- const ofTotal = `${total}${totalIsExact ? '' : '+'} matching filings`;
1168
- guidance.push(countsFilings
1169
- ? wideFetch
1193
+ const ofTotal = `${total}${totalIsExact ? '' : '+'} matching filings`;
1194
+ const ofDocuments = `${documentCount} matching documents`;
1195
+ if (wideFetch) {
1196
+ if (nextOffset !== undefined)
1197
+ guidance.push(`Page on with offset ${nextOffset}.`);
1198
+ if (unreachable) {
1199
+ const reach = entityCik
1200
+ ? 'narrow with forms or dates'
1201
+ : 'switch to sort=relevance to page deeper, or narrow with forms, dates, or entity targeting';
1202
+ guidance.push(countsFilings
1170
1203
  ? `The rows fetched are the first ${rows.length} of ${ofTotal} — ${reach} to reach the rest.`
1171
- : `The rows fetched are the ${rows.length} filings from offset ${input.offset} of ${ofTotal} — page on with offset.`
1172
- : wideFetch
1173
- ? `total counts the filings among the first ${fetchedDocuments} of ${totalDocuments} matching documents — ${reach} to reach the rest.`
1174
- : `total counts the filings among the ${fetchedDocuments} documents fetched from offset ${input.offset} of ${totalDocuments} matching documents — page on with offset, which counts documents under sort=relevance, so a filing can recur on the next page.`);
1204
+ : `total counts the filings among the first ${fetchedDocuments} of ${ofDocuments} — ${reach} to reach the rest.`);
1205
+ }
1206
+ }
1207
+ else {
1208
+ const fetched = countsFilings
1209
+ ? `The rows fetched are the ${rows.length} filings from offset ${input.offset} of ${ofTotal}`
1210
+ : `total counts the filings among the ${fetchedDocuments} documents fetched from offset ${input.offset} of ${ofDocuments}`;
1211
+ const recur = countsFilings
1212
+ ? ''
1213
+ : ', which counts documents under sort=relevance, so a filing can recur on the next page';
1214
+ // A page from 0 whose window held every match has nothing to qualify about total.
1215
+ guidance.push(nextOffset === undefined
1216
+ ? `${fetched} — EDGAR serves no sort=relevance page past offset ${MAX_RELEVANCE_OFFSET}, so narrow the search with a shorter filed_after/filed_before window, a forms filter, or more specific terms to reach the rest.`
1217
+ : windowComplete
1218
+ ? `Page on with offset ${nextOffset}${recur}.`
1219
+ : `${fetched} — page on with offset ${nextOffset}${recur}.`);
1175
1220
  }
1176
1221
  if (dataset)
1177
1222
  guidance.push(dataframeGuidance(dataset));
1178
- ctx.enrich.truncated({
1179
- shown: results.length,
1180
- cap: limit,
1181
- ...(guidance.length > 0 && { guidance: guidance.join(' ') }),
1182
- });
1223
+ ctx.enrich.truncated({ shown: results.length, cap: limit, guidance: guidance.join(' ') });
1224
+ }
1225
+ else if (dataset) {
1226
+ ctx.enrich.notice(dataframeGuidance(dataset));
1183
1227
  }
1184
1228
  return {
1185
1229
  total,
1186
1230
  total_is_exact: totalIsExact,
1187
1231
  total_documents: totalDocuments,
1232
+ next_offset: nextOffset,
1188
1233
  results,
1189
1234
  form_distribution: formDistribution,
1190
1235
  dataset,
@@ -1201,6 +1246,9 @@ export const searchFilingsTool = tool('secedgar_search_filings', {
1201
1246
  ? ''
1202
1247
  : ` — ${result.total_documents}${result.total_documents >= 10_000 ? '+' : ''} matching documents in the full-text index`;
1203
1248
  const lines = [`Found ${result.total} filings (${exactness})${documents}`];
1249
+ if (result.next_offset !== undefined) {
1250
+ lines.push(`Next offset: ${result.next_offset} — pass as offset to read the next page.`);
1251
+ }
1204
1252
  // Names, descriptions, filenames, and locations are SEC text, escaped to read back as written.
1205
1253
  for (const r of result.results) {
1206
1254
  const period = r.period_ending ? ` (period: ${r.period_ending})` : '';