@cyanheads/secedgar-mcp-server 0.20.0 → 0.21.0

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 (128) hide show
  1. package/AGENTS.md +41 -33
  2. package/CLAUDE.md +41 -33
  3. package/README.md +37 -16
  4. package/changelog/0.20.x/0.20.1.md +39 -0
  5. package/changelog/0.21.x/0.21.0.md +35 -0
  6. package/changelog/template.md +10 -8
  7. package/dist/index.js +2 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js +3 -3
  10. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js.map +1 -1
  11. package/dist/mcp-server/tools/annual-report-reads.d.ts +50 -0
  12. package/dist/mcp-server/tools/annual-report-reads.d.ts.map +1 -0
  13. package/dist/mcp-server/tools/annual-report-reads.js +141 -0
  14. package/dist/mcp-server/tools/annual-report-reads.js.map +1 -0
  15. package/dist/mcp-server/tools/calendar-quarter.d.ts +22 -0
  16. package/dist/mcp-server/tools/calendar-quarter.d.ts.map +1 -0
  17. package/dist/mcp-server/tools/calendar-quarter.js +34 -0
  18. package/dist/mcp-server/tools/calendar-quarter.js.map +1 -0
  19. package/dist/mcp-server/tools/definitions/company-search.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/company-search.tool.js +11 -22
  21. package/dist/mcp-server/tools/definitions/company-search.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts +12 -2
  23. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/compare-companies.tool.js +153 -48
  25. package/dist/mcp-server/tools/definitions/compare-companies.tool.js.map +1 -1
  26. package/dist/mcp-server/tools/definitions/dataframe-query.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/dataframe-query.tool.js +28 -5
  28. package/dist/mcp-server/tools/definitions/dataframe-query.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/fetch-frames.tool.d.ts.map +1 -1
  30. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js +4 -2
  31. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/find-holders.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/find-holders.tool.js +12 -19
  34. package/dist/mcp-server/tools/definitions/find-holders.tool.js.map +1 -1
  35. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.d.ts +24 -9
  36. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js +126 -47
  38. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js.map +1 -1
  39. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts +24 -2
  40. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-filing.tool.js +370 -92
  42. package/dist/mcp-server/tools/definitions/get-filing.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts.map +1 -1
  44. package/dist/mcp-server/tools/definitions/get-financials.tool.js +127 -44
  45. package/dist/mcp-server/tools/definitions/get-financials.tool.js.map +1 -1
  46. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.d.ts.map +1 -1
  47. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.js +5 -6
  48. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.js.map +1 -1
  49. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts +42 -2
  50. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts.map +1 -1
  51. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js +525 -134
  52. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js.map +1 -1
  53. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.d.ts +12 -0
  54. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.d.ts.map +1 -1
  55. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js +21 -36
  56. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js.map +1 -1
  57. package/dist/mcp-server/tools/definitions/get-material-events.tool.d.ts +15 -0
  58. package/dist/mcp-server/tools/definitions/get-material-events.tool.d.ts.map +1 -1
  59. package/dist/mcp-server/tools/definitions/get-material-events.tool.js +108 -55
  60. package/dist/mcp-server/tools/definitions/get-material-events.tool.js.map +1 -1
  61. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts +5 -0
  62. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts.map +1 -1
  63. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js +70 -37
  64. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js.map +1 -1
  65. package/dist/mcp-server/tools/definitions/index.d.ts +282 -219
  66. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  67. package/dist/mcp-server/tools/definitions/search-concepts.tool.d.ts.map +1 -1
  68. package/dist/mcp-server/tools/definitions/search-concepts.tool.js +16 -11
  69. package/dist/mcp-server/tools/definitions/search-concepts.tool.js.map +1 -1
  70. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts +18 -0
  71. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts.map +1 -1
  72. package/dist/mcp-server/tools/definitions/search-filings.tool.js +130 -68
  73. package/dist/mcp-server/tools/definitions/search-filings.tool.js.map +1 -1
  74. package/dist/mcp-server/tools/filing-dates.d.ts +46 -0
  75. package/dist/mcp-server/tools/filing-dates.d.ts.map +1 -0
  76. package/dist/mcp-server/tools/filing-dates.js +93 -0
  77. package/dist/mcp-server/tools/filing-dates.js.map +1 -0
  78. package/dist/mcp-server/tools/limit-clamp.d.ts.map +1 -1
  79. package/dist/mcp-server/tools/limit-clamp.js +6 -2
  80. package/dist/mcp-server/tools/limit-clamp.js.map +1 -1
  81. package/dist/services/edgar/body-text-decoder.d.ts +33 -0
  82. package/dist/services/edgar/body-text-decoder.d.ts.map +1 -0
  83. package/dist/services/edgar/body-text-decoder.js +103 -0
  84. package/dist/services/edgar/body-text-decoder.js.map +1 -0
  85. package/dist/services/edgar/call-scope.d.ts +13 -1
  86. package/dist/services/edgar/call-scope.d.ts.map +1 -1
  87. package/dist/services/edgar/call-scope.js +4 -1
  88. package/dist/services/edgar/call-scope.js.map +1 -1
  89. package/dist/services/edgar/concept-map.d.ts.map +1 -1
  90. package/dist/services/edgar/concept-map.js +88 -14
  91. package/dist/services/edgar/concept-map.js.map +1 -1
  92. package/dist/services/edgar/concept-series.d.ts +111 -1
  93. package/dist/services/edgar/concept-series.d.ts.map +1 -1
  94. package/dist/services/edgar/concept-series.js +196 -1
  95. package/dist/services/edgar/concept-series.js.map +1 -1
  96. package/dist/services/edgar/edgar-api-service.d.ts +2 -12
  97. package/dist/services/edgar/edgar-api-service.d.ts.map +1 -1
  98. package/dist/services/edgar/edgar-api-service.js +30 -39
  99. package/dist/services/edgar/edgar-api-service.js.map +1 -1
  100. package/dist/services/edgar/eight-k-items.d.ts +19 -1
  101. package/dist/services/edgar/eight-k-items.d.ts.map +1 -1
  102. package/dist/services/edgar/eight-k-items.js +24 -1
  103. package/dist/services/edgar/eight-k-items.js.map +1 -1
  104. package/dist/services/edgar/filing-to-text.d.ts +29 -10
  105. package/dist/services/edgar/filing-to-text.d.ts.map +1 -1
  106. package/dist/services/edgar/filing-to-text.js +605 -53
  107. package/dist/services/edgar/filing-to-text.js.map +1 -1
  108. package/dist/services/edgar/fiscal-periods.d.ts +2 -0
  109. package/dist/services/edgar/fiscal-periods.d.ts.map +1 -1
  110. package/dist/services/edgar/fiscal-periods.js +1 -1
  111. package/dist/services/edgar/fiscal-periods.js.map +1 -1
  112. package/dist/services/edgar/form4-amendments.d.ts +63 -0
  113. package/dist/services/edgar/form4-amendments.d.ts.map +1 -0
  114. package/dist/services/edgar/form4-amendments.js +99 -0
  115. package/dist/services/edgar/form4-amendments.js.map +1 -0
  116. package/dist/services/edgar/mirror/companyfacts-sync.d.ts +6 -1
  117. package/dist/services/edgar/mirror/companyfacts-sync.d.ts.map +1 -1
  118. package/dist/services/edgar/mirror/companyfacts-sync.js +29 -6
  119. package/dist/services/edgar/mirror/companyfacts-sync.js.map +1 -1
  120. package/dist/services/edgar/ownership-parser.d.ts +5 -0
  121. package/dist/services/edgar/ownership-parser.d.ts.map +1 -1
  122. package/dist/services/edgar/ownership-parser.js +3 -0
  123. package/dist/services/edgar/ownership-parser.js.map +1 -1
  124. package/dist/services/edgar/types.d.ts +12 -7
  125. package/dist/services/edgar/types.d.ts.map +1 -1
  126. package/package.json +8 -8
  127. package/server.json +3 -3
  128. package/skills/secedgar-guide/SKILL.md +22 -5
@@ -30,129 +30,169 @@ export interface ToolDefinitionOptions extends LimitClampOptions {
30
30
  * it is present, so the manifest's tool count matches the documented surface.
31
31
  */
32
32
  export declare function buildToolDefinitions(options: ToolDefinitionOptions): (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
33
- name: import("zod").ZodOptional<import("zod").ZodString>;
33
+ sql: import("zod").ZodString;
34
+ register_as: import("zod").ZodOptional<import("zod").ZodString>;
35
+ preview: import("zod").ZodOptional<import("zod").ZodNumber>;
36
+ row_limit: import("zod").ZodDefault<import("zod").ZodNumber>;
34
37
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
35
- dataframes: import("zod").ZodArray<import("zod").ZodObject<{
36
- name: import("zod").ZodString;
37
- source_tool: import("zod").ZodString;
38
- query_params: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
39
- created_at: import("zod").ZodString;
40
- expires_at: import("zod").ZodString;
41
- row_count: import("zod").ZodNumber;
42
- truncated: import("zod").ZodBoolean;
43
- max_rows: import("zod").ZodOptional<import("zod").ZodNumber>;
44
- column_schema: import("zod").ZodArray<import("zod").ZodObject<{
45
- name: import("zod").ZodString;
46
- type: import("zod").ZodString;
47
- nullable: import("zod").ZodBoolean;
48
- }, import("zod/v4/core").$strip>>;
49
- }, import("zod/v4/core").$strip>>;
38
+ columns: import("zod").ZodArray<import("zod").ZodString>;
39
+ row_count: import("zod").ZodNumber;
40
+ row_count_capped: import("zod").ZodBoolean;
41
+ rows: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
42
+ registered_as: import("zod").ZodOptional<import("zod").ZodString>;
43
+ expires_at: import("zod").ZodOptional<import("zod").ZodString>;
50
44
  }, import("zod/v4/core").$strip>, readonly [{
51
45
  readonly reason: "canvas_unavailable";
52
46
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
53
47
  readonly when: "The DataCanvas service is not configured for this deployment";
54
48
  readonly recovery: "Dataframes need the DuckDB canvas. On an npm or Docker install, set CANVAS_PROVIDER_TYPE=duckdb (the default when unset) and restart the server; the MCPB bundle ships without DuckDB, so there the data tools return their results inline and stage no dataframe.";
55
49
  }, {
56
- readonly reason: "listing_unavailable";
57
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
58
- readonly when: "name is omitted or empty over HTTP with auth none, where every caller shares one canvas";
59
- readonly recovery: "Pass the exact df_XXXXX_XXXXX name the producing tool returned in its `dataset` field, or the register_as name you chose; this deployment does not list dataframes.";
60
- readonly severity: "notice";
61
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
50
+ readonly reason: "system_catalog_access";
51
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
52
+ readonly when: "The SQL query references a denied DuckDB system catalog (information_schema, pg_catalog, sqlite_master, duckdb_*), or names a column alias, table alias, or CTE spelled like one";
53
+ readonly recovery: "Query only the df_<id> tables, by the name the producing tool returned in its `dataset` field; a column alias, table alias, or CTE named like a DuckDB metadata view (the name the message gives) is refused too, so rename it.";
54
+ readonly thrownBy: "service";
55
+ }, {
56
+ readonly reason: "missing_table";
57
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
58
+ readonly when: "The SQL query references a df_<id> table that does not exist or has expired";
59
+ readonly recovery: "Reference the df_<id> name the producing tool returned in its `dataset` field, or a register_as name, and re-run that tool if the table expired. secedgar_dataframe_describe without a name lists the active dataframes, except over HTTP with auth none, where that listing is refused.";
60
+ readonly thrownBy: "service";
61
+ }, {
62
+ readonly reason: "invalid_sql";
63
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
64
+ readonly when: "The SELECT fails to prepare — an unknown column or an invalid expression — or hits an engine error no more specific reason covers";
65
+ readonly recovery: "Check SQL syntax, column names, and table references against secedgar_dataframe_describe.";
66
+ readonly thrownBy: "service";
67
+ }, {
68
+ readonly reason: "sql_execution_error";
69
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
70
+ readonly when: "The SELECT prepared but failed on the data it read — a cast or conversion that does not fit, an out-of-range value, or invalid input to a function";
71
+ readonly recovery: "Wrap the failing cast in TRY_CAST, or filter out the rows the error message names before converting them.";
72
+ readonly thrownBy: "service";
73
+ }, {
74
+ readonly reason: "register_as_clash";
75
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
76
+ readonly when: "The register_as target name already exists on the canvas";
77
+ readonly recovery: "Drop the existing dataframe with secedgar_dataframe_drop (when enabled), choose a different df_XXXXX_XXXXX name, or omit register_as.";
78
+ readonly thrownBy: "service";
79
+ }, {
80
+ readonly reason: "non_select_statement";
81
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
82
+ readonly when: "The SQL is not a SELECT (DROP, INSERT, UPDATE, DDL, PRAGMA, EXPLAIN, etc.) or does not parse — only read-only SELECTs run against dataframes";
83
+ readonly recovery: "Rewrite as one read-only SELECT over the df_<id> tables; writes, DDL, and other statements that are not a SELECT are refused.";
84
+ readonly thrownBy: "service";
85
+ }, {
86
+ readonly reason: "multi_statement";
87
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
88
+ readonly when: "The SQL holds more than one statement";
89
+ readonly recovery: "Send exactly one SELECT statement per call, and split multi-statement SQL into separate calls.";
90
+ readonly thrownBy: "service";
91
+ }, {
92
+ readonly reason: "denied_function";
93
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
94
+ readonly when: "The SQL calls a file-reading or external-data table function (read_csv, read_parquet, glob), a function that reads an engine setting (current_setting, current_schema — an unqualified current_schema is refused even where it names a column, which reads qualified as <table>.current_schema), or one that runs SQL or names a table from a string (query_table, or query() over anything but a single string literal)";
95
+ readonly recovery: "Remove the function the message names, or qualify a column it names with its table, and query only the df_<id> tables the data tools returned.";
96
+ readonly thrownBy: "service";
97
+ }, {
98
+ readonly reason: "sql_read_only";
99
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
100
+ readonly when: "The SQL names a file as a table (FROM 'data.csv') — the dataframe engine reads no files";
101
+ readonly recovery: "Query only the df_<id> tables, by the name the producing tool returned in its `dataset` field, referenced by bare name; this surface reads no files and cannot create, alter, or drop anything.";
102
+ readonly thrownBy: "service";
103
+ }, {
104
+ readonly reason: "plan_operator_not_allowed";
105
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
106
+ readonly when: "The query plan uses an operator outside the read-only allowlist, such as range() or generate_series() given a column or subquery argument instead of constants";
107
+ readonly recovery: "Rewrite with read-only SELECT constructs — joins, aggregates, window functions, CTEs, unnest(), and range() or generate_series() over constant arguments are supported.";
108
+ readonly thrownBy: "service";
109
+ }], {
110
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
111
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
112
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
113
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
114
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
62
115
  company: import("zod").ZodString;
63
- quarter: import("zod").ZodOptional<import("zod").ZodString>;
116
+ role: import("zod").ZodDefault<import("zod").ZodEnum<{
117
+ issuer: "issuer";
118
+ reporting_owner: "reporting_owner";
119
+ }>>;
120
+ transaction_type: import("zod").ZodDefault<import("zod").ZodEnum<{
121
+ all: "all";
122
+ purchase: "purchase";
123
+ sale: "sale";
124
+ }>>;
64
125
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
65
- offset: import("zod").ZodDefault<import("zod").ZodNumber>;
66
- consolidate: import("zod").ZodDefault<import("zod").ZodBoolean>;
126
+ filed_after: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
127
+ filed_before: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
67
128
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
68
- filer_name: import("zod").ZodString;
69
- filer_cik: import("zod").ZodString;
70
- reporting_period: import("zod").ZodOptional<import("zod").ZodString>;
71
- filing_date: import("zod").ZodString;
72
- accession_number: import("zod").ZodString;
73
- amendments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
74
- accession_number: import("zod").ZodString;
129
+ issuer_name: import("zod").ZodString;
130
+ issuer_cik: import("zod").ZodString;
131
+ issuer_ticker: import("zod").ZodOptional<import("zod").ZodString>;
132
+ role: import("zod").ZodOptional<import("zod").ZodLiteral<"reporting_owner">>;
133
+ transactions: import("zod").ZodArray<import("zod").ZodObject<{
75
134
  filing_date: import("zod").ZodString;
76
- applied_as: import("zod").ZodEnum<{
77
- new_holdings: "new_holdings";
78
- not_applied: "not_applied";
79
- restatement: "restatement";
80
- superseded: "superseded";
81
- }>;
82
- amendment_type: import("zod").ZodEnum<{
83
- "NEW HOLDINGS": "NEW HOLDINGS";
84
- RESTATEMENT: "RESTATEMENT";
85
- }>;
86
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
135
+ period_of_report: import("zod").ZodOptional<import("zod").ZodString>;
87
136
  accession_number: import("zod").ZodString;
88
- filing_date: import("zod").ZodString;
89
- applied_as: import("zod").ZodEnum<{
90
- new_holdings: "new_holdings";
91
- not_applied: "not_applied";
92
- restatement: "restatement";
93
- superseded: "superseded";
94
- }>;
95
- amendment_type: import("zod").ZodLiteral<"UNAVAILABLE">;
96
- unavailable_reason: import("zod").ZodEnum<{
97
- lookup_failed: "lookup_failed";
98
- lookup_stopped: "lookup_stopped";
99
- missing_header: "missing_header";
100
- unreadable_header: "unreadable_header";
137
+ form: import("zod").ZodEnum<{
138
+ 4: "4";
139
+ "4/A": "4/A";
101
140
  }>;
102
- }, import("zod/v4/core").$strip>], "amendment_type">>>;
103
- amendment_search_complete: import("zod").ZodOptional<import("zod").ZodBoolean>;
104
- composed_accessions: import("zod").ZodArray<import("zod").ZodString>;
105
- total_holdings_in_filing: import("zod").ZodNumber;
106
- total_holdings_composed: import("zod").ZodNumber;
107
- total_positions: import("zod").ZodOptional<import("zod").ZodNumber>;
108
- offset: import("zod").ZodNumber;
109
- next_offset: import("zod").ZodOptional<import("zod").ZodNumber>;
110
- holdings: import("zod").ZodArray<import("zod").ZodObject<{
111
- issuer_name: import("zod").ZodString;
112
- title_of_class: import("zod").ZodOptional<import("zod").ZodString>;
113
- cusip: import("zod").ZodOptional<import("zod").ZodString>;
114
- market_value_usd: import("zod").ZodOptional<import("zod").ZodNumber>;
115
- shares_or_principal_amount: import("zod").ZodOptional<import("zod").ZodNumber>;
116
- shares_or_principal_type: import("zod").ZodOptional<import("zod").ZodEnum<{
117
- PRN: "PRN";
118
- SH: "SH";
119
- }>>;
120
- put_call: import("zod").ZodOptional<import("zod").ZodEnum<{
121
- Call: "Call";
122
- Put: "Put";
141
+ amends_filing_date: import("zod").ZodOptional<import("zod").ZodString>;
142
+ amended_by: import("zod").ZodOptional<import("zod").ZodString>;
143
+ reporting_person: import("zod").ZodString;
144
+ reporting_person_cik: import("zod").ZodOptional<import("zod").ZodString>;
145
+ relationship: import("zod").ZodString;
146
+ joint_filers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
147
+ name: import("zod").ZodString;
148
+ cik: import("zod").ZodOptional<import("zod").ZodString>;
149
+ relationship: import("zod").ZodString;
150
+ }, import("zod/v4/core").$strip>>>;
151
+ issuer_cik: import("zod").ZodOptional<import("zod").ZodString>;
152
+ issuer_name: import("zod").ZodOptional<import("zod").ZodString>;
153
+ issuer_ticker: import("zod").ZodOptional<import("zod").ZodString>;
154
+ security_title: import("zod").ZodString;
155
+ transaction_date: import("zod").ZodOptional<import("zod").ZodString>;
156
+ transaction_code: import("zod").ZodString;
157
+ transaction_type: import("zod").ZodString;
158
+ is_derivative: import("zod").ZodBoolean;
159
+ shares_traded: import("zod").ZodOptional<import("zod").ZodNumber>;
160
+ direction: import("zod").ZodOptional<import("zod").ZodEnum<{
161
+ acquire: "acquire";
162
+ dispose: "dispose";
123
163
  }>>;
124
- investment_discretion: import("zod").ZodOptional<import("zod").ZodEnum<{
125
- DFND: "DFND";
126
- OTR: "OTR";
127
- SOLE: "SOLE";
164
+ price_per_share: import("zod").ZodOptional<import("zod").ZodNumber>;
165
+ shares_owned_after: import("zod").ZodOptional<import("zod").ZodNumber>;
166
+ ownership_type: import("zod").ZodOptional<import("zod").ZodEnum<{
167
+ direct: "direct";
168
+ indirect: "indirect";
128
169
  }>>;
129
- source_accession_numbers: import("zod").ZodArray<import("zod").ZodString>;
170
+ ownership_nature: import("zod").ZodOptional<import("zod").ZodString>;
130
171
  }, import("zod/v4/core").$strip>>;
172
+ filings_scanned: import("zod").ZodNumber;
173
+ filings_other_issuer: import("zod").ZodNumber;
174
+ history_scanned_through: import("zod").ZodOptional<import("zod").ZodString>;
131
175
  dataset: import("zod").ZodOptional<import("zod").ZodObject<{
132
176
  name: import("zod").ZodString;
133
177
  row_count: import("zod").ZodNumber;
134
178
  expires_at: import("zod").ZodString;
179
+ truncated: import("zod").ZodBoolean;
135
180
  }, import("zod/v4/core").$strip>>;
136
181
  }, import("zod/v4/core").$strip>, readonly [{
137
182
  readonly reason: "company_not_found";
138
183
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
139
- readonly when: "The company input does not resolve to a known company or institution";
140
- readonly recovery: "Use secedgar_company_search to find the correct CIK or full entity name.";
184
+ readonly when: "The company input does not resolve to a known company";
185
+ readonly recovery: "Use secedgar_company_search to find the correct ticker or CIK.";
141
186
  }, {
142
- readonly reason: "ambiguous_entity";
187
+ readonly reason: "ambiguous_company";
143
188
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
144
- readonly when: "The name resolves to multiple EDGAR entities (e.g. several filers sharing a legal name)";
145
- readonly recovery: "Retry with the exact 10-digit CIK of the intended filer from the matches list.";
189
+ readonly when: "The company input resolves to multiple entities and the target is ambiguous";
190
+ readonly recovery: "Use a ticker symbol or 10-digit CIK from the matches list for an exact match.";
146
191
  }, {
147
192
  readonly reason: "no_filings_found";
148
193
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
149
- 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, with no quarter the recent window holds only 13F-HR/A amendments, 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)";
150
- readonly recovery: "Use secedgar_search_filings with forms=[\"13F-HR\"] for broader search, or check that the entity is an institutional investment manager.";
151
- }, {
152
- readonly reason: "no_info_table";
153
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
154
- readonly when: "The 13F-HR filing was found but the information table XML document could not be located";
155
- readonly recovery: "Use secedgar_get_filing with the accession number to inspect the filing documents directly.";
194
+ 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";
195
+ readonly recovery: "Pass filed_after / filed_before to read an older period, or use secedgar_search_filings with forms=[\"4\"] to find the filings.";
156
196
  }, {
157
197
  readonly reason: 'rate_limited';
158
198
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
@@ -174,13 +214,6 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
174
214
  readonly recovery: 'Retry the same call in a minute — SEC EDGAR failed on its side, and nothing in the request needs to change.';
175
215
  readonly retryable: true;
176
216
  readonly thrownBy: 'service';
177
- }, {
178
- readonly reason: 'efts_degraded_response';
179
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
180
- readonly when: 'EDGAR full-text search answered without results — its search backend failed to run the search on every attempt made (a connection or timeout failure, retried like a request SEC never answered), refused the request (upstreamErrorType and upstreamErrorMessage carry its error, and the request is not retried), or sent a payload with no hit list';
181
- readonly recovery: 'Retry the same call in a minute unless the error is marked not retryable; then change the request as upstreamErrorMessage indicates.';
182
- readonly retryable: true;
183
- readonly thrownBy: 'service';
184
217
  }], {
185
218
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
186
219
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -282,6 +315,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
282
315
  total: import("zod").ZodNumber;
283
316
  total_is_exact: import("zod").ZodBoolean;
284
317
  total_documents: import("zod").ZodOptional<import("zod").ZodNumber>;
318
+ next_offset: import("zod").ZodOptional<import("zod").ZodNumber>;
285
319
  results: import("zod").ZodArray<import("zod").ZodObject<{
286
320
  accession_number: import("zod").ZodString;
287
321
  form: import("zod").ZodOptional<import("zod").ZodString>;
@@ -295,6 +329,14 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
295
329
  name: import("zod").ZodString;
296
330
  type: import("zod").ZodOptional<import("zod").ZodString>;
297
331
  }, import("zod/v4/core").$strip>>>;
332
+ items: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
333
+ code: import("zod").ZodString;
334
+ label: import("zod").ZodOptional<import("zod").ZodString>;
335
+ regime: import("zod").ZodOptional<import("zod").ZodEnum<{
336
+ current: "current";
337
+ legacy: "legacy";
338
+ }>>;
339
+ }, import("zod/v4/core").$strip>>>;
298
340
  sic: import("zod").ZodOptional<import("zod").ZodString>;
299
341
  location: import("zod").ZodOptional<import("zod").ZodString>;
300
342
  source: import("zod").ZodOptional<import("zod").ZodEnum<{
@@ -412,6 +454,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
412
454
  company_name: import("zod").ZodOptional<import("zod").ZodString>;
413
455
  cik: import("zod").ZodString;
414
456
  period_ending: import("zod").ZodOptional<import("zod").ZodString>;
457
+ later_filings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
458
+ accession_number: import("zod").ZodString;
459
+ form: import("zod").ZodString;
460
+ filing_date: import("zod").ZodString;
461
+ }, import("zod/v4/core").$strip>>>;
415
462
  primary_document: import("zod").ZodString;
416
463
  requested_document: import("zod").ZodOptional<import("zod").ZodString>;
417
464
  documents: import("zod").ZodObject<{
@@ -476,8 +523,14 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
476
523
  }, {
477
524
  readonly reason: "filing_not_found";
478
525
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
479
- readonly when: "No filing matches the accession number under any candidate CIK";
526
+ 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
527
  readonly recovery: "Verify the accession number and pass the company CIK explicitly.";
528
+ }, {
529
+ readonly reason: "filing_not_served";
530
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
531
+ 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";
532
+ 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.";
533
+ readonly retryable: true;
481
534
  }, {
482
535
  readonly reason: "offset_out_of_range";
483
536
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
@@ -677,6 +730,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
677
730
  label: import("zod").ZodString;
678
731
  group: import("zod").ZodString;
679
732
  tags_tried: import("zod").ZodArray<import("zod").ZodString>;
733
+ retry_taxonomy: import("zod").ZodOptional<import("zod").ZodEnum<{
734
+ "ifrs-full": "ifrs-full";
735
+ "us-gaap": "us-gaap";
736
+ }>>;
737
+ retry_tag: import("zod").ZodOptional<import("zod").ZodString>;
680
738
  }, import("zod/v4/core").$strip>>;
681
739
  caveats: import("zod").ZodArray<import("zod").ZodString>;
682
740
  }, import("zod/v4/core").$strip>, readonly [{
@@ -795,66 +853,105 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
795
853
  readonly resolvedAs: import("zod").ZodOptional<import("zod").ZodString>;
796
854
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
797
855
  company: import("zod").ZodString;
798
- transaction_type: import("zod").ZodDefault<import("zod").ZodEnum<{
799
- all: "all";
800
- purchase: "purchase";
801
- sale: "sale";
802
- }>>;
856
+ quarter: import("zod").ZodOptional<import("zod").ZodString>;
803
857
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
804
- filed_after: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
805
- filed_before: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
858
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
859
+ consolidate: import("zod").ZodDefault<import("zod").ZodBoolean>;
806
860
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
807
- issuer_name: import("zod").ZodString;
808
- issuer_cik: import("zod").ZodString;
809
- issuer_ticker: import("zod").ZodOptional<import("zod").ZodString>;
810
- transactions: import("zod").ZodArray<import("zod").ZodObject<{
861
+ filer_name: import("zod").ZodString;
862
+ filer_cik: import("zod").ZodString;
863
+ reporting_period: import("zod").ZodOptional<import("zod").ZodString>;
864
+ filing_date: import("zod").ZodString;
865
+ accession_number: import("zod").ZodString;
866
+ amendments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
867
+ accession_number: import("zod").ZodString;
811
868
  filing_date: import("zod").ZodString;
812
- period_of_report: import("zod").ZodOptional<import("zod").ZodString>;
869
+ applied_as: import("zod").ZodEnum<{
870
+ new_holdings: "new_holdings";
871
+ not_applied: "not_applied";
872
+ restatement: "restatement";
873
+ superseded: "superseded";
874
+ }>;
875
+ amendment_type: import("zod").ZodEnum<{
876
+ "NEW HOLDINGS": "NEW HOLDINGS";
877
+ RESTATEMENT: "RESTATEMENT";
878
+ }>;
879
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
813
880
  accession_number: import("zod").ZodString;
814
- reporting_person: import("zod").ZodString;
815
- relationship: import("zod").ZodString;
816
- security_title: import("zod").ZodString;
817
- transaction_date: import("zod").ZodOptional<import("zod").ZodString>;
818
- transaction_code: import("zod").ZodString;
819
- transaction_type: import("zod").ZodString;
820
- is_derivative: import("zod").ZodBoolean;
821
- shares_traded: import("zod").ZodOptional<import("zod").ZodNumber>;
822
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
823
- acquire: "acquire";
824
- dispose: "dispose";
881
+ filing_date: import("zod").ZodString;
882
+ applied_as: import("zod").ZodEnum<{
883
+ new_holdings: "new_holdings";
884
+ not_applied: "not_applied";
885
+ restatement: "restatement";
886
+ superseded: "superseded";
887
+ }>;
888
+ amendment_type: import("zod").ZodLiteral<"UNAVAILABLE">;
889
+ unavailable_reason: import("zod").ZodEnum<{
890
+ lookup_failed: "lookup_failed";
891
+ lookup_stopped: "lookup_stopped";
892
+ missing_header: "missing_header";
893
+ unreadable_header: "unreadable_header";
894
+ }>;
895
+ }, import("zod/v4/core").$strip>], "amendment_type">>>;
896
+ amendment_search_complete: import("zod").ZodOptional<import("zod").ZodBoolean>;
897
+ composed_accessions: import("zod").ZodArray<import("zod").ZodString>;
898
+ total_holdings_in_filing: import("zod").ZodNumber;
899
+ total_holdings_composed: import("zod").ZodNumber;
900
+ total_positions: import("zod").ZodOptional<import("zod").ZodNumber>;
901
+ offset: import("zod").ZodNumber;
902
+ next_offset: import("zod").ZodOptional<import("zod").ZodNumber>;
903
+ holdings: import("zod").ZodArray<import("zod").ZodObject<{
904
+ issuer_name: import("zod").ZodString;
905
+ title_of_class: import("zod").ZodOptional<import("zod").ZodString>;
906
+ cusip: import("zod").ZodOptional<import("zod").ZodString>;
907
+ market_value_usd: import("zod").ZodOptional<import("zod").ZodNumber>;
908
+ shares_or_principal_amount: import("zod").ZodOptional<import("zod").ZodNumber>;
909
+ shares_or_principal_type: import("zod").ZodOptional<import("zod").ZodEnum<{
910
+ PRN: "PRN";
911
+ SH: "SH";
825
912
  }>>;
826
- price_per_share: import("zod").ZodOptional<import("zod").ZodNumber>;
827
- shares_owned_after: import("zod").ZodOptional<import("zod").ZodNumber>;
828
- ownership_type: import("zod").ZodOptional<import("zod").ZodEnum<{
829
- direct: "direct";
830
- indirect: "indirect";
913
+ put_call: import("zod").ZodOptional<import("zod").ZodEnum<{
914
+ Call: "Call";
915
+ Put: "Put";
831
916
  }>>;
832
- ownership_nature: import("zod").ZodOptional<import("zod").ZodString>;
917
+ investment_discretion: import("zod").ZodOptional<import("zod").ZodEnum<{
918
+ DFND: "DFND";
919
+ OTR: "OTR";
920
+ SOLE: "SOLE";
921
+ }>>;
922
+ source_accession_numbers: import("zod").ZodArray<import("zod").ZodString>;
833
923
  }, import("zod/v4/core").$strip>>;
834
- filings_scanned: import("zod").ZodNumber;
835
- filings_other_issuer: import("zod").ZodNumber;
836
- history_scanned_through: import("zod").ZodOptional<import("zod").ZodString>;
837
924
  dataset: import("zod").ZodOptional<import("zod").ZodObject<{
838
925
  name: import("zod").ZodString;
839
926
  row_count: import("zod").ZodNumber;
840
927
  expires_at: import("zod").ZodString;
841
- truncated: import("zod").ZodBoolean;
842
928
  }, import("zod/v4/core").$strip>>;
843
929
  }, import("zod/v4/core").$strip>, readonly [{
930
+ readonly reason: "invalid_quarter";
931
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
932
+ readonly when: "The quarter input is not \"YYYY-QN\" with N from 1 to 4";
933
+ readonly recovery: "Pass quarter as \"YYYY-QN\" with N from 1 to 4 (e.g. \"2025-Q4\"), or omit it for the newest 13F-HR.";
934
+ readonly retryable: false;
935
+ }, {
844
936
  readonly reason: "company_not_found";
845
937
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
846
- readonly when: "The company input does not resolve to a known company";
847
- readonly recovery: "Use secedgar_company_search to find the correct ticker or CIK.";
938
+ readonly when: "The company input does not resolve to a known company or institution";
939
+ readonly recovery: "Use secedgar_company_search to find the correct CIK or full entity name.";
848
940
  }, {
849
- readonly reason: "ambiguous_company";
941
+ readonly reason: "ambiguous_entity";
850
942
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
851
- readonly when: "The company input resolves to multiple entities and the target is ambiguous";
852
- readonly recovery: "Use a ticker symbol or 10-digit CIK from the matches list for an exact match.";
943
+ readonly when: "The name resolves to multiple EDGAR entities (e.g. several filers sharing a legal name)";
944
+ readonly recovery: "Retry with the exact 10-digit CIK of the intended filer from the matches list.";
853
945
  }, {
854
946
  readonly reason: "no_filings_found";
855
947
  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";
857
- readonly recovery: "Pass filed_after / filed_before to read an older period, or use secedgar_search_filings with forms=[\"4\"] to find the filings.";
948
+ 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, with no quarter the recent window holds only 13F-HR/A amendments, 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)";
949
+ readonly recovery: "Use secedgar_search_filings with forms=[\"13F-HR\"] for broader search, or check that the entity is an institutional investment manager.";
950
+ }, {
951
+ readonly reason: "no_info_table";
952
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
953
+ readonly when: "The 13F-HR filing was found but the information table XML document could not be located";
954
+ readonly recovery: "Use secedgar_get_filing with the accession number to inspect the filing documents directly.";
858
955
  }, {
859
956
  readonly reason: 'rate_limited';
860
957
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
@@ -876,6 +973,13 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
876
973
  readonly recovery: 'Retry the same call in a minute — SEC EDGAR failed on its side, and nothing in the request needs to change.';
877
974
  readonly retryable: true;
878
975
  readonly thrownBy: 'service';
976
+ }, {
977
+ readonly reason: 'efts_degraded_response';
978
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
979
+ readonly when: 'EDGAR full-text search answered without results — its search backend failed to run the search on every attempt made (a connection or timeout failure, retried like a request SEC never answered), refused the request (upstreamErrorType and upstreamErrorMessage carry its error, and the request is not retried), or sent a payload with no hit list';
980
+ readonly recovery: 'Retry the same call in a minute unless the error is marked not retryable; then change the request as upstreamErrorMessage indicates.';
981
+ readonly retryable: true;
982
+ readonly thrownBy: 'service';
879
983
  }], {
880
984
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
881
985
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -963,6 +1067,10 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
963
1067
  readonly resolvedAs: import("zod").ZodOptional<import("zod").ZodString>;
964
1068
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
965
1069
  issuer: import("zod").ZodString;
1070
+ role: import("zod").ZodDefault<import("zod").ZodEnum<{
1071
+ filer: "filer";
1072
+ issuer: "issuer";
1073
+ }>>;
966
1074
  form_kind: import("zod").ZodDefault<import("zod").ZodEnum<{
967
1075
  "13D": "13D";
968
1076
  "13G": "13G";
@@ -974,6 +1082,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
974
1082
  issuer: import("zod").ZodString;
975
1083
  issuer_cik: import("zod").ZodString;
976
1084
  issuer_name: import("zod").ZodString;
1085
+ role: import("zod").ZodOptional<import("zod").ZodLiteral<"filer">>;
977
1086
  form_kind: import("zod").ZodEnum<{
978
1087
  "13D": "13D";
979
1088
  "13G": "13G";
@@ -1004,6 +1113,8 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1004
1113
  amendment_number: import("zod").ZodOptional<import("zod").ZodString>;
1005
1114
  accession_number: import("zod").ZodString;
1006
1115
  filing_date: import("zod").ZodString;
1116
+ issuer_cik: import("zod").ZodOptional<import("zod").ZodString>;
1117
+ issuer_name: import("zod").ZodOptional<import("zod").ZodString>;
1007
1118
  event_date: import("zod").ZodOptional<import("zod").ZodString>;
1008
1119
  security_class: import("zod").ZodOptional<import("zod").ZodString>;
1009
1120
  cusips: import("zod").ZodArray<import("zod").ZodString>;
@@ -1044,7 +1155,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1044
1155
  }, {
1045
1156
  readonly reason: "no_filings_found";
1046
1157
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1047
- readonly when: "The issuer has no structured SCHEDULE 13D/13G filings matching the requested form kind";
1158
+ readonly when: "No structured SCHEDULE 13D/13G matching the form filters sits on either side of the recent filings — none about the company and none it filed";
1048
1159
  readonly recovery: "Use secedgar_search_filings with forms [\"SC 13D\",\"SC 13G\"] to reach the pre-2024-12-18 text filings, then read them with secedgar_get_filing.";
1049
1160
  }, {
1050
1161
  readonly reason: 'rate_limited';
@@ -1321,6 +1432,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1321
1432
  company: import("zod").ZodString;
1322
1433
  concept: import("zod").ZodString;
1323
1434
  tags_tried: import("zod").ZodArray<import("zod").ZodString>;
1435
+ retry_taxonomy: import("zod").ZodOptional<import("zod").ZodEnum<{
1436
+ "ifrs-full": "ifrs-full";
1437
+ "us-gaap": "us-gaap";
1438
+ }>>;
1439
+ retry_tag: import("zod").ZodOptional<import("zod").ZodString>;
1324
1440
  }, import("zod/v4/core").$strip>>;
1325
1441
  unknown_concepts: import("zod").ZodArray<import("zod").ZodObject<{
1326
1442
  concept: import("zod").ZodString;
@@ -1343,7 +1459,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1343
1459
  readonly reason: "no_comparable_data";
1344
1460
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1345
1461
  readonly when: "Companies resolved but not one of them reports any of the requested concepts for the requested period type; any company or concept inputs past the caps are named, unread, in deferred_companies and deferred_concepts";
1346
- readonly recovery: "Switch period_type, or discover reported concept names with secedgar_search_concepts.";
1462
+ readonly recovery: "Retry with the taxonomy or related tag the hint names, switch period_type, or discover reported concept names with secedgar_search_concepts.";
1347
1463
  }, {
1348
1464
  readonly reason: "unknown_concept";
1349
1465
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
@@ -1417,88 +1533,35 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1417
1533
  }, import("zod/v4/core").$strip>, undefined, {
1418
1534
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
1419
1535
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
1420
- sql: import("zod").ZodString;
1421
- register_as: import("zod").ZodOptional<import("zod").ZodString>;
1422
- preview: import("zod").ZodOptional<import("zod").ZodNumber>;
1423
- row_limit: import("zod").ZodDefault<import("zod").ZodNumber>;
1536
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1424
1537
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1425
- columns: import("zod").ZodArray<import("zod").ZodString>;
1426
- row_count: import("zod").ZodNumber;
1427
- row_count_capped: import("zod").ZodBoolean;
1428
- rows: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1429
- registered_as: import("zod").ZodOptional<import("zod").ZodString>;
1430
- expires_at: import("zod").ZodOptional<import("zod").ZodString>;
1538
+ dataframes: import("zod").ZodArray<import("zod").ZodObject<{
1539
+ name: import("zod").ZodString;
1540
+ source_tool: import("zod").ZodString;
1541
+ query_params: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
1542
+ created_at: import("zod").ZodString;
1543
+ expires_at: import("zod").ZodString;
1544
+ row_count: import("zod").ZodNumber;
1545
+ truncated: import("zod").ZodBoolean;
1546
+ max_rows: import("zod").ZodOptional<import("zod").ZodNumber>;
1547
+ column_schema: import("zod").ZodArray<import("zod").ZodObject<{
1548
+ name: import("zod").ZodString;
1549
+ type: import("zod").ZodString;
1550
+ nullable: import("zod").ZodBoolean;
1551
+ }, import("zod/v4/core").$strip>>;
1552
+ }, import("zod/v4/core").$strip>>;
1431
1553
  }, import("zod/v4/core").$strip>, readonly [{
1432
1554
  readonly reason: "canvas_unavailable";
1433
1555
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
1434
1556
  readonly when: "The DataCanvas service is not configured for this deployment";
1435
1557
  readonly recovery: "Dataframes need the DuckDB canvas. On an npm or Docker install, set CANVAS_PROVIDER_TYPE=duckdb (the default when unset) and restart the server; the MCPB bundle ships without DuckDB, so there the data tools return their results inline and stage no dataframe.";
1436
1558
  }, {
1437
- readonly reason: "system_catalog_access";
1438
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1439
- readonly when: "The SQL query references a denied DuckDB system catalog (information_schema, pg_catalog, sqlite_master, duckdb_*), or names a column alias, table alias, or CTE spelled like one";
1440
- readonly recovery: "Query only the df_<id> tables, by the name the producing tool returned in its `dataset` field; a column alias, table alias, or CTE named like a DuckDB metadata view (the name the message gives) is refused too, so rename it.";
1441
- readonly thrownBy: "service";
1442
- }, {
1443
- readonly reason: "missing_table";
1444
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1445
- readonly when: "The SQL query references a df_<id> table that does not exist or has expired";
1446
- readonly recovery: "Reference the df_<id> name the producing tool returned in its `dataset` field, or a register_as name, and re-run that tool if the table expired. secedgar_dataframe_describe without a name lists the active dataframes, except over HTTP with auth none, where that listing is refused.";
1447
- readonly thrownBy: "service";
1448
- }, {
1449
- readonly reason: "invalid_sql";
1450
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1451
- readonly when: "The SELECT fails to prepare — an unknown column or an invalid expression — or hits an engine error no more specific reason covers";
1452
- readonly recovery: "Check SQL syntax, column names, and table references against secedgar_dataframe_describe.";
1453
- readonly thrownBy: "service";
1454
- }, {
1455
- readonly reason: "sql_execution_error";
1456
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1457
- readonly when: "The SELECT prepared but failed on the data it read — a cast or conversion that does not fit, an out-of-range value, or invalid input to a function";
1458
- readonly recovery: "Wrap the failing cast in TRY_CAST, or filter out the rows the error message names before converting them.";
1459
- readonly thrownBy: "service";
1460
- }, {
1461
- readonly reason: "register_as_clash";
1462
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1463
- readonly when: "The register_as target name already exists on the canvas";
1464
- readonly recovery: "Drop the existing dataframe with secedgar_dataframe_drop (when enabled), choose a different df_XXXXX_XXXXX name, or omit register_as.";
1465
- readonly thrownBy: "service";
1466
- }, {
1467
- readonly reason: "non_select_statement";
1468
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1469
- readonly when: "The SQL is not a SELECT (DROP, INSERT, UPDATE, DDL, PRAGMA, EXPLAIN, etc.) or does not parse — only read-only SELECTs run against dataframes";
1470
- readonly recovery: "Rewrite as one read-only SELECT over the df_<id> tables; writes, DDL, and other statements that are not a SELECT are refused.";
1471
- readonly thrownBy: "service";
1472
- }, {
1473
- readonly reason: "multi_statement";
1474
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1475
- readonly when: "The SQL holds more than one statement";
1476
- readonly recovery: "Send exactly one SELECT statement per call, and split multi-statement SQL into separate calls.";
1477
- readonly thrownBy: "service";
1478
- }, {
1479
- readonly reason: "denied_function";
1480
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1481
- readonly when: "The SQL calls a file-reading or external-data table function (read_csv, read_parquet, glob), a function that reads an engine setting (current_setting, current_schema — an unqualified current_schema is refused even where it names a column, which reads qualified as <table>.current_schema), or one that runs SQL or names a table from a string (query_table, or query() over anything but a single string literal)";
1482
- readonly recovery: "Remove the function the message names, or qualify a column it names with its table, and query only the df_<id> tables the data tools returned.";
1483
- readonly thrownBy: "service";
1484
- }, {
1485
- readonly reason: "sql_read_only";
1486
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1487
- readonly when: "The SQL names a file as a table (FROM 'data.csv') — the dataframe engine reads no files";
1488
- readonly recovery: "Query only the df_<id> tables, by the name the producing tool returned in its `dataset` field, referenced by bare name; this surface reads no files and cannot create, alter, or drop anything.";
1489
- readonly thrownBy: "service";
1490
- }, {
1491
- readonly reason: "plan_operator_not_allowed";
1492
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1493
- readonly when: "The query plan uses an operator outside the read-only allowlist, such as range() or generate_series() given a column or subquery argument instead of constants";
1494
- readonly recovery: "Rewrite with read-only SELECT constructs — joins, aggregates, window functions, CTEs, unnest(), and range() or generate_series() over constant arguments are supported.";
1495
- readonly thrownBy: "service";
1496
- }], {
1497
- readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
1498
- readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
1499
- readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
1500
- readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
1501
- }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
1559
+ readonly reason: "listing_unavailable";
1560
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
1561
+ readonly when: "name is omitted or empty over HTTP with auth none, where every caller shares one canvas";
1562
+ readonly recovery: "Pass the exact df_XXXXX_XXXXX name the producing tool returned in its `dataset` field, or the register_as name you chose; this deployment does not list dataframes.";
1563
+ readonly severity: "notice";
1564
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
1502
1565
  name: import("zod").ZodString;
1503
1566
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1504
1567
  name: import("zod").ZodString;