Skip to content

Use case · Peer comparison

Which MCP server compares an Indian stock against its peers?

Disclosure: DalalOS publishes this page and runs the MCP server it describes. We checked every figure below against the live server on 29 October 2026.

DalalOS has two tools for this. get_peer_comparison returns a table of a company and its peers from the SEBI industry classification, with peer medians and data-quality flags. get_relevant_peers returns a second peer set from reviewed business tags, and its coverage is still partial.

Connect your AI

Free to start, no card needed. Sign in once from your AI — no API key to manage.

KEY TAKEAWAYS

  • Ask get_peer_comparison for a company. You get a table of ratios for the company and its peers, and a median row.
  • The query company is one of the rows, so limit 4 returns the company and three peers.
  • On 29 October 2026 get_relevant_peers returned no peers for the three companies we tried, because none had reviewed business tags yet.

What does the peer comparison tool return?

get_peer_comparison takes a company name, NSE symbol, ISIN or BSE code. It finds the peer group, then returns one row per company with market cap, P/E, P/B, trailing twelve month revenue and net income, margins, ROE, ROA, ROCE, interest coverage, debt to equity, EV/EBITDA, cash-flow ratios, book value per share, a Piotroski F-score and an Altman Z-score. It also returns peer_medians for the main ratios. Every value comes from a cache of filings and end-of-day prices.

Return and margin ratios are fractions, so ROE of 0.3259 is 32.59 percent. Banks, NBFCs and insurers return null for ROCE, interest coverage, EV and EV/EBITDA, and for both scores. The ratios page lists which ratios are general-only.

What does a real answer look like?

This is Infosys (INFY) with limit 4 on 29 October 2026. The peer group is "Computers - Software & Consulting". The table holds Infosys, TCS, HCL Technologies and Wipro, and the median P/E is 16.0425. The median matches the middle of all four rows, Infosys included. The values were cached on 28 October 2026 at 14:45 UTC.

get_peer_comparison · INFY · limit 4 · 29 Oct 2026
{
  "query_name": "Infosys Limited",
  "grain": "isubgroup",
  "grain_value": "Computers - Software & Consulting",
  "grain_widened": false,
  "size_banded": true,
  "peer_count": 4,
  "peer_medians": { "pe": 16.0425, "pb": 4.79525, "roe": 0.28945, "roce": 0.39225, "debt_to_equity": 0.00625 },
  "peers": [
    { "nse_symbol": "TCS",     "pe": 17.2462, "roe": 0.511,  "roce": 0.6965, "debt_to_equity": 0.0 },
    { "nse_symbol": "INFY",    "pe": 14.8388, "roe": 0.3259, "roce": 0.4511, "debt_to_equity": 0.0, "is_query": true },
    { "nse_symbol": "HCLTECH", "pe": 20.6869, "roe": 0.253,  "roce": 0.3334, "debt_to_equity": 0.0125 },
    { "nse_symbol": "WIPRO",   "pe": 14.4706, "roe": 0.1546, "roce": 0.1877, "debt_to_equity": 0.2343 }
  ],
  "cached_at": "2026-10-28T14:45:02+00:00"
}

Trimmed from the live response: four ratios per peer shown of about twenty, no value changed. Market caps and revenues are in whole rupees and are left out here.

How is a bank compared?

Here is HDFC Bank with limit 3. The peer group is "Private Sector Bank", with ICICI Bank and Kotak Mahindra Bank. ROCE and debt to equity are null for all three, and the median for each is null too. The tool returned a ratios_caveat because Kotak Mahindra Bank carried the ratios_incomplete flag. In this response the Kotak row still counts in the P/E and P/B medians, so read the flag before you read the median.

get_peer_comparison · HDFCBANK · limit 3 · 29 Oct 2026
{
  "query_name": "HDFC Bank Limited",
  "grain_value": "Private Sector Bank",
  "peer_medians": { "pe": 16.7063, "pb": 2.248, "roe": 0.1457, "roce": null, "debt_to_equity": null },
  "peers": [
    { "nse_symbol": "HDFCBANK",  "pe": 13.1712, "pb": 1.7509, "roe": 0.1457, "roce": null, "is_query": true },
    { "nse_symbol": "ICICIBANK", "pe": 16.7063, "pb": 2.4112, "roe": 0.1668, "roce": null },
    { "nse_symbol": "KOTAKBANK", "pe": 20.3798, "pb": 2.248,  "roe": 0.1269, "roce": null,
      "ratios_incomplete": true }
  ],
  "ratios_caveat": "One or more rows are flagged ratios_incomplete: a structural event (rights/demerger/spin-off/merger) in the last 52 weeks means that company's valuation ratios (P/E, P/B) may not be comparable across the event."
}

Trimmed from the live response: fewer fields per peer, no value changed.

What are the two peer sets?

The two peer tools compared
get_peer_comparisonget_relevant_peers
Peers chosen bySEBI industry classification, narrowed by market-cap bandReviewed, source-backed business tags and overrides
ReturnsA table of ratios, peer medians and flagsA peer list with the reason for each pick, plus coverage details
When evidence is thinWidens to a broader industry grain and sets grain_widenedReturns fewer peers or none, and does not use the SEBI group as a stand-in
Coverage on 29 Oct 2026Returned a table for Infosys and HDFC BankReturned no peers for Infosys, HDFC Bank and Mazagon Dock

get_relevant_peers takes an optional purpose (the default is operating) and an optional event_context. When it has no reviewed tags for a company it says so in mapping_status and mapping_note.

get_relevant_peers · INFY · limit 4 · 29 Oct 2026
{
  "query_name": "Infosys Limited",
  "purpose": "operating",
  "peer_count": 0,
  "selection_quality": "unavailable",
  "coverage": { "mapping_status": "missing_reviewed_mapping", "query_reviewed_tag_count": 0, "sebi_fallback_used": false },
  "peers": [],
  "mapping_note": "No active reviewed business tags exist for the query company.",
  "reason_code": "no_data"
}

Trimmed from the live response: fields removed, no value changed. HDFC Bank and Mazagon Dock returned the same status.

What do the data-quality flags mean?

  • valuation_suspect: a row with an implausible figure, such as a corrupted P/B or a market cap with a unit slip. The row is kept and left out of peer_medians.
  • ratios_incomplete: a rights issue, demerger, spin-off or merger in the last 52 weeks. P/E and P/B may not compare across the event. We saw this flag on Kotak Mahindra Bank.
  • non_recurring_items: margins dominated by a one-off exceptional or discontinued item. The row is left out of the medians.
  • grain_widened: the peer set fell back to a broader SEBI industry grain. It was false for both companies we pulled.
  • size_banded: the peer set was restricted to a market-cap band. It was true for both.

We did not see valuation_suspect or non_recurring_items in the two tables above. Their meaning comes from the tool documentation.

What are the limits?

  • Industry groups are broad. A SEBI group can hold companies with different business models. The tool does not say a peer is comparable. It says the peer shares a classification.
  • Business-tag peers are partial. Three of three companies returned no peers from get_relevant_peers on 29 October 2026. We cannot say how many companies have reviewed tags.
  • Cached data. The peer tables were cached on 28 October 2026 at 14:45 UTC. Prices are end of day.
  • Nulls for financials. Banks, NBFCs and insurers have null for several ratios by design.
  • No verdict. The tool returns numbers and a median. It does not rank the peers or say which one is better.

Compare on the same basis

Check the flags and the cache time before you compare two rows. If a row is flagged, ask your AI to say which ratios are affected and why.

How do I ask for it?

EXAMPLE PROMPTS

  • Compare Infosys with its peers using DalalOS get_peer_comparison, limit 5. Show P/E, P/B, ROE, ROCE and debt to equity, the peer medians and any flags.
  • Compare HDFC Bank with its peers. Tell me which ratios are null for banks and whether any row is flagged ratios_incomplete.
  • Run get_relevant_peers for Mazagon Dock. If it returns no peers, say why.
  • Which peers did the table use for TCS, and was the group widened or size-banded?

For a general guide to asking an assistant to compare companies, see Compare Indian stocks with AI. To set up the server, connect your AI, or follow the guide for Claude or ChatGPT, Cursor and other clients. The server is at https://mcp.dalalos.in/mcp. The public repo is DalalOS-Indian-Stock-Research on GitHub.

How we checked

On 29 October 2026 we called get_peer_comparison for Infosys and HDFC Bank and get_relevant_peers for Infosys, HDFC Bank and Mazagon Dock on the live server. Flag definitions for valuation_suspect and non_recurring_items come from the tool documentation. Figures change as companies file and caches refresh. This is research data, not investment advice, and DalalOS does not rank or rate stocks. Found an error? Email hello@dalalos.in.

FAQ

Common questions

Which MCP server compares an Indian stock against its peers?
DalalOS does. Its get_peer_comparison tool builds a side-by-side table of a company and its peers from the SEBI industry classification, with peer medians and data-quality flags. get_relevant_peers returns a second peer set built from reviewed business tags. DalalOS publishes this page, so read the limits section before you rely on it.
How does the server choose the peers?
get_peer_comparison starts from the company’s SEBI industry group and narrows it by market-cap band. For Infosys on 29 October 2026 the group was “Computers - Software & Consulting” and the table was size-banded. If too few peers fit, the tool widens to a broader industry grain and sets grain_widened.
What is the difference between get_peer_comparison and get_relevant_peers?
get_peer_comparison returns a table of ratios for companies in the same SEBI classification. get_relevant_peers returns peers chosen from reviewed, source-backed business tags, with the reason for each. It returns fewer peers, or none, when the evidence is thin.
Does get_relevant_peers cover every company?
No. On 29 October 2026 we asked it for Infosys, HDFC Bank and Mazagon Dock. All three returned zero peers with the status missing_reviewed_mapping, because none had reviewed business tags yet. It did not fall back to the SEBI group. We cannot say how many companies have tags today.
What do the data-quality flags mean?
valuation_suspect marks a row with an implausible figure and removes it from the medians. ratios_incomplete marks a company with a rights issue, demerger or merger in the last 52 weeks, so its P/E and P/B may not compare across the event. non_recurring_items marks margins driven by a one-off item and removes the row from the medians. grain_widened and size_banded say how the peer set was built.
How is this page different from the page on comparing Indian stocks with AI?
The compare Indian stocks with AI page shows how to ask an assistant to line up companies you name. This page documents the two peer tools, how each peer set is built, and the flags and nulls in the output.
Is this investment advice?
No. DalalOS returns filed figures and ratios from fixed formulas. It gives no buy or sell calls, target prices or ratings, and it does not say which company is better. Nothing on this page is investment advice.

Connect your AI to Indian stock market data

Add DalalOS as a connector and sign in once. Free to start with no card and no waitlist; paid plans from ₹199 a month when you need more.

KEEP EXPLORING