cigar-butt
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ETRADE_ENV | No | Optional. Selects the E*TRADE environment (sandbox or production). An exported value overrides the stored setting. | |
| FRED_API_KEY | No | Optional. Provides Moody's Aaa (Graham's earnings-yield hurdle), CPI and the 10-year. Used by macro_context. | |
| SEC_USER_AGENT | No | Required by SEC EDGAR to identify callers. A descriptive string containing a real name and email address, e.g. "Your Name your-email@example.com". Needed by analyze_ticker, check_disqualifiers and screen_market. No registration required. | |
| TIINGO_API_KEY | No | One of the three price-provider keys. Split- and dividend-adjusted daily closes; best free option. Used by get_quotes and the P/TBV and price-to-NCAV verdicts. | |
| POLYGON_API_KEY | No | One of the three price-provider keys. Whole-market bars, delisting reference data and corporate actions. | |
| CIGAR_BUTT_CACHE | No | Cache database location. Default: $XDG_CACHE_HOME/cigar-butt/cache.sqlite | |
| CIGAR_BUTT_CONFIG | No | Where credentials are stored. Default: $XDG_CONFIG_HOME/cigar-butt/credentials.json | |
| CIGAR_BUTT_ENV_FILE | No | Load credentials from this dotenv file instead of the default locations. | |
| CIGAR_BUTT_NO_CACHE | No | Set to 1 to bypass the local response cache entirely. | |
| ETRADE_CONSUMER_KEY | No | Optional. E*TRADE API consumer key, used to read real holdings and cash. | |
| ALPHAVANTAGE_API_KEY | No | One of the three price-provider keys. Fundamentals cross-check and last-resort quote. | |
| ETRADE_CONSUMER_SECRET | No | Optional. E*TRADE API consumer secret. | |
| ETRADE_PROD_CONSUMER_KEY | No | Optional. E*TRADE production consumer key. Stored separately from the sandbox pair. | |
| CIGAR_BUTT_PROVIDER_ORDER | No | Price-provider preference order, e.g. "polygon,tiingo". Unlisted providers keep their default order behind these. | |
| CIGAR_BUTT_RATE_<PROVIDER> | No | Requests per second for a provider, e.g. CIGAR_BUTT_RATE_POLYGON=100. Overrides free-tier defaults for a paid plan. | |
| ETRADE_PROD_CONSUMER_SECRET | No | Optional. E*TRADE production consumer secret. | |
| ETRADE_SANDBOX_CONSUMER_KEY | No | Optional. E*TRADE sandbox consumer key. Stored separately from the production pair; switched with the etrade_environment tool. | |
| ETRADE_SANDBOX_CONSUMER_SECRET | No | Optional. E*TRADE sandbox consumer secret. | |
| CIGAR_BUTT_BUDGET_<PROVIDER>_<PERIOD> | No | Call budget for a provider and period, e.g. CIGAR_BUTT_BUDGET_POLYGON_MINUTE=0. 0 means unlimited. Overrides free-tier defaults for a paid plan. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| setup_statusA | Report which API credentials are configured, where each value came from, and the sign-up URL for anything missing. Call this first in a new session, and whenever another tool reports that the server is not configured. |
| setup_credentialsA | Store API credentials for this server. Call with no arguments to prompt the user for them. Call with arguments to save values the user has already given you. Values are written to a 0600 file in the user config directory, never into a project. Pass an empty string to remove a credential. |
| check_disqualifiersA | Scan a company's SEC filing index for the events that void a deep-value thesis: 8-K item 4.02 (non-reliance on prior financials), 4.01 (auditor change), 1.03 (bankruptcy), 3.01 (listing deficiency), 2.06 (impairment), Form 25/25-NSE (delisting), NT 10-Q/NT 10-K (late filing), and filing gaps. Costs one request. Run this BEFORE any valuation work — a name that fails here is dead regardless of how cheap it looks, and no ratio would catch it. |
| analyze_tickerA | Full deep-value workup for one name: the disqualifier scan first, then tangible book, NCAV, NNWC and net cash computed from SEC XBRL line items, then a current price, then the Schloss and Graham verdicts. Every figure carries the filing it came from and the date it was filed. Returns the disqualifier findings and stops before valuation if the name is disqualified. |
| get_quotesA | Current prices for a list of tickers, each with the date it is as of and the provider it came from. Providers are tried in order (Tiingo, Polygon, Alpha Vantage) and every failure is reported, so "no key", "bad ticker" and "rate limited" stay distinguishable. |
| macro_contextA | Fetch the macro figures Graham's tests are stated against: the Moody's Aaa corporate bond yield, the 10-year Treasury, and CPI with its trailing twelve-month change. Graham required an earnings yield of at least twice the Aaa yield, so the P/E a name must beat moves with the bond market — a fixed ceiling quoted from the book applies a 1973 bond yield to a current balance sheet. Every figure carries the date it is for. Needs a FRED key. |
| bank_call_reportA | Pull the latest FDIC call report for a bank, by name or FDIC certificate number. This is the asset test that works on a financial: enterprise value and net cash are meaningless for SIC 6000-6799, but tangible common equity over tangible assets, noncurrent loans over net loans, and the allowance held against those loans are exactly the figures a Schloss screen on a bank turns on. Straight from the quarterly call report, dated by report date. No credential required. Search by the holding company name — the SEC filer — and it will also match the insured bank underneath it. |
| check_corporate_actionsA | Check listing status and corporate actions for a ticker against Polygon reference data. Two things this catches that a ratio cannot. A split between the balance-sheet date and today makes every per-share figure derived from the filing wrong — the share count is pre-split and the price is post-split — and a reverse split makes a name look cheap by exactly the split factor. And a delisted ticker still resolves in the EDGAR index long after it stopped trading. Pass the balance-sheet period end as |
| short_interestA | FINRA consolidated short interest for one ticker — the market's own answer to "why is this cheap?". Free, no credential. Reports shares short, days to cover, and the trend across the reporting window. Heavy short interest on a sub-tangible-book name belongs in the reason the name is cheap; it is not an automatic veto, and Schloss owned plenty of names the market disliked. |
| fx_rateA | Exchange rate between two currencies, from the European Central Bank's daily reference rates via Frankfurter. No credential, no cap. Needed whenever a screen leaves the US — a balance sheet in yen cannot be compared against a dollar cash balance without one. Pass a date to get a historical rate, which is what a return calculation across currencies requires. |
| build_allocationA | Turn a verified candidate list and a cash balance into whole-share position targets. Equal weight by default, with a per-name cap and whole-share rounding that always rounds down, so the plan can never exceed the balance. Only pass names you have actually verified with |
| plan_rebalanceA | Compare current holdings against a target allocation and produce the buys, sells and full exits that close the gap. Compares market value, not share count, so a name that has re-rated shows as overweight. Sells are reported before buys because the proceeds fund them, and the plan says explicitly when the buys are not fundable from cash plus proceeds. |
| screen_marketA | Screen every SEC filer that reported in a quarter, using the XBRL |
| etrade_connectA | Connect this server to an ETRADE brokerage account over OAuth 1.0a. Call with no arguments to get an authorization URL for the user to open; ETRADE shows them a short verification code, which you pass back as |
| etrade_accountsA | List the ETRADE accounts this connection can read, with the |
| etrade_positionsA | Current holdings and investable cash for one E*TRADE account, each position marked at its last trade with the date that trade happened. The response ends with a JSON block in exactly the shape |
| etrade_environmentA | Show or switch which E*TRADE environment is active. Call with no argument to see which key pairs are configured and which is in use; pass |
| etrade_balancesA | Full balance detail for one E*TRADE account: cash available to invest, settled versus unsettled, buying power, margin balance, market value, and any open margin calls. Use this when the question is "what do I have to deploy?" — |
| etrade_transactionsA | Transaction history for one ETRADE account as a table: trades, dividends, transfers and fees, each with its date, symbol, quantity, price and amount. ETRADE keeps two years and pages at 50 rows. Useful for reconstructing cost basis, checking what a rebalance actually executed at, and separating dividend income from realised gains. |
| etrade_disconnectA | Revoke the stored E*TRADE access token and delete it, ending the session. The consumer key and secret are left in place, so |
| congress_tradesA | Search disclosed Senate stock transactions by ticker, by member, or both. No credential needed. This is the natural entry point: ask "who in the Senate traded ASTE?" and get every disclosed transaction in the index, with the committees each member sits on. eFD itself cannot be searched by ticker — its form takes a filer name, a state and a filing-date window and nothing else — so transactions are held in a local index. It refreshes itself when stale, and reports are immutable once filed, so keeping current costs only the new filings. Use |
| congress_indexA | Show how much Senate disclosure history is indexed locally, and extend it. Call with no arguments to report coverage; pass |
| congress_member_profileA | A senator's committee assignments, outside positions and board seats, and every employer paying the household — self, spouse or child — read from their most recent annual financial disclosure. This is the conflict-of-interest picture behind a trade: which industries they have authority over, which boards they sit on, and who else pays the family. Senate only; House annual disclosures are scanned PDFs. |
| congress_house_filingsA | Periodic transaction reports filed by House members, from the Clerk's official yearly index. No credential needed. This returns the filing record and a link to the PDF, NOT the transactions inside it — House disclosures are PDFs and many are scanned images, so the tickers and amounts are only readable by opening the document. For actual transaction detail use |
| edinet_searchA | Find recent Japanese regulatory filings by company name, TSE ticker or EDINET code, from the FSA’s EDINET system — Japan’s equivalent of SEC EDGAR. Returns document ids to pass to EDINET has no search-by-company endpoint; it is indexed by date, so this walks back one day at a time and each day is a request. Annual reports cluster in late June, because most Japanese companies close their books on 31 March and file within three months — so searching ten days in November will usually find nothing even for a company that files reliably. Set |
| edinet_financialsA | Balance-sheet line items and the Graham asset tests for a Japanese filer, read from its EDINET XBRL filing. Figures are in yen and converted to a currency of your choice at a dated ECB reference rate. This is the point of the Japanese path: net-nets have been far scarcer in the US than in Japan for a decade, and a Graham screen that cannot read these filings is looking in the wrong market. Get a document ID from |
| cache_statusA | Report what the local response cache holds, by source, and where the database file lives. Useful when a figure looks stale or when you want to know whether the next screen will hit the network. |
| cache_clearA | Drop cached responses so the next call refetches. Pass a source to clear just that one, or omit to clear everything. Use |
| provider_statusA | Show every price provider: whether it has a key, the rate it is being called at, and whether it is currently sitting out a free-tier cap. Providers are a failover pool — a request tries them in order and skips any that is unconfigured or cooling down — so this answers "why did that quote come from there?" and "why is this slow?". Pass |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| getting-started | Every credential this server can use, whether it is configured, and step-by-step instructions for obtaining each one — including how to create an E*TRADE sandbox and production API key. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 29 tools
Tools target well-separated purposes across distinct domains (SEC valuation, E*TRADE brokerage, Congress disclosures, Japanese EDINET, cache/provider infra). There is minor friction where check_disqualifiers overlaps with analyze_ticker (which also runs a disqualifier scan) and etrade_balances vs etrade_positions are close, but the descriptions explicitly draw those lines ("what do I have to deploy?" vs "what do I hold?"). An agent can reliably pick the right tool.
Everything is uniformly snake_case with consistent family prefixes (etrade_*, congress_*, edinet_*, cache_*, setup_*), which makes grouping obvious. The verb style is not uniform—some are verb_noun (get_quotes, analyze_ticker, plan_rebalance) while others are noun_noun (short_interest, fx_rate, bank_call_report)—so it falls short of a single predictable pattern.
29 tools is on the heavy side and sits at the boundary of the 'too many' band, though the breadth of scope (brokerage, SEC analysis, Congress, Japan, caching) justifies most of them. A few could be consolidated (cache_status/cache_clear, the E*TRADE credential tools), but each domain genuinely needs its surface.
Coverage of the deep-value workflow is strong end-to-end: screen_market → check_disqualifiers → analyze_ticker → quotes/macro/fx/corporate-actions → build_allocation → plan_rebalance, plus brokerage read and disclosure data. The main gap is that the E*TRADE integration is read-only—there is no order-placement tool, so a rebalance plan can be produced but not executed through the server.