Add a search tool that resolves names to tickers and CIKs - #40
Merged
Merged
Conversation
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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
GET /v1/searchwent 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 insrc/index.ts: toolsearch, 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 toSERVER_INSTRUCTIONS.src/types.ts:SearchResponse,SearchCompanyResult,SearchInsiderResult.codegen/generate.mjs:'Search'added toHANDLED_BY_HANDWRITTEN, otherwise codegen would generate a secondsearchtool._generated.tscontent unchanged.server.jsondescription "38 tools + 6 prompts" (100/100 chars).CHANGELOG.md:## [Unreleased]entry.No version bump, not published.
package.jsonandserver.jsonstay at 1.15.0.Verification
npm run buildclean;npm test68 / 27 / 3 / 35 passed (tools/list returns 38);npm run codegen:checkin sync with the live spec.Heads-up
feat/option-a-launchalso editssrc/index.ts,src/types.ts,test/mcp-test.mjs,server.json,README.mdandCHANGELOG.md; expect small conflicts (tool counts, CHANGELOG) on whichever merges second.