Skip to main content
Glama

extract_finance_landscape

Analyze financial assets by aggregating real-time market data, developer sentiment from Hacker News, investor discussions from Reddit, GitHub ecosystem activity, and product release velocity into a unified timestamped report.

Instructions

Composite financial intelligence tool for developers. Given one or more ticker symbols, simultaneously queries: (1) Yahoo Finance for live price/market data, (2) Hacker News for developer community sentiment, (3) Reddit for investor and tech community discussion, (4) GitHub for repo ecosystem activity around the company's tech, and (5) their product changelog for release velocity as a company health signal. Answers: What's the price? What are developers saying? Is the company actually shipping? Returns a unified 5-source timestamped report. Bloomberg Terminal doesn't give you this.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersYesOne or more ticker symbols e.g. 'PLTR' or 'PLTR,MSFT,GOOG'. Up to 5 tickers.
company_nameNoCompany name for HN/Reddit/GitHub searches e.g. 'Palantir'. If omitted, derived from the ticker.
github_queryNoGitHub search query or repo URL for the company's tech ecosystem e.g. 'palantir' or 'https://github.com/palantir/foundry'. If omitted, uses company_name.
max_lengthNo

Implementation Reference

  • The implementation handler for the 'extract_finance_landscape' tool, which orchestrates calls to various adapters (finance, hackerNews, reddit, repoSearch, changelog) in parallel to generate a comprehensive report.
    async ({ tickers, company_name, github_query, max_length }) => {
      const perSection = Math.floor((max_length ?? 12000) / 5);
      // Derive a search term: prefer explicit company_name, fall back to first ticker
      const searchTerm = company_name ?? tickers.split(",")[0].trim();
      const repoQuery = github_query ?? searchTerm;
    
      // All five sources fire in parallel
      const [priceResult, hnResult, redditResult, repoResult, changelogResult] = await Promise.allSettled([
        // 1. The anchor: live price, market cap, P/E, 52w range
        financeAdapter({ url: tickers, maxLength: perSection }),
        // 2. Developer sentiment: what engineers think of this company's tech
        hackerNewsAdapter({
          url: `https://hn.algolia.com/api/v1/search?query=${encodeURIComponent(searchTerm)}&tags=story&hitsPerPage=10`,
          maxLength: perSection,
        }),
        // 3. Broader community: investor and tech community discussion on Reddit
        redditAdapter({ url: `https://www.reddit.com/search.json?q=${encodeURIComponent(searchTerm)}&sort=new&limit=15`, maxLength: perSection }),
        // 4. Repo ecosystem: how many GitHub projects orbit this company's technology
        repoSearchAdapter({ url: repoQuery, maxLength: perSection }),
        // 5. Release velocity: is the company actually shipping product right now
        changelogAdapter({ url: repoQuery, maxLength: perSection }),
      ]);
    
      const section = (
        label: string,
        result: PromiseSettledResult<{ raw: string; content_date: string | null; freshness_confidence: string }>
      ) =>
        result.status === "fulfilled"
          ? `## ${label}\n${result.value.raw}`
          : `## ${label}\n[Unavailable: ${(result as PromiseRejectedResult).reason}]`;
    
      const combined = [
        `# Finance + Developer Intelligence: "${tickers}"${company_name ? ` (${company_name})` : ""}`,
        `Generated: ${new Date().toISOString()}`,
        `Sources: Yahoo Finance · Hacker News · Reddit · GitHub · Changelog`,
        "",
        section("📈 Market Data (Yahoo Finance)", priceResult),
        section("💬 Developer Sentiment (Hacker News)", hnResult),
        section("🗣️ Community Discussion (Reddit)", redditResult),
        section("📦 Repo Ecosystem (GitHub)", repoResult),
        section("🔄 Product Release Velocity (Changelog)", changelogResult),
      ].join("\n\n");
    
      return { content: [{ type: "text", text: combined }] };
  • The registration and input schema definition for the 'extract_finance_landscape' tool.
    server.registerTool(
      "extract_finance_landscape",
      {
        description:
          "Composite financial intelligence tool for developers. Given one or more ticker symbols, simultaneously queries: (1) Yahoo Finance for live price/market data, (2) Hacker News for developer community sentiment, (3) Reddit for investor and tech community discussion, (4) GitHub for repo ecosystem activity around the company's tech, and (5) their product changelog for release velocity as a company health signal. Answers: What's the price? What are developers saying? Is the company actually shipping? Returns a unified 5-source timestamped report. Bloomberg Terminal doesn't give you this.",
        inputSchema: z.object({
          tickers: z.string().describe(
            "One or more ticker symbols e.g. 'PLTR' or 'PLTR,MSFT,GOOG'. Up to 5 tickers."
          ),
          company_name: z.string().optional().describe(
            "Company name for HN/Reddit/GitHub searches e.g. 'Palantir'. If omitted, derived from the ticker."
          ),
          github_query: z.string().optional().describe(
            "GitHub search query or repo URL for the company's tech ecosystem e.g. 'palantir' or 'https://github.com/palantir/foundry'. If omitted, uses company_name."
          ),
          max_length: z.number().optional().default(12000),
        }),
        annotations: { readOnlyHint: true, openWorldHint: true },
      },

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/PrinceGabriel-lgtm/freshcontext-mcp'

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