@etsquare/mcp-server-sec 0.6.2 → 0.7.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 (2) hide show
  1. package/dist/index.js +27 -92
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -372,9 +372,7 @@ server.registerTool = ((name, config, handler) => {
372
372
  // ─── Tool 1: Company Lookup ─────────────────────────────────────────────────
373
373
  server.registerTool('etsquare_lookup_company', {
374
374
  title: 'Look Up Company Ticker',
375
- description: 'Resolve a company name or partial ticker to its official SEC ticker symbol and CIK number. ' +
376
- 'Call this when a user mentions a company by name (e.g., "Apple" -> AAPL, "Texas Roadhouse" -> TXRH). ' +
377
- 'Returns ticker, company name, CIK, and SIC industry code.',
375
+ description: 'Resolve company name to ticker/CIK. Call before other tools when user gives a name, not a ticker.',
378
376
  inputSchema: {
379
377
  query: z.string().min(2).describe('Company name or partial ticker to look up (e.g., "Apple", "Texas Road", "NVDA")'),
380
378
  limit: z.number().min(1).max(10).default(5).describe('Max results to return'),
@@ -415,21 +413,13 @@ server.registerTool('etsquare_lookup_company', {
415
413
  // ─── Tool 2: SEC Filing Search ──────────────────────────────────────────────
416
414
  server.registerTool('etsquare_search', {
417
415
  title: 'Search SEC Filings',
418
- description: 'Search 4.0M+ SEC filing sections (10-K, 10-Q, 8-K) with hybrid retrieval. ' +
419
- 'Returns verbatim filing text with citations best for qualitative research.\n\n' +
420
- 'Execution contract (required):\n' +
421
- '- mode_lock: NARRATIVE (recommended) | HYBRID\n' +
422
- '- scope_lock: COMPANY (specific tickers) | INDUSTRY (SIC sector) | MACRO (cross-market)\n\n' +
423
- 'For canonical financial statements (income statement, balance sheet, cash flow), use etsquare_financial_statements.\n' +
424
- 'For custom financial queries or peer comparisons, use etsquare_discover_metrics + etsquare_execute_metrics.\n\n' +
425
- 'For INDUSTRY scope, use sector to target a specific industry (e.g., sector="semiconductors"). ' +
426
- 'Use tickers to scope to specific companies (resolve names first with etsquare_lookup_company). ' +
427
- 'Results include filing text plus safe citation metadata such as chunk_id, accession number, and SEC URL for follow-up retrieval.\n\n' +
428
- 'Set response_format="structured" for typed JSON with search_context, layout hints, and chart-ready data.',
416
+ description: 'Search SEC filing text (10-K, 10-Q, 8-K). Returns verbatim excerpts with SEC URL citations.\n\n' +
417
+ 'COMPANY + tickers = precision. INDUSTRY + sector = breadth. When precision matters, supply tickers.\n\n' +
418
+ 'For financial statements use etsquare_financial_statements. For metrics use etsquare_discover_metrics.',
429
419
  inputSchema: {
430
420
  query: z.string().min(3).describe('What to search for in SEC filings (e.g., "customer concentration risk", "Show NVDA revenue trend")'),
431
421
  mode_lock: z.enum(['NARRATIVE', 'HYBRID']).describe('NARRATIVE for text search, HYBRID for text + any available metrics'),
432
- scope_lock: z.enum(['COMPANY', 'INDUSTRY', 'MACRO']).describe('COMPANY for specific tickers, INDUSTRY for SIC sector-wide, MACRO for cross-market'),
422
+ scope_lock: z.enum(['COMPANY', 'INDUSTRY', 'MACRO']).describe('COMPANY = specific tickers (precision). INDUSTRY = sector-wide (breadth). MACRO = cross-market.'),
433
423
  top_k: z.number().min(1).max(50).default(5).describe('Number of results to return (default: 5)'),
434
424
  tickers: z.array(z.string()).optional().describe('Limit to specific companies by ticker (e.g., ["AAPL", "MSFT"])'),
435
425
  doc_types: z.array(z.string()).optional().describe('Limit by SEC form type: "10-k", "10-q", "8-k"'),
@@ -613,12 +603,8 @@ server.registerTool('etsquare_search', {
613
603
  // ─── Tool 3: Execute Metrics ────────────────────────────────────────────────
614
604
  server.registerTool('etsquare_financial_statements', {
615
605
  title: 'Get Financial Statements',
616
- description: 'Get canonical income statement, balance sheet, or cash flow statement for a company. ' +
617
- 'Assembles structured line items from XBRL facts with concept precedence and provenance.\n\n' +
618
- 'Each line item includes the selected XBRL concept, priority rank, and unit for auditability.\n\n' +
619
- 'Coverage: ~5,100 tickers for income statement and cash flow. ' +
620
- 'Balance sheet coverage is limited for some companies pending XBRL pipeline enhancement.\n\n' +
621
- 'For custom financial queries or peer comparisons, use etsquare_discover_metrics + etsquare_execute_metrics instead.',
606
+ description: 'Canonical income statement, balance sheet, or cash flow from XBRL. ~5,100 tickers. ' +
607
+ 'For custom queries or peer comparisons, use etsquare_discover_metrics instead.',
622
608
  inputSchema: {
623
609
  ticker: z.string().min(1).max(10).describe('Company ticker (e.g., "AAPL", "NVDA")'),
624
610
  statement_type: z.enum(['income_statement', 'balance_sheet', 'cash_flow'])
@@ -715,11 +701,7 @@ server.registerTool('etsquare_financial_statements', {
715
701
  });
716
702
  server.registerTool('etsquare_insider_trades', {
717
703
  title: 'Insider Trading Activity',
718
- description: 'Get insider buying and selling activity for a company from SEC Form 3/4/5 filings. ' +
719
- 'Shows officer/director stock purchases, sales, option exercises, and tax withholdings.\n\n' +
720
- 'Data is sourced directly from SEC EDGAR ownership filings, filed within 2 business days of each transaction.\n\n' +
721
- 'Summary includes open-market buy/sell counts, net shares, and total values. ' +
722
- 'Derivative transactions (options, RSUs) are separated from open-market trades.',
704
+ description: 'Insider buy/sell activity from SEC Form 3/4/5. Open-market trades + derivatives (options, RSUs).',
723
705
  inputSchema: {
724
706
  ticker: z.string().min(1).max(10).describe('Company ticker (e.g., "AAPL", "NVDA")'),
725
707
  days_back: z.number().min(1).max(730).default(90)
@@ -797,12 +779,7 @@ server.registerTool('etsquare_insider_trades', {
797
779
  });
798
780
  server.registerTool('etsquare_institutional_holdings', {
799
781
  title: 'Institutional Ownership (13F)',
800
- description: 'Get institutional investor holdings for a company from SEC 13F filings. ' +
801
- 'Shows tracked managers holding the stock, their position sizes, and portfolio concentration.\n\n' +
802
- 'Data is from tracked institutional managers (top filers by AUM). ' +
803
- 'Coverage is partial — not all institutional holders are tracked. ' +
804
- 'Multiple rows per manager may appear due to sub-manager reporting. ' +
805
- 'Source: SEC EDGAR 13F-HR filings, filed quarterly.',
782
+ description: 'Institutional holdings from SEC 13F filings. Position sizes, portfolio concentration, quarterly changes.',
806
783
  inputSchema: {
807
784
  ticker: z.string().min(1).max(10).describe('Company ticker (e.g., "NVDA", "AAPL")'),
808
785
  quarters: z.number().min(1).max(8).default(2)
@@ -893,14 +870,8 @@ server.registerTool('etsquare_institutional_holdings', {
893
870
  });
894
871
  server.registerTool('etsquare_earnings_actuals', {
895
872
  title: 'Earnings Actuals & Guidance',
896
- description: 'Get issuer-reported earnings actuals and forward guidance for a company from SEC 8-K filings. ' +
897
- 'Extracts revenue, EPS (basic/diluted), and net income from Item 2.02 press releases.\n\n' +
898
- 'Values are deterministically extracted from exhibit press releases (EX-99.1) attached to 8-K filings. ' +
899
- 'Only explicit issuer-reported values are included — no analyst estimates or consensus.\n\n' +
900
- 'Guidance shows forward-looking ranges (low/high) when the issuer provides them.\n\n' +
901
- 'Coverage: ~1,900 tickers, most recent 1-2 quarters (Dec 2025 onward). ' +
902
- 'Historical depth is expanding — some tickers may have fewer quarters than requested.\n\n' +
903
- 'Source: SEC EDGAR 8-K Item 2.02 filings with attached press releases.',
873
+ description: 'Issuer-reported earnings actuals + guidance from 8-K press releases. Revenue, EPS, net income. ' +
874
+ 'No analyst estimates SEC filings only. ~1,900 tickers.',
904
875
  inputSchema: {
905
876
  ticker: z.string().min(1).max(10).describe('Company ticker (e.g., "AAPL", "NVDA")'),
906
877
  quarters: z.number().min(1).max(20).default(4)
@@ -1015,14 +986,8 @@ server.registerTool('etsquare_earnings_actuals', {
1015
986
  });
1016
987
  server.registerTool('etsquare_kpi_extractions', {
1017
988
  title: 'Get KPI Extractions (Full Detail + Source Chunk IDs)',
1018
- description: 'Returns full KPI extraction detail including source_chunk_ids for provenance.\n\n' +
1019
- 'USE THIS TOOL for the provenance chain:\n' +
1020
- ' 1. etsquare_query_kpis -> find interesting metric + extraction_id\n' +
1021
- ' 2. etsquare_kpi_extractions(ticker, sector) -> get source_chunk_ids array\n' +
1022
- ' 3. etsquare_get_chunk(chunk_id) -> read actual filing paragraph\n\n' +
1023
- 'Also use when you need the complete kpi_json payload for deep analysis of a single ticker.\n\n' +
1024
- 'RETURNS: extraction_id, kpi_json (full), source_chunk_ids (array of chunk IDs), notes, extraction_model.\n\n' +
1025
- 'For compact tabular queries across many tickers, prefer etsquare_query_kpis instead.',
989
+ description: 'Full KPI extraction with source_chunk_ids for provenance. Use etsquare_get_chunk to read the source filing text. ' +
990
+ 'For tabular queries across many tickers, prefer etsquare_query_kpis.',
1026
991
  inputSchema: {
1027
992
  ticker: z.string().min(1).max(10).optional()
1028
993
  .describe('Single ticker filter (e.g., "TXRH")'),
@@ -1137,20 +1102,9 @@ server.registerTool('etsquare_kpi_extractions', {
1137
1102
  });
1138
1103
  server.registerTool('etsquare_query_kpis', {
1139
1104
  title: 'Query KPI Extractions (Compare, Screen, Catalog)',
1140
- description: 'Server-side filtered KPI query. Returns compact tabular data with values + YoY changes + summary stats.\n\n' +
1141
- 'WORKFLOW: action="list_metrics" -> discover metrics -> action="query" with select/filter\n\n' +
1142
- 'EXAMPLES:\n' +
1143
- ' Peer comp: select="net_interest_margin,cet1_ratio,return_on_tangible_common_equity", sector="banks", period="FY"\n' +
1144
- ' Screen: filter="net_interest_margin>3;cet1_ratio>11", sector="banks", period="FY"\n' +
1145
- ' SaaS: select="arr,net_dollar_retention,free_cash_flow_margin", sector="saas", sort_by="arr"\n' +
1146
- ' Catalog: action="list_metrics", sector="banks"\n' +
1147
- ' Time series: select="net_interest_margin", tickers="JPM", limit=20\n\n' +
1148
- 'OUTPUT: Each row includes ticker, company_name, extraction_id, metric_value, metric_chg (YoY), metric_unit.\n' +
1149
- ' Summary stats (min/max/avg/median) per metric included.\n\n' +
1150
- 'PROVENANCE CHAIN: Results include extraction_id. To read source MD&A text:\n' +
1151
- ' 1. etsquare_query_kpis -> get extraction_id\n' +
1152
- ' 2. etsquare_kpi_extractions(ticker) -> get source_chunk_ids\n' +
1153
- ' 3. etsquare_get_chunk(chunk_id) -> read actual filing paragraph\n' +
1105
+ description: 'Tabular KPI query with select/filter/sort. Returns values + YoY changes + summary stats.\n\n' +
1106
+ 'action="list_metrics" to discover available metrics for a sector, then action="query" with select/filter.\n\n' +
1107
+ 'Examples: select="arr,net_dollar_retention", sector="saas" | filter="net_interest_margin>3", sector="banks"\n' +
1154
1108
  'Use when a number looks surprising or needs management context.',
1155
1109
  inputSchema: {
1156
1110
  select: z.string().optional()
@@ -1316,12 +1270,8 @@ server.registerTool('etsquare_query_kpis', {
1316
1270
  });
1317
1271
  server.registerTool('etsquare_execute_metrics', {
1318
1272
  title: 'Execute Financial Metrics Query',
1319
- description: 'Execute an XBRL metrics template by template_id to get structured financial data ' +
1320
- '(numbers, ratios, time series). Returns tabular rows with columns like revenue, margins, EPS, etc.\n\n' +
1321
- 'Common bind_params: p_tickers (comma-separated tickers), p_ticker (single ticker), p_sic_code (industry), ' +
1322
- 'p_start_year / p_end_year (time range, e.g., 2023-2025).\n\n' +
1323
- 'Use the tickers array to pass multiple companies — automatically joins as p_tickers comma-separated string.\n\n' +
1324
- 'Set response_format="structured" for typed JSON with column metadata, visualization hints, and summary stats.',
1273
+ description: 'Execute XBRL metrics template by template_id. Returns tabular financial data. ' +
1274
+ 'Use tickers array for multi-company. Common params: p_ticker, p_tickers, p_sic_code, p_start_year, p_end_year.',
1325
1275
  inputSchema: {
1326
1276
  template_id: z.string().min(10).describe('Template ID for metrics execution'),
1327
1277
  bind_params: z.record(z.unknown()).optional().describe('Template parameters as key-value pairs'),
@@ -1469,14 +1419,9 @@ server.registerTool('etsquare_execute_metrics', {
1469
1419
  // ─── Tool 4: Discover Metrics Templates ─────────────────────────────────────
1470
1420
  server.registerTool('etsquare_discover_metrics', {
1471
1421
  title: 'Discover Financial Metrics Templates',
1472
- description: 'Find available XBRL metrics templates by business question. ' +
1473
- 'Returns template IDs and metadata use the template_id with etsquare_execute_metrics.\n\n' +
1474
- 'Use this only for structured metrics such as revenue, gross margin, operating margin, EPS, debt, liquidity, or cash flow.\n\n' +
1475
- 'Do not use this for narrative KPI questions like same-store sales, comparable sales, traffic, guest count, average check, or AUV. ' +
1476
- 'For those, use etsquare_search in NARRATIVE mode instead.\n\n' +
1477
- 'Example: "revenue trend by quarter" → returns matching templates with their required bind_params.\n\n' +
1478
- 'Workflow: discover_metrics → pick template_id → execute_metrics with bind_params.\n\n' +
1479
- 'Set response_format="structured" for JSON with similarity scores and visualization hints.',
1422
+ description: 'Find XBRL metrics templates by question. Returns template_id → use with etsquare_execute_metrics.\n\n' +
1423
+ 'For XBRL metrics (revenue, margins, EPS, debt, cash flow) only. ' +
1424
+ 'For narrative KPIs (comps, traffic, ARR), use etsquare_search or etsquare_query_kpis instead.',
1480
1425
  inputSchema: {
1481
1426
  question: z.string().min(3).describe('Structured metrics question (e.g., "revenue trend by quarter", "gross margin trend", "EPS trend")'),
1482
1427
  scenario: z.enum(['snapshot', 'trends', 'peer_benchmark']).optional().describe('Filter by scenario type'),
@@ -1586,9 +1531,7 @@ server.registerTool('etsquare_discover_metrics', {
1586
1531
  // ─── Tool 5: Get Full Chunk Text ────────────────────────────────────────────
1587
1532
  server.registerTool('etsquare_get_chunk', {
1588
1533
  title: 'Get Full Chunk Text',
1589
- description: 'Fetch the full text for a specific search result chunk. ' +
1590
- 'Use this when etsquare_search returns a truncated snippet and you need the complete chunk text. ' +
1591
- 'Requires both chunk_id and execution_id from a prior search result.',
1534
+ description: 'Fetch full chunk text when etsquare_search returned a truncated snippet.',
1592
1535
  inputSchema: {
1593
1536
  chunk_id: z.string().length(32).describe('Chunk ID from etsquare_search output'),
1594
1537
  execution_id: z.string().min(32).describe('Execution ID from the etsquare_search response header'),
@@ -1625,8 +1568,7 @@ server.registerTool('etsquare_get_chunk', {
1625
1568
  // ─── Tool 6: Get Chunk Context ──────────────────────────────────────────────
1626
1569
  server.registerTool('etsquare_get_chunk_context', {
1627
1570
  title: 'Get Chunk Context',
1628
- description: 'Fetch the highlighted chunk plus surrounding context from the same filing section. ' +
1629
- 'Use this when you need the paragraphs immediately before and after a search hit.',
1571
+ description: 'Fetch chunk with surrounding paragraphs from the same filing section.',
1630
1572
  inputSchema: {
1631
1573
  chunk_id: z.string().length(32).describe('Chunk ID from etsquare_search output'),
1632
1574
  neighbor_span: z.number().min(0).max(5).default(1).optional().describe('How many adjacent chunks to include before and after'),
@@ -1686,11 +1628,8 @@ server.registerTool('etsquare_get_chunk_context', {
1686
1628
  // ─── Tool 7: Compare Companies ──────────────────────────────────────────────
1687
1629
  server.registerTool('etsquare_compare', {
1688
1630
  title: 'Compare Companies in SEC Filings',
1689
- description: 'Compare 2-5 companies across SEC filings in a single call. ' +
1690
- 'Returns per-ticker results grouped for easy side-by-side analysis.\n\n' +
1691
- 'Resolve company names to tickers first with etsquare_lookup_company.\n\n' +
1692
- 'Use mode_lock=HYBRID to include both narrative text and structured metrics.\n\n' +
1693
- 'Always returns structured JSON (comparison results are inherently structured).',
1631
+ description: 'Compare 2-5 companies side-by-side across SEC filings. Returns per-ticker grouped results. ' +
1632
+ 'Use HYBRID mode for text + metrics together.',
1694
1633
  inputSchema: {
1695
1634
  tickers: z.array(z.string()).min(2).max(5)
1696
1635
  .describe('Company tickers to compare (2-5). Resolve names first with etsquare_lookup_company.'),
@@ -1790,10 +1729,7 @@ server.registerTool('etsquare_compare', {
1790
1729
  // ─── Tool 8: Weekly Brief ───────────────────────────────────────────────────
1791
1730
  server.registerTool('etsquare_weekly_brief', {
1792
1731
  title: 'Weekly SEC Filing Intelligence Brief',
1793
- description: 'Get the latest weekly SEC filing intelligence brief. ' +
1794
- 'Returns notable 8-K events, edge signals (unusual filings), and sector heatmap. ' +
1795
- 'Updated weekly. Great for market monitoring and identifying emerging risks.\n\n' +
1796
- 'Default response_format is "structured" (full JSON). Use "text" for readable summary.',
1732
+ description: 'Weekly SEC filing brief: notable 8-K events, edge signals, sector heatmap. Updated weekly.',
1797
1733
  inputSchema: {
1798
1734
  sections: z.array(z.enum(['notable', 'edge_signals', 'heatmap', 'methodology'])).optional()
1799
1735
  .describe('Filter to specific sections. Returns all if omitted.'),
@@ -1879,8 +1815,7 @@ server.registerTool('etsquare_weekly_brief', {
1879
1815
  // ─── Tool 9: Company Research ──────────────────────────────────────────────
1880
1816
  server.registerTool('etsquare_company_research', {
1881
1817
  title: 'Company Research Packet',
1882
- description: 'Returns a citation-grounded research packet for one company in a single call. ' +
1883
- 'Server-side orchestration assembles financials, earnings, narrative, ownership, and KPIs with SEC provenance.',
1818
+ description: 'Full research packet for one company: financials, earnings, narrative, ownership, KPIs. Single call.',
1884
1819
  inputSchema: {
1885
1820
  ticker: z.string().min(1).max(10)
1886
1821
  .describe('Company ticker (e.g., "AAPL", "NVDA"). Resolve names first with etsquare_lookup_company.'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsquare/mcp-server-sec",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "MCP server for Claude Desktop: search SEC filing sections, financial statements, insider trades, institutional ownership, earnings actuals, XBRL metrics, and company lookup.",
6
6
  "main": "dist/index.js",