Skip to main content
Glama

extract_landscape

Analyze competitive landscapes by querying 6 sources including YC startups, GitHub, and Product Hunt to identify who's building similar projects, funding status, and traction.

Instructions

Composite intelligence tool. Given a project idea or keyword, simultaneously queries YC startups, GitHub repos, HN, Reddit, Product Hunt, and package registries to answer: Who is building this? Is it funded? What's getting traction? Returns a unified 6-source timestamped landscape report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesYour project idea or keyword e.g. 'mcp server' or 'cashflow prediction'
max_lengthNo

Implementation Reference

  • The handler function for 'extract_landscape' tool, which aggregates data from YC, GitHub, Hacker News, and package registries.
    async ({ topic, max_length }) => {
      const perSection = Math.floor((max_length ?? 8000) / 4);
    
      const [ycResult, repoResult, hnResult, pkgResult] = await Promise.allSettled([
        ycAdapter({ url: `https://www.ycombinator.com/companies?query=${encodeURIComponent(topic)}`, maxLength: perSection }),
        repoSearchAdapter({ url: topic, maxLength: perSection }),
        hackerNewsAdapter({ url: `https://hn.algolia.com/api/v1/search?query=${encodeURIComponent(topic)}&tags=story&hitsPerPage=15`, maxLength: perSection }),
        packageTrendsAdapter({ url: topic, 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[Error: ${(result as PromiseRejectedResult).reason}]`;
    
      const combined = [
        `# Landscape Report: "${topic}"`,
        `Generated: ${new Date().toISOString()}`,
        "",
        section("πŸš€ YC Startups in this space", ycResult),
        section("πŸ“¦ Top GitHub repos", repoResult),
        section("πŸ’¬ HN sentiment (last month)", hnResult),
        section("πŸ“Š Package ecosystem", pkgResult),
      ].join("\n\n");
    
      return { content: [{ type: "text", text: combined }] };
    }
  • Input schema definition for the 'extract_landscape' tool.
    inputSchema: z.object({
      topic: z.string().describe("Your project idea or keyword e.g. 'mcp server' or 'cashflow prediction'"),
      max_length: z.number().optional().default(10000),
    }),
  • src/server.ts:167-177 (registration)
    Registration of the 'extract_landscape' tool in src/server.ts.
    server.registerTool(
      "extract_landscape",
      {
        description:
          "Composite intelligence tool. Given a project idea or keyword, simultaneously queries YC startups, GitHub repos, HN, Reddit, Product Hunt, and package registries to answer: Who is building this? Is it funded? What's getting traction? Returns a unified 6-source timestamped landscape report.",
        inputSchema: z.object({
          topic: z.string().describe("Your project idea or keyword e.g. 'mcp server' or 'cashflow prediction'"),
          max_length: z.number().optional().default(10000),
        }),
        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