Skip to main content
Glama

get_top_integrations

Retrieve ranked integrations and MCP servers for an AI ecosystem, with optional filtering by use case to find relevant tools.

Instructions

Get ranked integrations and MCP servers for an AI ecosystem. Optionally filter by use case. Strata provides intelligence, not ground truth. Always verify critical decisions against the source_urls returned with each item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ecosystemYes
use_caseNo

Implementation Reference

  • The handler function that executes 'get_top_integrations' logic. It checks ecosystem access, then if a use_case is provided it searches content_items via RPC with category='integrations', otherwise queries content_items directly filtered by ecosystem_slug and category='integrations'. Returns ranked integration items with source_urls.
    if (name === 'get_top_integrations') {
      const ecosystem = args.ecosystem as string
      const useCase = args.use_case as string | undefined
    
      const access = await checkEcosystemAccess(supabase, ecosystem, profile.tier)
      if (!access.ok) {
        await logApiRequest(supabase, { apiKey: profile.api_key, tool: 'integrations', ecosystem, statusCode: access.response.status })
        return err('Error: Ecosystem not available on free tier. Upgrade at usestrata.dev/dashboard/billing', access.response.status)
      }
    
      if (useCase) {
        const { data, error } = await supabase.rpc('search_content_items', {
          search_query: useCase,
          filter_ecosystem: access.slug,
          filter_category: 'integrations',
          user_tier: profile.tier,
        })
        if (error) {
          await logApiRequest(supabase, { apiKey: profile.api_key, tool: 'integrations', ecosystem, statusCode: 500 })
          return err('Error: Search error', 500)
        }
        type SearchRow = { id: string; title: string; body: string; source_url: string | null; rank: number }
        const rows = ((data ?? []) as SearchRow[])
        const items = rows.map((r) => ({
          id: r.id, title: r.title, body: r.body,
          source_urls: r.source_url ? [r.source_url] : [],
          rank: r.rank,
        }))
        await logApiRequest(supabase, { apiKey: profile.api_key, tool: 'integrations', ecosystem, statusCode: 200 })
        return ok({ ecosystem, items }, rows.map(r => r.id))
      }
    
      let query = supabase
        .from('content_items')
        .select('id, title, body, source_url')
        .eq('ecosystem_slug', access.slug)
        .eq('category', 'integrations')
        .eq('is_quarantined', false)
        .order('published_at', { ascending: false })
    
      if (profile.tier === 'free') query = query.eq('is_pro_only', false)
    
      const { data, error } = await query
      if (error) {
        await logApiRequest(supabase, { apiKey: profile.api_key, tool: 'integrations', ecosystem, statusCode: 500 })
        return err('Error: Database error', 500)
      }
    
      type Row = { id: string; title: string; body: string; source_url: string | null }
      const rows = ((data ?? []) as Row[])
      const items = rows.map((r) => ({
        id: r.id, title: r.title, body: r.body,
        source_urls: r.source_url ? [r.source_url] : [],
      }))
      await logApiRequest(supabase, { apiKey: profile.api_key, tool: 'integrations', ecosystem, statusCode: 200 })
      return ok({ ecosystem, items }, rows.map(r => r.id))
    }
  • The input schema definition for 'get_top_integrations'. Defines required 'ecosystem' (string slug) and optional 'use_case' (string filter).
    {
      name: 'get_top_integrations',
      description:
        'Get ranked integrations and MCP servers for an AI ecosystem. Optionally filter by use case. ' +
        EPISTEMIC_NOTICE,
      inputSchema: {
        type: 'object',
        properties: {
          ecosystem: { type: 'string', description: 'AI ecosystem slug' },
          use_case: {
            type: 'string',
            description: 'Filter by use case e.g. coding, research, data analysis',
          },
        },
        required: ['ecosystem'],
      },
    },
  • app/mcp/route.ts:44-51 (registration)
    Registers 'get_top_integrations' tool on the HTTP MCP server (McpServer) with Zod schema { ecosystem: z.string(), use_case: z.string().optional() }, routing to handleToolCall.
    server.registerTool(
      'get_top_integrations',
      {
        description: TOOL_DEFINITIONS[2].description,
        inputSchema: { ecosystem: z.string(), use_case: z.string().optional() },
      },
      (args) => handleToolCall('get_top_integrations', args as Record<string, unknown>, req),
    )
  • Registers 'get_top_integrations' tool on the stdio MCP server (used for local/CLI testing), routing to handleToolCall with a mock request.
    server.registerTool(
      'get_top_integrations',
      {
        description: TOOL_DEFINITIONS[2].description,
        inputSchema: { ecosystem: z.string(), use_case: z.string().optional() },
      },
      (args) =>
        handleToolCall('get_top_integrations', args as Record<string, unknown>, mockReq),
    )
  • The ToolDefinition interface used to type the TOOL_DEFINITIONS array, which contains the schema for get_top_integrations at index [2].
    export interface ToolDefinition {
      name: string
      description: string
      inputSchema: {
        type: 'object'
        properties: Record<string, {
          type: string
          description: string
          items?: { type: string }
        }>
        required: string[]
      }
    }
Behavior3/5

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

No annotations are provided, so the description must cover behavioral traits. It includes a critical caveat that the data is 'intelligence, not ground truth' and recommends verification via source_urls. However, it omits other traits like rate limits or idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, 30 words, immediately stating purpose then a crucial behavioral note. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no parameter descriptions, the description does not explain what return values look like (beyond mentioning source_urls) or how to construct valid requests. Essential context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no information about valid values for 'ecosystem' or 'use_case'. No enums, examples, or formats are provided, leaving the agent to guess.

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 description clearly states the tool gets 'ranked integrations and MCP servers' with optional filtering by use case. It is specific about the resource and action, and distinct from siblings like 'find_mcp_servers' which likely searches unranked.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide guidance on when to use this tool versus alternatives such as 'find_mcp_servers' or 'search_ecosystem'. No exclusions or prerequisites are mentioned.

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

Install Server

Other Tools

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/PThrower/Strata'

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