Model Context Protocol (MCP) server for the Pakistan Stock Exchange — exposes PSX market data, dividends, and announcements as LLM-callable tools.
Server has 9 well-named tools with complete descriptions and input schemas. All tools follow verb_noun naming (get_*, search_*, screen_*). Descriptions are detailed (100-300 chars) and explain WHAT, WHEN, and WHAT IS RETURNED. All parameters have type definitions and descriptions. However, output schemas are not formally documented, only inferred from code. Error handling is minimal (e.g., get_quote returns {"error": ...} but no guidance on recovery). No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Parameter constraints are described in text but not enforced via JSON Schema enums/patterns. Missing pagination guidance for list-like tools (get_announcements, get_upcoming_dividends). Overall solid definitions with room for schema formalization and error recovery guidance.
Get recent corporate announcements from PSX. Args: symbol: Optional ticker filter (e.g. only OGDC announcements). limit: Max rows to return (default 20, cap 100). Each item includes date, symbol, title, and a PDF link to the original notice.
For a symbol with an upcoming dividend, return the last day you can buy and still be entitled to the dividend (T+2 settlement applied). Returns 'no upcoming dividend' if the symbol isn't currently in the PSX payouts table.
Get historical dividend payouts for a symbol. Args: symbol: PSX ticker. years: How many years of history to return (default 5).
Get current values for major PSX indices: KSE100, KSE30, ALLSHR, KMI30, KMIALLSHR, PSXDIV20, BKTI, OGTI, MII30.
Is PSX open right now? Returns OPEN / PRE_OPEN / CLOSED_TODAY / WEEKEND plus the next market open in PKT.
Get the current price quote for a PSX-listed symbol. Args: symbol: PSX ticker, e.g. "MEBL", "OGDC", "FFC", "ENGRO". Returns last price, change, change %, volume, day high/low, open, prev close. Data is delayed by 5 minutes per PSX Data Portal.
Output schemas not formally documented. Code infers return types (list[dict], dict) but no JSON Schema definitions provided for LLM planning.
Error handling lacks recovery guidance. get_quote returns {"error": "..."} but does not suggest next steps (e.g., 'Try search_symbols() to find the correct ticker').
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). All tools are read-only but this is not declared in schema.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | 2026-07-28+ | v2 |
List upcoming dividend payouts on PSX. Args: symbol: Optional PSX ticker to filter. If omitted, returns all upcoming payouts in the table. Each result includes book closure dates, AGM date, payout amount/type, and the computed buy deadline (T+2 settlement) — the last day you can buy and still be entitled to the dividend.
Screen the upcoming-payouts table by payout size. Args: min_payout_pct: Minimum payout % to include (e.g. 50 = 50% of par). PSX payouts are quoted as % of face value (typically Rs 10). limit: Max results. NOTE: This is a payout-size filter, not a true dividend-yield screen (yield = dividend / current price). For real yield you'd cross-reference each symbol's current price — call get_quote() per symbol if needed.
Fuzzy search PSX symbols and company names. Useful when the user names a company casually ("habib bank" -> "HBL", "fauji fertilizer" -> "FFC").
Parameter constraints (e.g., limit 1-100 for get_announcements) described in text but not enforced via JSON Schema enum/pattern/minValue/maxValue.
Pagination not documented for list-returning tools. get_announcements and get_upcoming_dividends return unbounded lists; no offset/limit guidance or total count.