Skip to content

bug(get_filing): documents array bloated with XBRL viewer artifacts #3

@cyanheads

Description

@cyanheads

Server version

0.4.1

mcp-ts-core version

0.8.11

Runtime

Bun

Runtime version

1.3.11

Transport

stdio

Description

Every secedgar_get_filing response returns a documents array dominated by XBRL viewer artifacts that no LLM agent or human consumer would meaningfully fetch. For a typical 10-K (e.g. NVIDIA 0001045810-26-000021), the array contains ~110 entries — R1.htm through R89.htm, *_cal.xml, *_def.xml, *_lab.xml, *_pre.xml, MetaLinks.json, Show.js, report.css. The signal documents (primary .htm, exhibits like ex-21, certifications, audit consent) are buried.

This makes the response large and noisy. An agent inspecting documents to decide what to fetch next has to scan past 100+ irrelevant entries.

Steps to reproduce

  1. Call secedgar_get_filing with accession_number: "0001045810-26-000021", cik: "1045810", content_limit: 10000.
  2. Inspect documents in the response.

Actual behavior

documents array contains 110 entries, ~95% of which are XBRL rendering fragments (R*.htm) or XBRL source files.

Expected behavior

Response groups documents by category and suppresses viewer fragments by default. Suggested shape:

"documents": {
  "primary": [{"name": "nvda-20260125.htm", "size": 1967816}],
  "exhibits": [
    {"name": "subsidiariesofregistrantfy.htm", "size": 3583, "type": "ex-21"},
    {"name": "nvda-2026xex311.htm", "size": 8584, "type": "ex-31.1"}
  ],
  "auxiliary": [{"name": "a2026auditorconsentletter.htm", "size": 2030}]
}

XBRL machine-readable files (*_cal.xml, *_def.xml, *_lab.xml, *_pre.xml, MetaLinks.json, R*.htm) suppressed unless an include_xbrl: true flag is passed.

Additional context

The bloat is consistent across every filing fetched. A separate secedgar_list_exhibits tool could solve part of this cleanly, but trimming the documents array on get_filing is the lower-cost fix and benefits every call.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions