@cyanheads/secedgar-mcp-server 0.20.1 → 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 (107) hide show
  1. package/AGENTS.md +26 -19
  2. package/CLAUDE.md +26 -19
  3. package/README.md +19 -10
  4. package/changelog/0.21.x/0.21.0.md +35 -0
  5. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js +3 -3
  6. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js.map +1 -1
  7. package/dist/mcp-server/tools/annual-report-reads.d.ts +50 -0
  8. package/dist/mcp-server/tools/annual-report-reads.d.ts.map +1 -0
  9. package/dist/mcp-server/tools/annual-report-reads.js +141 -0
  10. package/dist/mcp-server/tools/annual-report-reads.js.map +1 -0
  11. package/dist/mcp-server/tools/calendar-quarter.d.ts +22 -0
  12. package/dist/mcp-server/tools/calendar-quarter.d.ts.map +1 -0
  13. package/dist/mcp-server/tools/calendar-quarter.js +34 -0
  14. package/dist/mcp-server/tools/calendar-quarter.js.map +1 -0
  15. package/dist/mcp-server/tools/definitions/company-search.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/company-search.tool.js +10 -21
  17. package/dist/mcp-server/tools/definitions/company-search.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts +12 -2
  19. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/compare-companies.tool.js +120 -29
  21. package/dist/mcp-server/tools/definitions/compare-companies.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/find-holders.tool.d.ts.map +1 -1
  23. package/dist/mcp-server/tools/definitions/find-holders.tool.js +9 -16
  24. package/dist/mcp-server/tools/definitions/find-holders.tool.js.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.d.ts +24 -9
  26. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js +125 -46
  28. package/dist/mcp-server/tools/definitions/get-beneficial-owners.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts +10 -0
  30. package/dist/mcp-server/tools/definitions/get-filing.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/get-filing.tool.js +150 -6
  32. package/dist/mcp-server/tools/definitions/get-filing.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/get-financials.tool.js +53 -34
  35. package/dist/mcp-server/tools/definitions/get-financials.tool.js.map +1 -1
  36. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.js +2 -3
  38. package/dist/mcp-server/tools/definitions/get-fund-holdings.tool.js.map +1 -1
  39. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts +24 -0
  40. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js +266 -70
  42. package/dist/mcp-server/tools/definitions/get-insider-transactions.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.d.ts +12 -0
  44. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.d.ts.map +1 -1
  45. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js +16 -31
  46. package/dist/mcp-server/tools/definitions/get-institutional-holdings.tool.js.map +1 -1
  47. package/dist/mcp-server/tools/definitions/get-material-events.tool.d.ts +15 -0
  48. package/dist/mcp-server/tools/definitions/get-material-events.tool.d.ts.map +1 -1
  49. package/dist/mcp-server/tools/definitions/get-material-events.tool.js +107 -54
  50. package/dist/mcp-server/tools/definitions/get-material-events.tool.js.map +1 -1
  51. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts +5 -0
  52. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts.map +1 -1
  53. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js +48 -17
  54. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js.map +1 -1
  55. package/dist/mcp-server/tools/definitions/index.d.ts +274 -226
  56. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  57. package/dist/mcp-server/tools/definitions/search-concepts.tool.js +1 -1
  58. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts +16 -0
  59. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts.map +1 -1
  60. package/dist/mcp-server/tools/definitions/search-filings.tool.js +42 -28
  61. package/dist/mcp-server/tools/definitions/search-filings.tool.js.map +1 -1
  62. package/dist/mcp-server/tools/filing-dates.d.ts +46 -0
  63. package/dist/mcp-server/tools/filing-dates.d.ts.map +1 -0
  64. package/dist/mcp-server/tools/filing-dates.js +93 -0
  65. package/dist/mcp-server/tools/filing-dates.js.map +1 -0
  66. package/dist/mcp-server/tools/limit-clamp.d.ts.map +1 -1
  67. package/dist/mcp-server/tools/limit-clamp.js +6 -2
  68. package/dist/mcp-server/tools/limit-clamp.js.map +1 -1
  69. package/dist/services/edgar/body-text-decoder.d.ts +33 -0
  70. package/dist/services/edgar/body-text-decoder.d.ts.map +1 -0
  71. package/dist/services/edgar/body-text-decoder.js +103 -0
  72. package/dist/services/edgar/body-text-decoder.js.map +1 -0
  73. package/dist/services/edgar/concept-map.d.ts.map +1 -1
  74. package/dist/services/edgar/concept-map.js +70 -12
  75. package/dist/services/edgar/concept-map.js.map +1 -1
  76. package/dist/services/edgar/concept-series.d.ts +80 -1
  77. package/dist/services/edgar/concept-series.d.ts.map +1 -1
  78. package/dist/services/edgar/concept-series.js +134 -10
  79. package/dist/services/edgar/concept-series.js.map +1 -1
  80. package/dist/services/edgar/edgar-api-service.d.ts.map +1 -1
  81. package/dist/services/edgar/edgar-api-service.js +12 -8
  82. package/dist/services/edgar/edgar-api-service.js.map +1 -1
  83. package/dist/services/edgar/eight-k-items.d.ts +19 -1
  84. package/dist/services/edgar/eight-k-items.d.ts.map +1 -1
  85. package/dist/services/edgar/eight-k-items.js +24 -1
  86. package/dist/services/edgar/eight-k-items.js.map +1 -1
  87. package/dist/services/edgar/filing-to-text.d.ts +13 -6
  88. package/dist/services/edgar/filing-to-text.d.ts.map +1 -1
  89. package/dist/services/edgar/filing-to-text.js +23 -3
  90. package/dist/services/edgar/filing-to-text.js.map +1 -1
  91. package/dist/services/edgar/form4-amendments.d.ts +63 -0
  92. package/dist/services/edgar/form4-amendments.d.ts.map +1 -0
  93. package/dist/services/edgar/form4-amendments.js +99 -0
  94. package/dist/services/edgar/form4-amendments.js.map +1 -0
  95. package/dist/services/edgar/mirror/companyfacts-sync.d.ts +6 -1
  96. package/dist/services/edgar/mirror/companyfacts-sync.d.ts.map +1 -1
  97. package/dist/services/edgar/mirror/companyfacts-sync.js +29 -6
  98. package/dist/services/edgar/mirror/companyfacts-sync.js.map +1 -1
  99. package/dist/services/edgar/ownership-parser.d.ts +5 -0
  100. package/dist/services/edgar/ownership-parser.d.ts.map +1 -1
  101. package/dist/services/edgar/ownership-parser.js +3 -0
  102. package/dist/services/edgar/ownership-parser.js.map +1 -1
  103. package/dist/services/edgar/types.d.ts +3 -1
  104. package/dist/services/edgar/types.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/server.json +3 -3
  107. package/skills/secedgar-guide/SKILL.md +8 -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";
137
+ form: import("zod").ZodEnum<{
138
+ 4: "4";
139
+ "4/A": "4/A";
94
140
  }>;
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";
101
- }>;
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>;
@@ -296,6 +329,14 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
296
329
  name: import("zod").ZodString;
297
330
  type: import("zod").ZodOptional<import("zod").ZodString>;
298
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>>>;
299
340
  sic: import("zod").ZodOptional<import("zod").ZodString>;
300
341
  location: import("zod").ZodOptional<import("zod").ZodString>;
301
342
  source: import("zod").ZodOptional<import("zod").ZodEnum<{
@@ -413,6 +454,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
413
454
  company_name: import("zod").ZodOptional<import("zod").ZodString>;
414
455
  cik: import("zod").ZodString;
415
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>>>;
416
462
  primary_document: import("zod").ZodString;
417
463
  requested_document: import("zod").ZodOptional<import("zod").ZodString>;
418
464
  documents: import("zod").ZodObject<{
@@ -684,6 +730,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
684
730
  label: import("zod").ZodString;
685
731
  group: import("zod").ZodString;
686
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>;
687
738
  }, import("zod/v4/core").$strip>>;
688
739
  caveats: import("zod").ZodArray<import("zod").ZodString>;
689
740
  }, import("zod/v4/core").$strip>, readonly [{
@@ -802,74 +853,105 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
802
853
  readonly resolvedAs: import("zod").ZodOptional<import("zod").ZodString>;
803
854
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
804
855
  company: import("zod").ZodString;
805
- role: import("zod").ZodDefault<import("zod").ZodEnum<{
806
- issuer: "issuer";
807
- reporting_owner: "reporting_owner";
808
- }>>;
809
- transaction_type: import("zod").ZodDefault<import("zod").ZodEnum<{
810
- all: "all";
811
- purchase: "purchase";
812
- sale: "sale";
813
- }>>;
856
+ quarter: import("zod").ZodOptional<import("zod").ZodString>;
814
857
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
815
- filed_after: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
816
- 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>;
817
860
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
818
- issuer_name: import("zod").ZodString;
819
- issuer_cik: import("zod").ZodString;
820
- issuer_ticker: import("zod").ZodOptional<import("zod").ZodString>;
821
- role: import("zod").ZodOptional<import("zod").ZodLiteral<"reporting_owner">>;
822
- 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;
823
868
  filing_date: import("zod").ZodString;
824
- 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<{
825
880
  accession_number: import("zod").ZodString;
826
- reporting_person: import("zod").ZodString;
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>;
831
- security_title: import("zod").ZodString;
832
- transaction_date: import("zod").ZodOptional<import("zod").ZodString>;
833
- transaction_code: import("zod").ZodString;
834
- transaction_type: import("zod").ZodString;
835
- is_derivative: import("zod").ZodBoolean;
836
- shares_traded: import("zod").ZodOptional<import("zod").ZodNumber>;
837
- direction: import("zod").ZodOptional<import("zod").ZodEnum<{
838
- acquire: "acquire";
839
- 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";
840
912
  }>>;
841
- price_per_share: import("zod").ZodOptional<import("zod").ZodNumber>;
842
- shares_owned_after: import("zod").ZodOptional<import("zod").ZodNumber>;
843
- ownership_type: import("zod").ZodOptional<import("zod").ZodEnum<{
844
- direct: "direct";
845
- indirect: "indirect";
913
+ put_call: import("zod").ZodOptional<import("zod").ZodEnum<{
914
+ Call: "Call";
915
+ Put: "Put";
846
916
  }>>;
847
- 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>;
848
923
  }, import("zod/v4/core").$strip>>;
849
- filings_scanned: import("zod").ZodNumber;
850
- filings_other_issuer: import("zod").ZodNumber;
851
- history_scanned_through: import("zod").ZodOptional<import("zod").ZodString>;
852
924
  dataset: import("zod").ZodOptional<import("zod").ZodObject<{
853
925
  name: import("zod").ZodString;
854
926
  row_count: import("zod").ZodNumber;
855
927
  expires_at: import("zod").ZodString;
856
- truncated: import("zod").ZodBoolean;
857
928
  }, import("zod/v4/core").$strip>>;
858
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
+ }, {
859
936
  readonly reason: "company_not_found";
860
937
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
861
- readonly when: "The company input does not resolve to a known company";
862
- 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.";
863
940
  }, {
864
- readonly reason: "ambiguous_company";
941
+ readonly reason: "ambiguous_entity";
865
942
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
866
- readonly when: "The company input resolves to multiple entities and the target is ambiguous";
867
- 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.";
868
945
  }, {
869
946
  readonly reason: "no_filings_found";
870
947
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
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";
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.";
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.";
873
955
  }, {
874
956
  readonly reason: 'rate_limited';
875
957
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
@@ -891,6 +973,13 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
891
973
  readonly recovery: 'Retry the same call in a minute — SEC EDGAR failed on its side, and nothing in the request needs to change.';
892
974
  readonly retryable: true;
893
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';
894
983
  }], {
895
984
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
896
985
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -978,6 +1067,10 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
978
1067
  readonly resolvedAs: import("zod").ZodOptional<import("zod").ZodString>;
979
1068
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
980
1069
  issuer: import("zod").ZodString;
1070
+ role: import("zod").ZodDefault<import("zod").ZodEnum<{
1071
+ filer: "filer";
1072
+ issuer: "issuer";
1073
+ }>>;
981
1074
  form_kind: import("zod").ZodDefault<import("zod").ZodEnum<{
982
1075
  "13D": "13D";
983
1076
  "13G": "13G";
@@ -989,6 +1082,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
989
1082
  issuer: import("zod").ZodString;
990
1083
  issuer_cik: import("zod").ZodString;
991
1084
  issuer_name: import("zod").ZodString;
1085
+ role: import("zod").ZodOptional<import("zod").ZodLiteral<"filer">>;
992
1086
  form_kind: import("zod").ZodEnum<{
993
1087
  "13D": "13D";
994
1088
  "13G": "13G";
@@ -1019,6 +1113,8 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1019
1113
  amendment_number: import("zod").ZodOptional<import("zod").ZodString>;
1020
1114
  accession_number: import("zod").ZodString;
1021
1115
  filing_date: import("zod").ZodString;
1116
+ issuer_cik: import("zod").ZodOptional<import("zod").ZodString>;
1117
+ issuer_name: import("zod").ZodOptional<import("zod").ZodString>;
1022
1118
  event_date: import("zod").ZodOptional<import("zod").ZodString>;
1023
1119
  security_class: import("zod").ZodOptional<import("zod").ZodString>;
1024
1120
  cusips: import("zod").ZodArray<import("zod").ZodString>;
@@ -1059,7 +1155,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1059
1155
  }, {
1060
1156
  readonly reason: "no_filings_found";
1061
1157
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1062
- 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";
1063
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.";
1064
1160
  }, {
1065
1161
  readonly reason: 'rate_limited';
@@ -1336,6 +1432,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1336
1432
  company: import("zod").ZodString;
1337
1433
  concept: import("zod").ZodString;
1338
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>;
1339
1440
  }, import("zod/v4/core").$strip>>;
1340
1441
  unknown_concepts: import("zod").ZodArray<import("zod").ZodObject<{
1341
1442
  concept: import("zod").ZodString;
@@ -1358,7 +1459,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1358
1459
  readonly reason: "no_comparable_data";
1359
1460
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1360
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";
1361
- 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.";
1362
1463
  }, {
1363
1464
  readonly reason: "unknown_concept";
1364
1465
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
@@ -1432,88 +1533,35 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1432
1533
  }, import("zod/v4/core").$strip>, undefined, {
1433
1534
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
1434
1535
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
1435
- sql: import("zod").ZodString;
1436
- register_as: import("zod").ZodOptional<import("zod").ZodString>;
1437
- preview: import("zod").ZodOptional<import("zod").ZodNumber>;
1438
- row_limit: import("zod").ZodDefault<import("zod").ZodNumber>;
1536
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1439
1537
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1440
- columns: import("zod").ZodArray<import("zod").ZodString>;
1441
- row_count: import("zod").ZodNumber;
1442
- row_count_capped: import("zod").ZodBoolean;
1443
- rows: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1444
- registered_as: import("zod").ZodOptional<import("zod").ZodString>;
1445
- 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>>;
1446
1553
  }, import("zod/v4/core").$strip>, readonly [{
1447
1554
  readonly reason: "canvas_unavailable";
1448
1555
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
1449
1556
  readonly when: "The DataCanvas service is not configured for this deployment";
1450
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.";
1451
1558
  }, {
1452
- readonly reason: "system_catalog_access";
1453
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1454
- 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";
1455
- 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.";
1456
- readonly thrownBy: "service";
1457
- }, {
1458
- readonly reason: "missing_table";
1459
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1460
- readonly when: "The SQL query references a df_<id> table that does not exist or has expired";
1461
- 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.";
1462
- readonly thrownBy: "service";
1463
- }, {
1464
- readonly reason: "invalid_sql";
1465
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1466
- readonly when: "The SELECT fails to prepare — an unknown column or an invalid expression — or hits an engine error no more specific reason covers";
1467
- readonly recovery: "Check SQL syntax, column names, and table references against secedgar_dataframe_describe.";
1468
- readonly thrownBy: "service";
1469
- }, {
1470
- readonly reason: "sql_execution_error";
1471
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1472
- 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";
1473
- readonly recovery: "Wrap the failing cast in TRY_CAST, or filter out the rows the error message names before converting them.";
1474
- readonly thrownBy: "service";
1475
- }, {
1476
- readonly reason: "register_as_clash";
1477
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1478
- readonly when: "The register_as target name already exists on the canvas";
1479
- readonly recovery: "Drop the existing dataframe with secedgar_dataframe_drop (when enabled), choose a different df_XXXXX_XXXXX name, or omit register_as.";
1480
- readonly thrownBy: "service";
1481
- }, {
1482
- readonly reason: "non_select_statement";
1483
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1484
- 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";
1485
- 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.";
1486
- readonly thrownBy: "service";
1487
- }, {
1488
- readonly reason: "multi_statement";
1489
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1490
- readonly when: "The SQL holds more than one statement";
1491
- readonly recovery: "Send exactly one SELECT statement per call, and split multi-statement SQL into separate calls.";
1492
- readonly thrownBy: "service";
1493
- }, {
1494
- readonly reason: "denied_function";
1495
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1496
- 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)";
1497
- 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.";
1498
- readonly thrownBy: "service";
1499
- }, {
1500
- readonly reason: "sql_read_only";
1501
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1502
- readonly when: "The SQL names a file as a table (FROM 'data.csv') — the dataframe engine reads no files";
1503
- 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.";
1504
- readonly thrownBy: "service";
1505
- }, {
1506
- readonly reason: "plan_operator_not_allowed";
1507
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
1508
- 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";
1509
- readonly recovery: "Rewrite with read-only SELECT constructs — joins, aggregates, window functions, CTEs, unnest(), and range() or generate_series() over constant arguments are supported.";
1510
- readonly thrownBy: "service";
1511
- }], {
1512
- readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
1513
- readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
1514
- readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
1515
- readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
1516
- }> | 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<{
1517
1565
  name: import("zod").ZodString;
1518
1566
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1519
1567
  name: import("zod").ZodString;