Skip to main content
Glama
darved2305

groww-mcp

by darved2305

search_stocks

Search for stocks and mutual funds by name or ticker symbol to find investment opportunities on Groww.

Instructions

Fuzzy search stocks and MFs by name or ticker

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query — stock name, ticker, or keyword

Implementation Reference

  • The "search_stocks" tool is registered and its handler logic is implemented within the server.tool block in src/tools/market.ts. It uses growwClient.searchStocks to perform the search.
    // ── search_stocks ─────────────────────────────────────────
    server.tool(
      "search_stocks",
      "Fuzzy search stocks and MFs by name or ticker",
      {
        query: z.string().describe("Search query — stock name, ticker, or keyword"),
      },
      async ({ query }) => {
        try {
          const results = await growwClient.searchStocks(query);
          if (results.length === 0) return mcpText(`🔍 No results found for "${query}"`);
    
          const lines = results.map((r, i) =>
            `${i + 1}. ${r.symbol} — ${r.name} [${r.exchange}] (${r.type}) ISIN: ${r.isin}`
          );
    
          const text = [`🔍 SEARCH: "${query}" — ${results.length} results`, `${"─".repeat(40)}`, ...lines].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