Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ETRADE_ENVNoOptional. Selects the E*TRADE environment (sandbox or production). An exported value overrides the stored setting.
FRED_API_KEYNoOptional. Provides Moody's Aaa (Graham's earnings-yield hurdle), CPI and the 10-year. Used by macro_context.
SEC_USER_AGENTNoRequired 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_KEYNoOne 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_KEYNoOne of the three price-provider keys. Whole-market bars, delisting reference data and corporate actions.
CIGAR_BUTT_CACHENoCache database location. Default: $XDG_CACHE_HOME/cigar-butt/cache.sqlite
CIGAR_BUTT_CONFIGNoWhere credentials are stored. Default: $XDG_CONFIG_HOME/cigar-butt/credentials.json
CIGAR_BUTT_ENV_FILENoLoad credentials from this dotenv file instead of the default locations.
CIGAR_BUTT_NO_CACHENoSet to 1 to bypass the local response cache entirely.
ETRADE_CONSUMER_KEYNoOptional. E*TRADE API consumer key, used to read real holdings and cash.
ALPHAVANTAGE_API_KEYNoOne of the three price-provider keys. Fundamentals cross-check and last-resort quote.
ETRADE_CONSUMER_SECRETNoOptional. E*TRADE API consumer secret.
ETRADE_PROD_CONSUMER_KEYNoOptional. E*TRADE production consumer key. Stored separately from the sandbox pair.
CIGAR_BUTT_PROVIDER_ORDERNoPrice-provider preference order, e.g. "polygon,tiingo". Unlisted providers keep their default order behind these.
CIGAR_BUTT_RATE_<PROVIDER>NoRequests per second for a provider, e.g. CIGAR_BUTT_RATE_POLYGON=100. Overrides free-tier defaults for a paid plan.
ETRADE_PROD_CONSUMER_SECRETNoOptional. E*TRADE production consumer secret.
ETRADE_SANDBOX_CONSUMER_KEYNoOptional. E*TRADE sandbox consumer key. Stored separately from the production pair; switched with the etrade_environment tool.
ETRADE_SANDBOX_CONSUMER_SECRETNoOptional. E*TRADE sandbox consumer secret.
CIGAR_BUTT_BUDGET_<PROVIDER>_<PERIOD>NoCall 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

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 since.

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 analyze_ticker: a weighting implies a level of diligence a screen does not provide.

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 frames endpoint. Five requests total regardless of universe size. Computes tangible book and NCAV for the whole market from primary filing data — no commercial screener. Returns candidates ranked by NCAV as a share of tangible book. It attaches NO prices: pairing a stale quote with a filing figure is the mistake this server exists to prevent, so run analyze_ticker on the survivors to get a dated price and a verdict.

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 verifier on a second call. There is no browser redirect — ETRADE issues the code out-of-band, which is why the user has to read it back to you. ETRADE access tokens go idle after two hours without a request and expire outright at midnight US Eastern, no matter how recently they were used. After midnight the user must authorize again; there is no refresh token. Call this tool again whenever another E*TRADE tool reports an expired token. While a connection is live the server renews it in the background every ninety minutes, so the idle timeout should never be what ends a session — only midnight does.

etrade_accountsA

List the ETRADE accounts this connection can read, with the accountIdKey every other ETRADE tool needs. Call this before etrade_positions — the account number a user quotes is not the key the API accepts.

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 plan_rebalance takes for its holdings argument, plus the cash figure for availableCash, so a rebalance can be planned against the real book without the user retyping it. Positions that came back without a symbol or a usable mark are omitted: an undated or unpriced position cannot be sized against.

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 environment to switch. Sandbox and production hold entirely separate keys AND separate access tokens, so switching never mixes credentials and never invalidates the other side — you can keep both connected and flip between them. Sandbox returns canned data that does not match what you ask for, so use production for any real figure.

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_positions answers "what do I hold?".

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 etrade_connect can reconnect without re-entering them. Use this when handing the machine over, switching between the sandbox and production key pairs, or when a token is behaving oddly.

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_index to see how deep the index reaches and to backfill further; a search can only find what has been indexed.

congress_indexA

Show how much Senate disclosure history is indexed locally, and extend it. Call with no arguments to report coverage; pass sinceDays to backfill. Each report is a separate request against a rate-limited government site, so work is capped per call and resumes where it left off — reports already indexed are never refetched, because a filed report never changes. Rough sizes: 12 months is ~180 reports, five years ~690, and the whole archive back to 2012 is ~2,400. Expect to call this several times to build deep history; each call reports how many reports remain.

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 congress_trades, which covers the Senate.

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_financials.

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 startDate to late June to look for an annual report.

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 edinet_search first.

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 expiredOnly for routine housekeeping, which never discards a live entry.

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 clearCooldowns to forget recorded caps, which is worth doing when you know a daily quota has reset or you have just upgraded a plan.

Prompts

Interactive templates invoked by user choice

NameDescription
getting-startedEvery 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

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 29 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count3/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues