Skip to main content
Glama
darved2305

groww-mcp

by darved2305

get_quote

Retrieve real-time stock quotes including LTP, bid/ask prices, open/high/low values, and volume data for NSE or BSE symbols to support trading decisions.

Instructions

LTP, bid/ask, open, high, low, volume for a symbol (NSE/BSE)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock symbol, e.g. RELIANCE, TCS, INFY
exchangeNoExchange — NSE or BSENSE

Implementation Reference

  • The handler implementation for the 'get_quote' tool. It registers the tool and executes the logic to fetch quote data using growwClient.
    server.tool(
      "get_quote",
      "LTP, bid/ask, open, high, low, volume for a symbol (NSE/BSE)",
      {
        symbol: z.string().describe("Stock symbol, e.g. RELIANCE, TCS, INFY"),
        exchange: z.enum(["NSE", "BSE"]).default("NSE").describe("Exchange — NSE or BSE"),
      },
      async ({ symbol, exchange }) => {
        try {
          const sym = normalizeSymbol(symbol);
          const q = await growwClient.getQuote(sym, exchange);
          const emoji = pnlEmoji(q.change);
    
          const text = [
            `${q.symbol}.${q.exchange} ${emoji}`,
            `${q.name}`,
            `${"─".repeat(40)}`,
            `LTP: ${formatCurrencyExact(q.ltp)}  (${formatPercent(q.changePercent)}, ${pnlSign(q.change)})`,
            `Open: ${formatCurrencyExact(q.open)}  |  High: ${formatCurrencyExact(q.high)}  |  Low: ${formatCurrencyExact(q.low)}`,
            `Prev Close: ${formatCurrencyExact(q.close)}`,
            `Bid: ${formatCurrencyExact(q.bid)}  |  Ask: ${formatCurrencyExact(q.ask)}`,
            `Volume: ${formatVolume(q.volume)}  |  Market Cap: ${formatCurrency(q.marketCap)}`,
            ``,
            `As of ${nowIST()}`,
          ].join("\n");
          return mcpText(text);
        } catch (err) {
          return mcpError(normalizeError(err));
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/darved2305/groww-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server