Skip to main content
Glama
screener-mcp
by LogeshR15

compare_to_sector

Read-only

Compare a stock’s return with its sector index and the Nifty 50 over a chosen period to tell whether a move reflects a market/sector pullback or company-specific news.

Instructions

Has this stock fallen (or risen) more or less than its sector and the market? Separates a market/sector pullback from a company-specific move.

Compares the stock's close-to-close return against its sector index (auto-picked from its Screener sector, e.g. Nifty Auto, Nifty IT, Nifty India Defence) and the Nifty 50, over days calendar days plus 7/30/90-day context windows. Also returns beta and correlation vs the sector, drawdown from the window high, and a plain-language verdict.

symbol: NSE/BSE symbol days: window in calendar days (5-365, default 30) benchmark: optional index override — nifty50, nifty500, bank, it, auto, pharma, fmcg, metal, realty, energy, defence, chemicals, ...

Examples: compare_to_sector("MSUMI", days=60) compare_to_sector("HDFCBANK", benchmark="private_bank")

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "compare_to_sector"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
symbolYes
benchmarkNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description adds real value on top: it explains that the sector index is auto-picked from the Screener sector, that context windows of 7/30/90 days accompany the requested window, and that beta, correlation, drawdown-from-high, and a plain-language verdict are computed. That methodology disclosure is exactly the kind of context annotations can't carry, though it stops short of noting data staleness or failure modes when no sector mapping exists.

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?

The description is front-loaded with the question it answers, then the mechanics, then parameters, then examples — a sensible order with no filler sentences. It is slightly long because the parameter lines and examples restate some of the same information, but nothing is genuinely wasteful.

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 an output schema present, the description needn't document return values, yet it still names the key outputs, and it covers all three inputs including the undocumented benchmark options. The remaining gap is the ambiguity in the benchmark key set, which is the one thing an agent could get wrong at call time.

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 carries the full burden and largely does: `symbol` is scoped to NSE/BSE, `days` gets a 5-365 range and default 30, and `benchmark` gets a concrete list of index keys despite no enum in the schema. The only blemish is that the example uses `private_bank`, which is not in the enumerated list and the list trails off with '...', leaving the agent unsure whether arbitrary keys are accepted.

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 opening question states the exact analytical job — comparing the stock's return against its sector index and the Nifty 50 — and the second sentence sharpens it into the decision it supports ('separates a market/sector pullback from a company-specific move'). This is clearly distinct from sibling tools like get_peer_comparison and compare_companies, which compare companies to each other rather than to an index.

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?

The framing question and the two worked examples give a strong sense of when to reach for this tool (attributing a move to sector/market vs. company-specific causes). What's missing is an explicit exclusion: nothing says when to prefer get_peer_comparison or compare_companies over this, so an agent must infer the boundary from the names.

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