Skip to main content
Glama
ahmedraza-96

psx-mcp-server

psx-mcp-server

CI PyPI Python License: MIT

A Model Context Protocol server that gives Claude and other MCP agents live Pakistan Stock Exchange data — quotes, intraday and end-of-day history, indices (KSE-100 and 17 others), company fundamentals, dividends, and announcements — sourced from the public PSX Data Portal. No API key required.

Quick start

The server runs via uvuvx fetches and runs it in one step, so there is nothing to install manually.

Claude Code:

claude mcp add psx -- uvx psx-mcp-server

Claude Desktop — add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "psx": {
      "command": "uvx",
      "args": ["psx-mcp-server"]
    }
  }
}

Any MCP client: run uvx psx-mcp-server (stdio transport). Requires uv (install guide).

Related MCP server: Alpha Vantage MCP Server

Example

You: Which PSX stocks gained the most today, and what's HBL trading at?

The agent calls get_market_snapshot and get_quote, and answers:

TOP 5 GAINERS:
  TCORPR2  +22.62%  Rs.5.42
  PINL     +10.52%  Rs.10.51
  HICL     +10.05%  Rs.11.50
  TSPL     +10.02%  Rs.18.12
  CLVL     +10.02%  Rs.22.41
  breadth: 296 advancers / 180 decliners

HBL: Habib Bank Limited | current Rs.318.15 | P/E 7.43
KSE100: 187,454.69 (+1.12%)

Tools

Tool

Parameters

Returns

search_symbols

query, sector?, limit=20

Matching tickers (exact matches first). Use first if unsure of a ticker.

get_quote

symbol

Current price, LDCP, OHL, change %, volume, bid/ask, 52-week range, P/E (PKR).

get_intraday

symbol, interval="5min", limit=50

Intraday OHLCV bars (or raw ticks) for the latest session, PKT times.

get_eod_history

symbol, start_date?, end_date?, limit=260

Daily open/close/volume (~5 yrs). Works for indices. No high/low.

get_ohlc_history

symbol, month, year

Full daily OHLCV for one month — the only free source of daily high/low.

get_market_snapshot

category="gainers", limit=15, sector?

Top movers (gainers/losers/volume) plus market breadth.

get_indices

All ~18 PSX indices with change %.

get_company_info

symbol

Business description, sector, market cap, shares, free float, P/E.

get_dividends

symbol, limit=10

Payout history (cash/bonus/rights) with book-closure dates.

get_announcements

symbol, limit=10

Recent corporate announcements with document (PDF) links.

Resources: psx://symbols (full ticker directory), psx://sectors (sector names), psx://indices (current index values).

Prompts: analyze_stock(symbol) (single-stock research brief), market_overview() (today's market wrap).

Notes

  • Prices are in PKR; timestamps are Pakistan Standard Time (UTC+5, no DST).

  • PSX trades Monday–Friday, ~09:30–15:30 PKT. Outside those hours, quotes reflect the last session and intraday data may be empty.

  • Responses are cached briefly (30 s intraday … 24 h for the symbol directory) to be polite to the portal. Override the request identity with the PSX_MCP_USER_AGENT environment variable.

Development

git clone https://github.com/ahmedraza-96/psx-mcp-server
cd psx-mcp-server
uv sync

uv run pytest                 # unit tests (mocked, offline)
uv run ruff check . && uv run ruff format --check .

# Live tests hit the real portal — run during PKT market hours:
uv run pytest -m live --override-ini "addopts="

# Re-record test fixtures if PSX changes its markup:
uv run python scripts/record_fixtures.py

Architecture: parsers/ are pure functions (raw response in, dataclasses out) tested against committed fixtures in tests/fixtures/; client.py owns all HTTP I/O (caching, retries, error mapping); tools.py composes the two into MCP tools. See CHANGELOG.md for release history.

Disclaimer

This is an unofficial project and is not affiliated with or endorsed by the Pakistan Stock Exchange. Data comes from the public PSX Data Portal (dps.psx.com.pk) and may be delayed or inaccurate. For licensed or commercial market data, contact marketdatarequest@psx.com.pk. Nothing here is investment advice.

License

MIT © Ahmed Raza

Available Tools

10 tools
get_announcementsB

Recent corporate announcements, newest first.

Each item has a date, title, and a link to the PSX document (PDF) when available.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
symbolYes

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose useful behavior beyond the schema: results are ordered newest first and each item contains a date, title, and optional PDF link. It omits permission requirements, pagination/limit behavior, and how far back 'recent' extends.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the core purpose and followed by the return shape. No wasted words, though the line breaks make it slightly less clean than a single sentence would be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The low-complexity surface (2 params, no output schema) means output field disclosure is helpful and mostly sufficient. However, with zero schema coverage on the parameters, the description leaves the required-call contract incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it says nothing about the required `symbol` parameter or the `limit` control. An agent cannot tell from the description that a ticker symbol scopes the announcements or that limit caps result count.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: retrieving recent corporate announcements for a symbol. It is clearly distinguishable from sibling tools like get_dividends or get_company_info, though it never explicitly says how it differs or which sibling to use for related data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no mention of when this is preferable to get_company_info or get_dividends, and no prerequisites. The agent must infer that this tool exists for announcement/regulatory disclosures only.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_company_infoA

Company profile and fundamentals.

Returns business description, sector, market cap (PKR), shares outstanding, free float, and trailing P/E. For the current price use get_quote (this tool omits the live quote to stay focused).

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It discloses returned fields and a deliberate scope limitation (omits live quote), but does not state read-only safety, permission needs, or rate limits. The read-only nature is strongly implied by the 'get' verb and profile data, but not made explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with purpose and return fields, then the sibling routing. Every sentence earns its place with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lists return fields in lieu of an output schema, but leaves the required symbol parameter undocumented and does not compensate for the absence of annotations regarding safety or authentication. Adequate for a simple read tool, but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage for the single required 'symbol' parameter is 0%, and the description never mentions the parameter, its format, or accepted symbol style. It therefore adds no meaning beyond what the bare input schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the resource ('Company profile and fundamentals') and then enumerates the specific fields returned, with 'Returns' supplying the action. It also explicitly distinguishes itself from the sibling get_quote by directing price requests elsewhere.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit alternative for current price ('use get_quote') and explains that this tool omits the live quote to stay focused. It does not cover when to choose it over other market-data siblings like get_market_snapshot, but the primary exclusion is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_dividendsB

Dividend / payout history, newest first.

Details use PSX notation, e.g. '60%(i) (D)' = 60% interim cash dividend, '(B)' = bonus shares, '(R)' = right shares. Includes the book-closure window. Percentages are of face value (PKR 10 for most PSX stocks).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
symbolYes

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It does disclose useful domain context (PSX notation, book-closure window, percentages of face value), which is genuinely helpful, but it doesn't state whether the call is read-only or what the return shape is.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact, front-loaded with the resource and ordering, then details. No filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The notation key is valuable for interpreting the output, but with no annotations, no output schema, and no parameter documentation, the description is only minimally adequate for an agent to call it confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate for both parameters. It mentions none — not even the required 'symbol' or the 'limit' default. The domain notation is helpful but doesn't explain parameter formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear resource (dividend / payout history) and specifies ordering ('newest first'). It does not differentiate from sibling history tools like get_eod_history or get_announcements beyond the resource itself, so it lands just short of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use or when-not-to-use guidance, and no mention of alternatives. The agent must infer that this is the tool for dividend lookups.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_eod_historyA

Daily end-of-day history (~5 years), newest first.

Returns open, close and volume per day — this feed has NO high/low; for daily high/low use get_ohlc_history. Works for indices too (e.g. symbol='KSE100'). Dates are ISO (YYYY-MM-DD). ~260 rows is about one trading year. Optionally clip with start_date/end_date (ISO).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
symbolYes
end_dateNo
start_dateNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden, and it does substantial work: result ordering (newest first), retention horizon (~5 years), the fields returned (open, close, volume), the notable absence of high/low, and that indices are supported. It omits error behavior, auth/rate limits, and how limit interacts with the date clipping.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and result shape in the first two lines, followed by the sibling escape hatch and the date/row-size practicalities. Every sentence adds information; no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description correctly fills the gap by describing returned fields, ordering, coverage horizon and date format. What remains thin is failure modes (invalid symbol, out-of-range dates) and the precise semantics of limit combined with date filtering.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and largely does: it gives the date format (YYYY-MM-DD) for start_date/end_date, an example symbol value, explains clipping semantics, and ties the limit default of 260 to roughly one trading year. The limit parameter's interaction with start/end clipping is still unstated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource (daily end-of-day history) with verb, scope (~5 years) and ordering (newest first). It explicitly distinguishes itself from the sibling get_ohlc_history by declaring this feed has no high/low, so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative feed (get_ohlc_history) and the exact condition that selects it (need for daily high/low), and notes it also works for indices with a concrete symbol example. It does not address when to prefer get_quote or get_market_snapshot, so context is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_indicesA

All PSX indices (KSE100, KSE30, KMI30, ALLSHR, and ~14 others).

Returns current value, day high/low, change and change % for each. For historical index values call get_eod_history with the index name as the symbol (e.g. 'KSE100').

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the returned fields (current value, day high/low, change, change %) but says nothing about whether the data is real-time or delayed, refresh/caching behavior, or rate limits, which matters for a market-data read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero filler; the resource and its contents are front-loaded and the alternative-tool pointer follows. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description usefully compensates by listing the returned fields. It is missing only the data-freshness semantics an agent would want when deciding between this and live-quote siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing to document and the baseline is 4. The only parameter-like detail given (passing the index name as the symbol to get_eod_history) applies to the sibling tool, not this one.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

It names the exact resource (all PSX indices, with examples KSE100, KSE30, KMI30, ALLSHR) and enumerates the returned fields (value, day high/low, change, change %). It explicitly separates itself from get_eod_history for historical data, so an agent can distinguish it from siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear routing rule with an alternative named: use get_eod_history with the index name as symbol for historical values. It does not address overlap with other siblings like get_market_snapshot or get_quote, nor when this is the wrong choice, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_intradayA

Intraday price bars for the current/most recent trading session.

Ticks are aggregated locally into OHLCV bars per interval; 'raw' returns individual ticks (can be thousands — keep limit small). Times are HH:MM in Pakistan Standard Time. Returns the newest limit bars.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
symbolYes
intervalNo5min

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and delivers real behavioral context: local tick-to-OHLCV aggregation, that 'raw' returns individual ticks potentially numbering in the thousands, the PKT timezone for timestamps, and that the newest limit bars are returned. Missing only auth/rate-limit or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, followed by only the details an agent needs (aggregation, raw caveat, timezone, newest-N). Tight overall, with the raw-tick warning parenthetical the only slightly awkward element.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations, yet the description explains the return shape (OHLCV bars, newest limit, PKT HH:MM timestamps) and the data-volume risk. Sufficient for correct invocation; only symbol format and error/rate-limit behavior are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does: it explains the aggregating interval values vs 'raw', clarifies limit by stating the newest limit bars come back, and implies small limits for raw. Symbol format is left to the schema/sibling search_symbols.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (intraday price bars) with clear scope: the current or most recent trading session. That scope implicitly separates it from get_eod_history and get_ohlc_history, though it does not name those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the 'current/most recent session' framing, and there is a practical hint to keep limit small when interval='raw'. However, it never states when to prefer this over get_ohlc_history or get_quote, nor any prerequisites, so routing remains inferential.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_market_snapshotA

Market-wide snapshot with top movers and a breadth summary.

category: 'gainers' (top change %), 'losers' (bottom change %), or 'volume' (most traded). Optionally filter to a sector (by name). Never returns all ~500 securities; raise limit (max 100) if needed.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
sectorNo
categoryNogainers

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It usefully discloses a result-cardinality cap ('Never returns all ~500 securities') and a hard limit ceiling (max 100), which are real behavioral constraints. It omits read-only/auth expectations, pagination, and what the breadth summary contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very compact — one lead sentence plus a tight parameter gloss — and the cardinality warning is placed where it matters. The line-broken layout is slightly fragmented but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no annotations and no output schema, it covers parameter behavior well but leaves the return shape ('breadth summary') and sector-name validation unspecified. Adequate but with visible gaps for an agent deciding how to consume the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it largely does: it defines each category value's ranking basis (top change %, bottom change %, most traded), clarifies sector is filtered by name, and reveals the max of 100 on `limit`, none of which appear in the schema. Only the default of 15 for limit is left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and deliverable ('Market-wide snapshot with top movers and a breadth summary'), which is clearly distinct from single-symbol siblings like get_quote or get_indices. It does not explicitly name a sibling to route against, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives practical usage detail on the category enum and sector filter, and warns that not all ~500 securities are returned so `limit` should be raised. However, it never states when to prefer this over get_indices, get_quote, or search_symbols — usage context is implied rather than compared.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_ohlc_historyA

Full daily OHLCV for a single calendar month (has daily high/low).

This is the only free source of daily high/low. Call once per month needed; for a long close-only series prefer get_eod_history (one call). month is 1-12. Prices in PKR.

ParametersJSON Schema
NameRequiredDescriptionDefault
yearYes
monthYes
symbolYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations at all, the description carries the full behavioral burden. It usefully discloses cost status ('only free source'), currency units (PKR), and the one-call-per-month granularity, but says nothing about rate limits, what happens for an invalid symbol/month with no data, or the shape of the returned series.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with what the tool returns, then the unique-value justification, then the alternative. No filler and nothing restsated from the schema title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description is the only documentation, and it does cover purpose, routing, month format, and units. However, the return format for the OHLCV series and the symbol/year parameter conventions remain undocumented, leaving real gaps for a 3-required-param data tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It clarifies the month domain ('`month` is 1-12') and the price unit (PKR), but leaves `symbol` format/validation and the acceptable `year` range entirely unspecified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource and scope: 'Full daily OHLCV for a single calendar month (has daily high/low)'. It also distinguishes itself from the sibling get_eod_history, so an agent can tell the two apart without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use guidance ('Call once per month needed'), an explicit alternative for the opposite case ('for a long close-only series prefer get_eod_history'), and a unique capability statement ('the only free source of daily high/low') that explains why an agent would accept the per-month cost.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_quoteA

Get the latest quote for a PSX equity or ETF.

Returns current price, LDCP (last day close), open/high/low, change and change %, volume, bid/ask, 52-week range, and trailing P/E — all in PKR. Live during market hours (Mon-Fri ~09:30-15:30 Pakistan time, UTC+5); outside hours it reflects the last session. For an index use get_indices.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden, and it does substantial work: currency (PKR), market-hours window with timezone, and staleness semantics outside hours ('reflects the last session'). It omits auth requirements, invalid-symbol error behavior, and rate limits, but the freshness/currency disclosure is genuinely valuable context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then return fields, then timing behavior, then the sibling pointer. Every sentence earns its place, though the field enumeration is dense; it is justified since no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description fills both gaps by enumerating returned fields and explaining freshness behavior. What remains missing (parameter format, error handling) is minor for a single-argument read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single symbol parameter has 0% schema description coverage, so the description must compensate. It narrows valid values by domain ('PSX equity or ETF,' implicitly excluding indices) but gives no format hint, ticker examples, or case sensitivity. Partial compensation only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get the latest quote') and narrows the asset scope to 'a PSX equity or ETF,' then explicitly names get_indices as the tool for the adjacent case. An agent can distinguish this from sibling tools like get_intraday or get_market_snapshot from the description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit alternative ('For an index use get_indices') and the timing condition that determines freshness (live in market hours, last session otherwise). It does not address the more likely confusion with get_intraday or get_eod_history, so routing guidance is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_symbolsA

Search PSX ticker symbols by symbol or company name.

Use this FIRST whenever you are unsure of the exact ticker (e.g. query='Habib Bank' -> HBL). Optionally filter by exact sector name. Returns matches ranked with exact-symbol hits first.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
sectorNo

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, but it does disclose useful behavior: matches are ranked with exact-symbol hits first, and sector filtering is exact-match only. It omits auth/permission needs, result count behavior, and pagination, so the disclosure is partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short, front-loaded sentences with zero filler; the priority instruction ('Use this FIRST') leads and the return-ordering note closes. Slightly terse but efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description covers the shape of results (ranked matches) and two of three parameters, which is nearly enough for a simple lookup tool. The undocumented 'limit' parameter and absent detail on result size/truncation leave a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It adds real meaning for 'query' (symbol or company name, with an example) and 'sector' (must be an exact sector name), but completely ignores the 'limit' parameter and its default/behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search PSX ticker symbols') and the two lookup keys (symbol or company name). It doesn't explicitly name sibling tools, but the ticker-resolution role is unambiguous against get_quote/get_company_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use this FIRST whenever you are unsure of the exact ticker' with a concrete input/output example ('Habib Bank' -> HBL) and the optional sector filter condition. No when-not guidance or named alternatives, but the primary usage moment is clearly pinned down.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 10 tool updatesv0.1.0
    • First observedget_announcements
    • First observedget_company_info
    • First observedget_dividends
    • First observedget_eod_history
    • First observedget_indices
    • First observedget_intraday
    • First observedget_market_snapshot
    • First observedget_ohlc_history
    • First observedget_quote
    • First observedsearch_symbols

TDQS

A3.9/5.0

Scored across 10 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: historical data (get_eod_history for close-only, get_ohlc_history for OHLC per month), snapshot for market movers, indices for index data, company info, dividends, announcements, intraday, symbol search, and quote. The descriptions explicitly clarify boundaries (e.g., get_eod_history vs get_ohlc_history, get_indices vs get_quote for indices), reducing ambiguity to near zero.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (get_eod_history, get_ohlc_history, get_market_snapshot, etc.). No deviations or mixed conventions; names are predictable and readable.

Tool Count5/5

With 10 tools, the set is well-scoped for a PSX market data server, covering essential operations without redundancy. Each tool serves a distinct data need, and the count is typical for a focused financial API.

Completeness4/5

The tool surface covers a wide range: historical data (EOD and OHLC), quotes, indices, company info, dividends, announcements, intraday, and symbol search. However, it lacks tools for news or real-time streaming, and there is no explicit tool for retrieving sector lists or broader market data like commodities, which could be minor gaps for some agents.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server that exposes Pakistan Stock Exchange data (quotes, dividends, announcements, indices) as LLM-callable tools, enabling conversational market queries in plain English.
    4
    9
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides 12 tools to scrape and access Pakistan Stock Exchange market data, including current prices, historical data, intraday, sector search, and volume analysis.
    6
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables querying Pakistan Stock Exchange data including market summaries, stock quotes, history, and sector breakdowns using natural language.
    -