Skip to content

Enforce SEC filing read locators#2

Open
gyx09212214-prog wants to merge 1 commit into
LLMQuant:masterfrom
gyx09212214-prog:enforce-sec-filing-read-locators
Open

Enforce SEC filing read locators#2
gyx09212214-prog wants to merge 1 commit into
LLMQuant:masterfrom
gyx09212214-prog:enforce-sec-filing-read-locators

Conversation

@gyx09212214-prog

Copy link
Copy Markdown

Summary

  • enforce the existing sec_filing_read locator contract in the Zod schema
  • require year for 10-K reads when accession_number is omitted
  • require both year and quarter for 10-Q reads when accession_number is omitted
  • add regression coverage for missing 10-K and 10-Q locators, plus the accepted 10-K year lookup

Why

The tool description already tells agents that 10-K reads need year and 10-Q reads need year + quarter unless they pass an exact accession_number. The schema did not enforce that contract, so an MCP client could send an under-specified request to the Web API and only discover the problem downstream.

This keeps the progressive disclosure flow tighter: browse first when needed, or pass a complete filing locator before calling sec_filing_read.

Tests

  • node --import tsx --test src\\tools\\sec-tools.test.ts
  • npm run typecheck
  • npm run lint
  • npm test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant