sahmk-mcp

v0.10.0
sahmk-mcp Checked 1 day ago Published 2 days ago

Official SAHMK MCP server for Saudi market data in AI agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_quote Get Quote

Get a real-time quote for a Saudi stock. Use this when the user asks for the current price, change, bid/ask, or trading activity of one stock.

ParameterTypeDescription
identifierStock identifier (preferred): symbol, Arabic/English name, or known alias, e.g. '2222', 'أرامكو', 'الراجحي'.
symbolLegacy alias for identifier. Prefer 'identifier'.

get_quotes Get Quotes

Get real-time quotes for multiple Saudi stocks in one call. Use this when the user wants to compare several stocks or asks for prices of more than one symbol.

ParameterTypeDescription
identifiersList of stock identifiers (preferred): symbol, Arabic/English name, or alias, up to 50 (e.g. ['2222', 'سابك']).
symbolsLegacy alias for identifiers. Prefer 'identifiers'.

get_market_summary Get Market Summary

Get the current Saudi market summary including TASI index level, change, market direction, and advancing/declining stock counts. Use this for questions about the overall market today.

ParameterTypeDescription
indexOptional market index: 'TASI' or 'NOMU' (alias 'NOMUC' is accepted and normalized).

get_market_movers Get Market Movers

Get market movers in one curated endpoint. Use this for top gainers, top losers, highest volume leaders, or highest value leaders. Returns a stable schema: type, index, count, items.

ParameterTypeDescription
type *stringMover type: 'gainers', 'losers', 'volume', or 'value'.
indexOptional market index: 'TASI' or 'NOMU' (alias 'NOMUC' is accepted and normalized).
limitOptional number of results from 1 to 50.

get_sectors Get Sectors

Get sector performance for the Saudi market. Use this when the user asks for sector-level market moves or a sector snapshot. Returns a stable schema: index, count, items.

ParameterTypeDescription
indexOptional market index: 'TASI' or 'NOMU' (alias 'NOMUC' is accepted and normalized).

get_company Get Company

Get a company profile for a Saudi stock, including sector, industry, fundamentals, valuation, technical indicators, and analyst consensus. Use this when the user asks about a company's profile, key metrics, or detailed information.

ParameterTypeDescription
identifier *stringStock identifier (symbol, Arabic/English name, or alias), e.g. '2222', 'أرامكو'.

get_financials Get Financials

Get company financial statements and key financial data. Use this for income statement, balance sheet, and cash flow requests. Requires exact exchange symbol.

ParameterTypeDescription
symbol *stringRequires exact exchange symbol. If the user provides a company name, first use companies_list. If a previous tool result included resolved_instrument.symbol, reuse that symbol. Example: '1120'.
historyOptional history window selector. Common values: latest, 1y, 3y, 5y, 10y, max (backend-dependent).
include_partialOptionally include partial/incomplete statement periods when available.
metricsOptional metrics profile selector. Common values: core, extended (backend-dependent).
periodOptional period selector: annual, quarterly, or auto. If both period and statement_period are provided, period takes precedence.
resultOptional result shaping selector. Common values: series, latest, raw (backend-dependent).
statement_periodOptional explicit statement period selector (annual, quarterly, or auto). Ignored when period is provided.
typeOptional financial view selector (e.g. statement family/profile returned by backend).

get_ratios Get Ratios

Get calculated financial ratios for one Saudi-listed company. Starter returns latest annual core ratios; Pro supports history, quarterly, and extended metrics.

ParameterTypeDescription
symbol *stringRequires exact exchange symbol. If the user provides a company name, first use companies_list. If a previous tool result included resolved_instrument.symbol, reuse that symbol. Example: '1120'.
historystringHistory window for ratios.
metricsstringMetrics profile for ratios.
periodstringStatement period for ratios.

compare_symbols Compare Symbols

Compare multiple Saudi-listed companies using normalized financial ratios and key metrics. Starter supports up to 3 symbols; Pro supports up to 10.

ParameterTypeDescription
symbols *Symbols to compare as a list (preferred) or comma-separated string. Starter supports up to 3 symbols; Pro supports up to 10.
metricsstringMetrics profile, e.g. 'core' or 'extended'. Default 'core'.

get_dividends Get Dividends

Get company dividend history and yield data. Use this when the user asks for dividends or payout history. Requires exact exchange symbol.

ParameterTypeDescription
symbol *stringRequires exact exchange symbol. If the user provides a company name, first use companies_list. If a previous tool result included resolved_instrument.symbol, reuse that symbol. Example: '1120'.

get_depth Get Depth

Get market depth (order book) for a Saudi stock. Use this for bid/ask ladder, spread, imbalance, and liquidity at the top of book. Requires exact exchange symbol. Plan/entitlement-gated by the API.

ParameterTypeDescription
symbol *stringRequires exact exchange symbol. If the user provides a company name, first use companies_list. If a previous tool result included resolved_instrument.symbol, reuse that symbol. Example: '2222'.
levelsOptional number of book levels to request (1-20). Backend default is 5; entitlement may return fewer levels than requested.

get_trades Get Trades

Get live trade prints for a Saudi stock (Pro+ plan). Without date: the most recent prints, newest first. With date: one session in receive order; follow page.next_cursor while page.has_more is true. Each print has trade_seq, price, quantity, value, optional side (`buy`/`sell`/`null`), and on dated calls market_session. This is the recent tape, not official session volume. Requires exact exchange symbol.

ParameterTypeDescription
symbol *stringRequires exact exchange symbol. If the user provides a company name, first use companies_list. If a previous tool result included resolved_instrument.symbol, reuse that symbol. Example: '2222'.
after_seqOptional: only prints with a greater trade_seq. Requires date. A filter, not a cursor.
cursorOptional page.next_cursor from the previous page. Requires date.
dateOptional session date YYYY-MM-DD (Asia/Riyadh). Reads that session from the recent tape (about three days) in receive order and adds a `page` object. Omit for the newest prints.
limitOptional page size (1-200). Backend default is typically 50.

get_events Get Events

Get AI-generated stock event summaries (Pro+ plan). Use this for recent corporate/news-style events with type, importance, and sentiment. Optionally filter by exact exchange symbol.

ParameterTypeDescription
limitOptional max number of events to return (1-100). Backend default is typically 20.
symbolOptional exact exchange symbol filter. Omit for market-wide recent events. Example: '1120'.

get_historical Get Historical

Get historical OHLCV price data for a Saudi stock over a date range. Use this when the user asks for past prices, price trends, or chart-style historical data.

ParameterTypeDescription
symbol *stringRequires exact exchange symbol. If the user provides a company name, first use companies_list. If a previous tool result included resolved_instrument.symbol, reuse that symbol. Example: '1120'.
adjustment'capital' (default): exchange Performance Summary print, adjusted for bonus shares, splits, and rights; cash dividends are not removed. 'none': exchange Unadjusted Prices & Volume tab, as printed. adj…
from_dateStart date in YYYY-MM-DD format (default: 30 days ago)
intervalBar size. Preferred: '1min', '5min', '15min', '30min', '60min', '1d', '1w', '1mo' (default: '1d'). Legacy aliases accepted: '30m'->'30min', '60m'->'60min', '1m'->'1mo' (monthly, NOT one-minute). Plan…
to_dateEnd date in YYYY-MM-DD format (default: today)

companies_list Companies List

Discover listed companies and symbols. Use this first to find/validate symbols before quote/company calls.

ParameterTypeDescription
limitintegerPage size (must be > 0).
marketOptional market filter: 'TASI' or 'NOMU' (alias 'NOMUC' is accepted and normalized).
offsetintegerPagination offset (must be >= 0).
searchOptional text search across symbol/company names for discovery.

get_portfolios List Portfolios

List the user's SAHMK portfolios, most recently updated first.

ParameterTypeDescription
workspace_idOptional workspace id filter.

get_portfolio Get Portfolio

Get one portfolio by id.

ParameterTypeDescription
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.

create_portfolio Create Portfolio

Create a portfolio.

ParameterTypeDescription
name *stringPortfolio name. Must be unique for this user.
descriptionOptional description.
metadataOptional object of your own fields.
workspaceOptional workspace id to link.

get_portfolio_transactions List Portfolio Transactions

List the full transaction ledger for one portfolio, newest first.

ParameterTypeDescription
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.

create_portfolio_transaction Create Portfolio Transaction

Create one portfolio transaction or an explicit atomic batch. Transactions are append-only by executed_at order; backdated entries before the latest executed_at are rejected.

ParameterTypeDescription
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.
amount_sarSingle mode: amount in SAR (required).
batch_idempotency_keyBatch mode: required key for the whole batch.
executed_atOptional ISO-8601 timestamp.
fee_sarOptional fee in SAR.
idempotency_keyOptional key; resending the same key does not create a duplicate.
metadataOptional object of your own fields.
notesOptional note.
quantityShare quantity for buy and sell.
symbolStock symbol for buy, sell, and dividend.
transaction_typeSingle mode: transaction type.
transactionsBatch mode: list of transactions (each needs transaction_type and amount_sar). Do not combine with single-mode fields.
unit_price_sarPrice per share in SAR for buy and sell.

set_portfolio_holdings Set Portfolio Holdings

Set target holdings for a portfolio with a dry-run/apply plan token flow. Run with dry_run=true first, show the user the plan, and apply only after they confirm. Applying writes ledger transactions.

ParameterTypeDescription
cash_policy *stringauto_fund: when the plan needs cash, existing cash is consumed first and only the remaining shortfall is auto-deposited; when the plan releases cash, auto-withdrawal is limited to the amount released…
holdings *arrayTarget holdings: list of {symbol, quantity, avg_cost_sar}.
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.
scope *string'full': the portfolio should hold exactly these holdings. 'partial': only the listed symbols change.
dry_runbooleanTrue (default) previews the plan. False applies it and needs plan_token.
expected_latest_transaction_idOptional guard: apply fails if the ledger moved since the dry run.
plan_tokenplan.plan_token from the dry run. Required to apply.

reverse_portfolio_transaction Reverse Portfolio Transaction

Reverse a transaction by id. Only the portfolio's latest transaction can be reversed.

ParameterTypeDescription
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.
transaction_id *integerTransaction id to reverse.
metadataOptional object of your own fields.
notesOptional note.

get_portfolio_summary Get Portfolio Summary

Get cash, holdings, and P&L for one portfolio.

ParameterTypeDescription
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.

get_portfolio_performance Get Portfolio Performance

Get the daily equity series for one portfolio.

ParameterTypeDescription
portfolio_id *integerPortfolio id (positive integer) from get_portfolios.
daysOptional window in days (backend default: 30).