audit_stocks
Check a watchlist or holdings against preset screens in one call to see which screens each stock passes, which it nearly passes, and which rules a position fails today.
Instructions
Check a watchlist or holdings against the preset screens in one call: which screens each stock passes, and which it nearly passes.
Use it to review a list of stocks, find near misses, or see what a position fails today. Use
get_stock for every field on one symbol, and run_screen to discover new candidates. A long list
over every screen returns a lot of text, so pass a screens list when you only need some.
Each stock returns a snapshot, passes (screen ids in list_screens order, matching the website
and get_stock's passes_screens), near_misses, and notes when there are any. The top-level screens
list minus passes gives the failing ids.
near_misses maps each screen the stock fails on exactly one of at least two rules to
"field short_by N", or to the field alone when short_by is absent. It ignores how far short the
stock is, so check short_by before calling one close. short_by is the positive distance between a
failed numeric rule's bound and the stock's value (rs_rating 60 against a min of 70 is short_by 10);
on a max rule it is how far the value is above the bound (ibd_group_rank 154 against a max of 40 is
short_by 114); it is absent when the value is missing and on non-numeric rules. notes maps a screen
to the reason when its rules alone don't explain the result: a failing optional rule group, or a
disabled required group.
detail=True adds failed_rules: every failed rule for each failing screen. Any response over 80,000
characters of JSON is refused with an error that says how many symbols fit, so for detail pass fewer
symbols or a shorter screens list.
Symbols absent from the market's scan are listed in not_found rather than raising an error.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbols": "<symbols>"
},
"name": "audit_stocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | Also return every failed rule per screen under failed_rules. Responses over 80,000 characters are refused with a hint of how many symbols fit. | |
| market | No | Market code, e.g. US, HK, JP, IN, DE. See list_markets. | US |
| screens | No | Preset ids from list_screens to check; defaults to every screen in the market. | |
| symbols | Yes | Tickers to check in this market, e.g. a watchlist or holdings. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||