@cyanheads/secedgar-mcp-server 0.15.8 → 0.15.9

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 (56) hide show
  1. package/AGENTS.md +10 -7
  2. package/CLAUDE.md +10 -7
  3. package/README.md +11 -6
  4. package/changelog/0.15.x/0.15.9.md +32 -0
  5. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js +2 -2
  6. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js.map +1 -1
  7. package/dist/mcp-server/resources/definitions/concepts.resource.d.ts +2 -1
  8. package/dist/mcp-server/resources/definitions/concepts.resource.d.ts.map +1 -1
  9. package/dist/mcp-server/resources/definitions/concepts.resource.js +5 -4
  10. package/dist/mcp-server/resources/definitions/concepts.resource.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts +10 -0
  12. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/compare-companies.tool.js +143 -14
  14. package/dist/mcp-server/tools/definitions/compare-companies.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/fetch-frames.tool.d.ts +6 -1
  16. package/dist/mcp-server/tools/definitions/fetch-frames.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js +93 -32
  18. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts +6 -0
  20. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/get-financials.tool.js +130 -60
  22. package/dist/mcp-server/tools/definitions/get-financials.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts +3 -0
  24. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js +16 -7
  26. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/index.d.ts +81 -57
  28. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/search-concepts.tool.d.ts +2 -1
  30. package/dist/mcp-server/tools/definitions/search-concepts.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/search-concepts.tool.js +5 -4
  32. package/dist/mcp-server/tools/definitions/search-concepts.tool.js.map +1 -1
  33. package/dist/services/edgar/concept-map.d.ts +38 -4
  34. package/dist/services/edgar/concept-map.d.ts.map +1 -1
  35. package/dist/services/edgar/concept-map.js +196 -9
  36. package/dist/services/edgar/concept-map.js.map +1 -1
  37. package/dist/services/edgar/concept-series.d.ts +79 -18
  38. package/dist/services/edgar/concept-series.d.ts.map +1 -1
  39. package/dist/services/edgar/concept-series.js +175 -25
  40. package/dist/services/edgar/concept-series.js.map +1 -1
  41. package/dist/services/edgar/edgar-api-service.d.ts +4 -6
  42. package/dist/services/edgar/edgar-api-service.d.ts.map +1 -1
  43. package/dist/services/edgar/edgar-api-service.js +34 -38
  44. package/dist/services/edgar/edgar-api-service.js.map +1 -1
  45. package/dist/services/edgar/mirror/edgar-mirror.d.ts +10 -1
  46. package/dist/services/edgar/mirror/edgar-mirror.d.ts.map +1 -1
  47. package/dist/services/edgar/mirror/edgar-mirror.js +52 -13
  48. package/dist/services/edgar/mirror/edgar-mirror.js.map +1 -1
  49. package/dist/services/edgar/trigram-similarity.d.ts +13 -0
  50. package/dist/services/edgar/trigram-similarity.d.ts.map +1 -0
  51. package/dist/services/edgar/trigram-similarity.js +40 -0
  52. package/dist/services/edgar/trigram-similarity.js.map +1 -0
  53. package/dist/services/edgar/types.d.ts +12 -2
  54. package/dist/services/edgar/types.d.ts.map +1 -1
  55. package/package.json +2 -2
  56. package/server.json +3 -3
@@ -25,6 +25,62 @@ export interface ToolDefinitionOptions {
25
25
  * it is present, so the manifest's tool count matches the documented surface.
26
26
  */
27
27
  export declare function buildToolDefinitions(options: ToolDefinitionOptions): (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
28
+ query: import("zod").ZodString;
29
+ include_filings: import("zod").ZodDefault<import("zod").ZodBoolean>;
30
+ forms: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
31
+ filing_limit: import("zod").ZodDefault<import("zod").ZodNumber>;
32
+ filed_after: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
33
+ filed_before: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
34
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
35
+ cik: import("zod").ZodString;
36
+ name: import("zod").ZodString;
37
+ tickers: import("zod").ZodArray<import("zod").ZodString>;
38
+ exchanges: import("zod").ZodArray<import("zod").ZodString>;
39
+ sic: import("zod").ZodString;
40
+ sic_description: import("zod").ZodString;
41
+ state_of_incorporation: import("zod").ZodOptional<import("zod").ZodString>;
42
+ fiscal_year_end: import("zod").ZodOptional<import("zod").ZodString>;
43
+ series_id: import("zod").ZodOptional<import("zod").ZodString>;
44
+ class_id: import("zod").ZodOptional<import("zod").ZodString>;
45
+ filings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
46
+ accession_number: import("zod").ZodString;
47
+ form: import("zod").ZodString;
48
+ filing_date: import("zod").ZodString;
49
+ report_date: import("zod").ZodOptional<import("zod").ZodString>;
50
+ primary_document: import("zod").ZodString;
51
+ description: import("zod").ZodOptional<import("zod").ZodString>;
52
+ }, import("zod/v4/core").$strip>>>;
53
+ total_filings: import("zod").ZodOptional<import("zod").ZodNumber>;
54
+ history_scanned_through: import("zod").ZodOptional<import("zod").ZodString>;
55
+ dataset: import("zod").ZodOptional<import("zod").ZodObject<{
56
+ name: import("zod").ZodString;
57
+ row_count: import("zod").ZodNumber;
58
+ expires_at: import("zod").ZodString;
59
+ truncated: import("zod").ZodBoolean;
60
+ }, import("zod/v4/core").$strip>>;
61
+ }, import("zod/v4/core").$strip>, readonly [{
62
+ readonly reason: "no_match";
63
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
64
+ readonly when: "No company matches the query";
65
+ readonly recovery: "Check `data.suggestions` for near matches. SEC's ticker index reflects the filer's own submissions record, which can differ from the exchange-listed symbol. ETFs and mutual funds resolve only by ticker (e.g. \"VOO\"); operating companies also resolve by full legal name or 10-digit CIK.";
66
+ }, {
67
+ readonly reason: "multiple_matches";
68
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
69
+ readonly when: "Query is ambiguous and matches several companies";
70
+ readonly recovery: "Specify a ticker symbol for an exact match instead of a name fragment.";
71
+ }, {
72
+ readonly reason: "rate_limited";
73
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
74
+ readonly when: "SEC is rate-limiting this server's IP — SEC answered 429, or the call was refused without being sent while the cool-down after one runs";
75
+ readonly recovery: "Wait the retryAfter seconds the error carries, then retry — SEC lifts the block only once requests stop for ten minutes.";
76
+ readonly retryable: true;
77
+ readonly thrownBy: "service";
78
+ }], {
79
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
80
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
81
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
82
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
83
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
28
84
  name: import("zod").ZodString;
29
85
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
30
86
  name: import("zod").ZodString;
@@ -175,62 +231,6 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
175
231
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
176
232
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
177
233
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
178
- }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
179
- query: import("zod").ZodString;
180
- include_filings: import("zod").ZodDefault<import("zod").ZodBoolean>;
181
- forms: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
182
- filing_limit: import("zod").ZodDefault<import("zod").ZodNumber>;
183
- filed_after: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
184
- filed_before: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
185
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
186
- cik: import("zod").ZodString;
187
- name: import("zod").ZodString;
188
- tickers: import("zod").ZodArray<import("zod").ZodString>;
189
- exchanges: import("zod").ZodArray<import("zod").ZodString>;
190
- sic: import("zod").ZodString;
191
- sic_description: import("zod").ZodString;
192
- state_of_incorporation: import("zod").ZodOptional<import("zod").ZodString>;
193
- fiscal_year_end: import("zod").ZodOptional<import("zod").ZodString>;
194
- series_id: import("zod").ZodOptional<import("zod").ZodString>;
195
- class_id: import("zod").ZodOptional<import("zod").ZodString>;
196
- filings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
197
- accession_number: import("zod").ZodString;
198
- form: import("zod").ZodString;
199
- filing_date: import("zod").ZodString;
200
- report_date: import("zod").ZodOptional<import("zod").ZodString>;
201
- primary_document: import("zod").ZodString;
202
- description: import("zod").ZodOptional<import("zod").ZodString>;
203
- }, import("zod/v4/core").$strip>>>;
204
- total_filings: import("zod").ZodOptional<import("zod").ZodNumber>;
205
- history_scanned_through: import("zod").ZodOptional<import("zod").ZodString>;
206
- dataset: import("zod").ZodOptional<import("zod").ZodObject<{
207
- name: import("zod").ZodString;
208
- row_count: import("zod").ZodNumber;
209
- expires_at: import("zod").ZodString;
210
- truncated: import("zod").ZodBoolean;
211
- }, import("zod/v4/core").$strip>>;
212
- }, import("zod/v4/core").$strip>, readonly [{
213
- readonly reason: "no_match";
214
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
215
- readonly when: "No company matches the query";
216
- readonly recovery: "Check `data.suggestions` for near matches. SEC's ticker index reflects the filer's own submissions record, which can differ from the exchange-listed symbol. ETFs and mutual funds resolve only by ticker (e.g. \"VOO\"); operating companies also resolve by full legal name or 10-digit CIK.";
217
- }, {
218
- readonly reason: "multiple_matches";
219
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
220
- readonly when: "Query is ambiguous and matches several companies";
221
- readonly recovery: "Specify a ticker symbol for an exact match instead of a name fragment.";
222
- }, {
223
- readonly reason: "rate_limited";
224
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
225
- readonly when: "SEC is rate-limiting this server's IP — SEC answered 429, or the call was refused without being sent while the cool-down after one runs";
226
- readonly recovery: "Wait the retryAfter seconds the error carries, then retry — SEC lifts the block only once requests stop for ten minutes.";
227
- readonly retryable: true;
228
- readonly thrownBy: "service";
229
- }], {
230
- readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
231
- readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
232
- readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
233
- readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
234
234
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
235
235
  query: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
236
236
  forms: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
@@ -451,6 +451,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
451
451
  form: import("zod").ZodString;
452
452
  filed: import("zod").ZodString;
453
453
  accession_number: import("zod").ZodString;
454
+ tag: import("zod").ZodString;
454
455
  }, import("zod/v4/core").$strip>>;
455
456
  tags_tried: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
456
457
  dataset: import("zod").ZodOptional<import("zod").ZodObject<{
@@ -469,6 +470,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
469
470
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
470
471
  readonly when: "The company input resolves to multiple entities and the target is ambiguous";
471
472
  readonly recovery: "Use a ticker symbol or 10-digit CIK from the matches list for an exact match.";
473
+ }, {
474
+ readonly reason: "unknown_concept";
475
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
476
+ readonly when: "The concept input is neither a supported friendly name nor shaped like an XBRL tag, so no request is sent";
477
+ readonly recovery: "Use a friendly name from secedgar_search_concepts or a valid raw XBRL tag.";
472
478
  }, {
473
479
  readonly reason: "no_concept_data";
474
480
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
@@ -527,6 +533,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
527
533
  period_end: import("zod").ZodString;
528
534
  form: import("zod").ZodString;
529
535
  accession_number: import("zod").ZodString;
536
+ tag: import("zod").ZodString;
530
537
  }, import("zod/v4/core").$strip>>;
531
538
  quarterly: import("zod").ZodOptional<import("zod").ZodObject<{
532
539
  period: import("zod").ZodString;
@@ -534,6 +541,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
534
541
  period_end: import("zod").ZodString;
535
542
  form: import("zod").ZodString;
536
543
  accession_number: import("zod").ZodString;
544
+ tag: import("zod").ZodString;
537
545
  }, import("zod/v4/core").$strip>>;
538
546
  instant: import("zod").ZodOptional<import("zod").ZodObject<{
539
547
  period: import("zod").ZodString;
@@ -541,6 +549,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
541
549
  period_end: import("zod").ZodString;
542
550
  form: import("zod").ZodString;
543
551
  accession_number: import("zod").ZodString;
552
+ tag: import("zod").ZodString;
544
553
  }, import("zod/v4/core").$strip>>;
545
554
  }, import("zod/v4/core").$strip>>;
546
555
  gaps: import("zod").ZodArray<import("zod").ZodObject<{
@@ -857,6 +866,10 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
857
866
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
858
867
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
859
868
  concept: import("zod").ZodString;
869
+ taxonomy: import("zod").ZodDefault<import("zod").ZodEnum<{
870
+ dei: "dei";
871
+ "us-gaap": "us-gaap";
872
+ }>>;
860
873
  period: import("zod").ZodString;
861
874
  unit: import("zod").ZodDefault<import("zod").ZodEnum<{
862
875
  USD: "USD";
@@ -873,6 +886,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
873
886
  }>>;
874
887
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
875
888
  concept: import("zod").ZodString;
889
+ taxonomy: import("zod").ZodString;
876
890
  period: import("zod").ZodString;
877
891
  unit: import("zod").ZodString;
878
892
  label: import("zod").ZodString;
@@ -913,7 +927,7 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
913
927
  }, import("zod/v4/core").$strip>, readonly [{
914
928
  readonly reason: "unknown_concept";
915
929
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
916
- readonly when: "The concept input does not match a friendly name and SEC frames returned no data";
930
+ readonly when: "The concept input is neither a supported friendly name nor shaped like an XBRL tag, so no request is sent";
917
931
  readonly recovery: "Use a friendly name from secedgar_search_concepts or a valid raw XBRL tag.";
918
932
  }, {
919
933
  readonly reason: "no_data";
@@ -988,6 +1002,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
988
1002
  concept: import("zod").ZodString;
989
1003
  tags_tried: import("zod").ZodArray<import("zod").ZodString>;
990
1004
  }, import("zod/v4/core").$strip>>;
1005
+ unknown_concepts: import("zod").ZodArray<import("zod").ZodObject<{
1006
+ concept: import("zod").ZodString;
1007
+ derivation: import("zod").ZodOptional<import("zod").ZodString>;
1008
+ suggestions: import("zod").ZodArray<import("zod").ZodString>;
1009
+ }, import("zod/v4/core").$strip>>;
991
1010
  caveats: import("zod").ZodArray<import("zod").ZodString>;
992
1011
  dataset: import("zod").ZodOptional<import("zod").ZodObject<{
993
1012
  name: import("zod").ZodString;
@@ -1004,6 +1023,11 @@ export declare function buildToolDefinitions(options: ToolDefinitionOptions): (i
1004
1023
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1005
1024
  readonly when: "Companies resolved but not one of them reports any of the requested concepts for the requested period type";
1006
1025
  readonly recovery: "Switch period_type, or discover reported concept names with secedgar_search_concepts.";
1026
+ }, {
1027
+ readonly reason: "unknown_concept";
1028
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
1029
+ readonly when: "Every requested concept is neither a supported friendly name nor shaped like an XBRL tag, so no request is sent";
1030
+ readonly recovery: "Use a friendly name from secedgar_search_concepts or a valid raw XBRL tag.";
1007
1031
  }, {
1008
1032
  readonly reason: "rate_limited";
1009
1033
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqBH,4EAA4E;AAC5E,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BlE"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Search supported XBRL financial concepts by keyword, statement group, or taxonomy.
3
- * Discovery tool for the friendly names accepted by secedgar_get_financials and secedgar_fetch_frames.
3
+ * Discovery tool for the friendly names accepted by secedgar_get_financials,
4
+ * secedgar_compare_companies, and secedgar_fetch_frames.
4
5
  * Also performs reverse lookup: passing a raw XBRL tag returns the friendly mapping(s) it belongs to.
5
6
  * @module mcp-server/tools/definitions/search-concepts
6
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"search-concepts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAkBjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8K7B,CAAC"}
1
+ {"version":3,"file":"search-concepts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAkBjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8K7B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @fileoverview Search supported XBRL financial concepts by keyword, statement group, or taxonomy.
3
- * Discovery tool for the friendly names accepted by secedgar_get_financials and secedgar_fetch_frames.
3
+ * Discovery tool for the friendly names accepted by secedgar_get_financials,
4
+ * secedgar_compare_companies, and secedgar_fetch_frames.
4
5
  * Also performs reverse lookup: passing a raw XBRL tag returns the friendly mapping(s) it belongs to.
5
6
  * @module mcp-server/tools/definitions/search-concepts
6
7
  */
@@ -19,7 +20,7 @@ const TAXONOMY_VALUES = [
19
20
  'dei',
20
21
  ];
21
22
  export const searchConceptsTool = tool('secedgar_search_concepts', {
22
- description: 'Search supported XBRL financial concepts by keyword, statement group, or taxonomy. Use before secedgar_get_financials or secedgar_fetch_frames to discover the right friendly name, or pass a raw XBRL tag (e.g., "NetIncomeLoss") to reverse-lookup which friendly names map to it. Empty search with no filters returns the full catalog.',
23
+ description: 'Search supported XBRL financial concepts by keyword, statement group, or taxonomy. Use before secedgar_get_financials, secedgar_compare_companies, or secedgar_fetch_frames to discover the right friendly name, or pass a raw XBRL tag (e.g., "NetIncomeLoss") to reverse-lookup which friendly names map to it. Empty search with no filters returns the full catalog.',
23
24
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
24
25
  input: z.object({
25
26
  search: z
@@ -29,7 +30,7 @@ export const searchConceptsTool = tool('secedgar_search_concepts', {
29
30
  group: z
30
31
  .enum(GROUP_VALUES)
31
32
  .optional()
32
- .describe('Filter to a single financial statement group. income_statement covers P&L items; balance_sheet covers position items (use instant periods in secedgar_fetch_frames); cash_flow covers CF statement items; per_share covers EPS; entity_info covers DEI items like shares outstanding.'),
33
+ .describe('Filter to a single financial statement group. income_statement covers P&L items; balance_sheet covers position items (use instant periods in secedgar_fetch_frames); cash_flow covers CF statement items; per_share covers EPS and the diluted share count it divides by; entity_info covers DEI items like shares outstanding.'),
33
34
  taxonomy: z
34
35
  .enum(TAXONOMY_VALUES)
35
36
  .optional()
@@ -50,7 +51,7 @@ export const searchConceptsTool = tool('secedgar_search_concepts', {
50
51
  .object({
51
52
  name: z
52
53
  .string()
53
- .describe('Friendly name to pass as the concept argument to secedgar_get_financials or secedgar_fetch_frames.'),
54
+ .describe('Friendly name to pass as `concept` to secedgar_get_financials or secedgar_fetch_frames, or in `concepts` to secedgar_compare_companies.'),
54
55
  label: z.string().describe('Human-readable concept label.'),
55
56
  tags: z
56
57
  .array(z.string())
@@ -1 +1 @@
1
- {"version":3,"file":"search-concepts.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,MAAM,YAAY,GAAG;IACnB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,WAAW;IACX,aAAa;CAC6B,CAAC;AAE7C,MAAM,eAAe,GAAG;IACtB,SAAS;IACT,WAAW;IACX,KAAK;CACwC,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACjE,WAAW,EACT,6UAA6U;IAC/U,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAE/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,yPAAyP,CAC1P;QACH,KAAK,EAAE,CAAC;aACL,IAAI,CAAC,YAAY,CAAC;aAClB,QAAQ,EAAE;aACV,QAAQ,CACP,uRAAuR,CACxR;QACH,QAAQ,EAAE,CAAC;aACR,IAAI,CAAC,eAAe,CAAC;aACrB,QAAQ,EAAE;aACV,QAAQ,CACP,6GAA6G,CAC9G;KACJ,CAAC;IAEF,8EAA8E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GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7E,KAAK,CAAC,IAAI,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,WAAW,CAAC,KAAmB;IACtC,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"search-concepts.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-concepts.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,MAAM,YAAY,GAAG;IACnB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,WAAW;IACX,aAAa;CAC6B,CAAC;AAE7C,MAAM,eAAe,GAAG;IACtB,SAAS;IACT,WAAW;IACX,KAAK;CACwC,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACjE,WAAW,EACT,0WAA0W;IAC5W,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAE/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;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IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChF,CAAC;YACD,IAAI,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;gBAC3B,MAAM,GAAG,GAAG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC7E,KAAK,CAAC,IAAI,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,WAAW,CAAC,KAAmB;IACtC,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
@@ -4,10 +4,43 @@
4
4
  */
5
5
  import type { ConceptMapping, ConceptTaxonomy, TagSelection } from './types.js';
6
6
  /**
7
- * Resolve a concept input to its mapping. Accepts friendly names or raw XBRL tags.
8
- * Returns undefined if the input is not a known friendly name (caller should treat it as a raw tag).
7
+ * Resolve a concept input to its mapping. Accepts friendly names in any case or
8
+ * separator form (`Net Income`, `NET_INCOME`), with surrounding whitespace ignored.
9
+ * Returns undefined if the input is not a known friendly name.
9
10
  */
10
11
  export declare function resolveConcept(input: string): ConceptMapping | undefined;
12
+ /** A concept input that is neither a catalog name nor shaped like an XBRL element name. */
13
+ export interface UnknownConcept {
14
+ /** The input as supplied, trimmed. */
15
+ concept: string;
16
+ /** How to build it from catalog concepts, when it is a standard combination of them. */
17
+ derivation?: string | undefined;
18
+ /** Up to three nearest catalog names. Empty when a derivation applies or nothing is close. */
19
+ suggestions: string[];
20
+ }
21
+ /**
22
+ * Recovery text for one unknown concept: its derivation or its suggestions,
23
+ * then the pointer to secedgar_search_concepts. Every surface that reports an
24
+ * unknown concept words it with this.
25
+ */
26
+ export declare function unknownConceptHint(unknown: UnknownConcept): string;
27
+ /**
28
+ * Classify a concept input before any company resolution or SEC request.
29
+ * Returns undefined for a catalog name (any case or separator form) and for
30
+ * anything shaped like an XBRL element name — a well-formed tag the filer does
31
+ * not report stays the tool's own no-data answer (#45). Everything else is
32
+ * unknown, with its derivation or nearest catalog names (#128).
33
+ */
34
+ export declare function findUnknownConcept(input: string): UnknownConcept | undefined;
35
+ /**
36
+ * Message and recovery hint for failing on one or more unknown concepts, so
37
+ * every tool words the failure the same way. One concept carries its own hint;
38
+ * several name each concept's detail in turn, then the shared closing sentence.
39
+ */
40
+ export declare function describeUnknownConcepts(unknowns: readonly UnknownConcept[]): {
41
+ hint: string;
42
+ message: string;
43
+ };
11
44
  /** What a caller-supplied concept resolves to before any lookup runs. */
12
45
  export interface ConceptTarget {
13
46
  /** Human-readable label — the mapping's label, or the raw tag itself. */
@@ -26,8 +59,9 @@ export interface ConceptTarget {
26
59
  * list to query. A friendly name that prefers its own taxonomy (`dei` for
27
60
  * shares_outstanding) keeps it unless the caller asked for something other than
28
61
  * the `us-gaap` default; `ifrs-full` uses the mapping's confirmed IFRS variants
29
- * when it has them and falls back to the standard tags otherwise. Unknown input
30
- * passes through as a raw XBRL tag under the requested taxonomy.
62
+ * when it has them and falls back to the standard tags otherwise. Any other
63
+ * input passes through, trimmed, as a raw XBRL tag under the requested
64
+ * taxonomy — callers reject what `findUnknownConcept` flags before this runs.
31
65
  */
32
66
  export declare function resolveConceptTarget(input: string, requestedTaxonomy: ConceptTaxonomy): ConceptTarget;
33
67
  /** Get all concept mappings for reference resource generation. */
@@ -1 +1 @@
1
- {"version":3,"file":"concept-map.d.ts","sourceRoot":"","sources":["../../../src/services/edgar/concept-map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA4chF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAGxE;AAED,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,YAAY,EAAE,YAAY,CAAC;IAC3B,qEAAqE;IACrE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0CAA0C;IAC1C,QAAQ,EAAE,eAAe,CAAC;IAC1B,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,eAAe,GACjC,aAAa,CAiBf;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAE/D;AAED,wFAAwF;AACxF,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,YAAY,EAAE,CAI7C;AAUD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAqB/E"}
1
+ {"version":3,"file":"concept-map.d.ts","sourceRoot":"","sources":["../../../src/services/edgar/concept-map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAwhBhF;;;;GAIG;AACH,wBAAgB,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