Skip to content

Add a search tool that resolves names to tickers and CIKs - #40

Merged
theodor90 merged 1 commit into
mainfrom
feat/search
Sep 25, 2026
Merged

theodor90 merged 1 commit into
mainfrom
feat/search

Conversation

@theodor90

Copy link
Copy Markdown
Owner

Why

GET /v1/search went live on 2026-09-25 (insiderapi #314). Agents usually have a name ("Nvidia", "Tim Cook") and need a ticker or CIK before any other tool is useful.

Change

  • src/tools/search.ts + registration in src/index.ts: tool search, schema { q: string, limit?: 1-20 }. Description tells agents it is usually the first call when they have a name but no identifier, and what to call next. One sentence added to SERVER_INSTRUCTIONS.
  • src/types.ts: SearchResponse, SearchCompanyResult, SearchInsiderResult.
  • codegen/generate.mjs: 'Search' added to HANDLED_BY_HANDWRITTEN, otherwise codegen would generate a second search tool. _generated.ts content unchanged.
  • Counts: tests 37 → 38; README table and headline 35 → 36 (the README table already undercounted by 2 before this change; not reconciled here); server.json description "38 tools + 6 prompts" (100/100 chars).
  • CHANGELOG.md: ## [Unreleased] entry.

No version bump, not published. package.json and server.json stay at 1.15.0.

Verification

npm run build clean; npm test 68 / 27 / 3 / 35 passed (tools/list returns 38); npm run codegen:check in sync with the live spec.

Heads-up

feat/option-a-launch also edits src/index.ts, src/types.ts, test/mcp-test.mjs, server.json, README.md and CHANGELOG.md; expect small conflicts (tool counts, CHANGELOG) on whichever merges second.

Agents often start with a company or person's name and no identifier.
The new `search` tool wraps GET /v1/search (companies by ticker or name,
insiders by tokenised name) and its description frames it as the first
call in that situation, before get_company_overview or
get_insider_profile.

Hand-written rather than generated so the description can steer agents;
the "Search" operation is added to HANDLED_BY_HANDWRITTEN so codegen does
not emit a duplicate. Tool count 37 -> 38 in tests, README and the
server.json description. No version bump.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@theodor90
theodor90 merged commit bd2c787 into main Sep 25, 2026
2 checks passed
@theodor90
theodor90 deleted the feat/search branch September 25, 2026 19:54
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