Skip to main content
Glama
Beyond-Network-AI

Beyond MCP Server

search-channels

Search for social platform channels using platform-specific queries. Input platform name, search term, and optional parameters like limit, cursor, and channel inclusion for targeted results.

Instructions

Search for channels on a social platform

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoCursor for pagination
includeChannelsNoWhether to include channel information in results
limitNoMaximum number of results to return
platformYesThe platform to search on (e.g., 'farcaster')
queryYesThe search query

Implementation Reference

  • Registration of the 'search-channels' MCP tool, including description, input schema, and inline handler function that delegates to platform provider's searchChannels method and formats results.
    server.tool(
      "search-channels",
      "Search for channels on a social platform",
      {
        platform: z.string().describe("The platform to search on (e.g., 'farcaster')"),
        query: z.string().describe("The search query"),
        limit: z.number().optional().describe("Maximum number of results to return"),
        cursor: z.string().optional().describe("Cursor for pagination"),
        includeChannels: z.boolean().optional().describe("Whether to include channel information in results")
      },
      async ({ platform, query, limit, cursor, includeChannels }) => {
        try {
          const provider = providerRegistry.getProviderForPlatform(platform);
          
          if (!provider) {
            throw new Error(`Provider for platform '${platform}' not found`);
          }
    
          // Check if the provider supports channel search
          if (!provider.searchChannels) {
            throw new Error(`Channel search is not supported for platform '${platform}'`);
          }
          
          const results = await provider.searchChannels(query, {
            limit,
            cursor,
            includeChannels
          });
          
          // Format the results
          const formattedResults = results.channels.map(channel => 
            `Channel: ${channel.name}\n` +
            `Description: ${channel.description || 'No description'}\n` +
            `Followers: ${channel.followerCount}\n` +
            `Created: ${channel.createdAt}\n` +
            `URL: ${channel.parentUrl || 'N/A'}\n`
          ).join('\n');
    
          let response = `Found ${results.channels.length} channels:\n\n${formattedResults}`;
          if (results.nextCursor) {
            response += `\n\nUse the cursor "${results.nextCursor}" to fetch more results.`;
          }
          
          return {
            content: [{ type: "text", text: response }],
            isError: false
          };
        } catch (error) {
          console.error(`Error in search-channels tool:`, error);
          return {
            content: [{ 
              type: "text", 
              text: `Error searching channels on ${platform} for '${query}': ${error instanceof Error ? error.message : String(error)}` 
            }],
            isError: true
          };
        }
      }
    );
  • The execution handler for the 'search-channels' tool. Retrieves the platform provider, validates support for channel search, invokes provider.searchChannels, formats channel details (name, desc, followers, created, URL), handles pagination cursor, and returns formatted text response or error.
    async ({ platform, query, limit, cursor, includeChannels }) => {
      try {
        const provider = providerRegistry.getProviderForPlatform(platform);
        
        if (!provider) {
          throw new Error(`Provider for platform '${platform}' not found`);
        }
    
        // Check if the provider supports channel search
        if (!provider.searchChannels) {
          throw new Error(`Channel search is not supported for platform '${platform}'`);
        }
        
        const results = await provider.searchChannels(query, {
          limit,
          cursor,
          includeChannels
        });
        
        // Format the results
        const formattedResults = results.channels.map(channel => 
          `Channel: ${channel.name}\n` +
          `Description: ${channel.description || 'No description'}\n` +
          `Followers: ${channel.followerCount}\n` +
          `Created: ${channel.createdAt}\n` +
          `URL: ${channel.parentUrl || 'N/A'}\n`
        ).join('\n');
    
        let response = `Found ${results.channels.length} channels:\n\n${formattedResults}`;
        if (results.nextCursor) {
          response += `\n\nUse the cursor "${results.nextCursor}" to fetch more results.`;
        }
        
        return {
          content: [{ type: "text", text: response }],
          isError: false
        };
      } catch (error) {
        console.error(`Error in search-channels tool:`, error);
        return {
          content: [{ 
            type: "text", 
            text: `Error searching channels on ${platform} for '${query}': ${error instanceof Error ? error.message : String(error)}` 
          }],
          isError: true
        };
      }
    }
  • Zod input schema for 'search-channels' tool defining parameters: platform (string), query (string), optional limit (number), cursor (string), includeChannels (boolean).
    {
      platform: z.string().describe("The platform to search on (e.g., 'farcaster')"),
      query: z.string().describe("The search query"),
      limit: z.number().optional().describe("Maximum number of results to return"),
      cursor: z.string().optional().describe("Cursor for pagination"),
      includeChannels: z.boolean().optional().describe("Whether to include channel information in results")
    },
  • Top-level registration call to registerContentTools which includes the 'search-channels' tool among others.
    registerContentResources(server, providerRegistry);
    registerContentTools(server, providerRegistry);
    registerContentPrompts(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'search' but doesn't specify whether this is a read-only operation, what permissions might be needed, rate limits, or what the response format looks like. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a search tool and front-loaded with essential information, making it easy to parse quickly.

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 the complexity of a search tool with 5 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain return values, error conditions, or how results are structured. For a tool that likely returns paginated data with channel information, more context is needed to use it effectively.

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

Parameters3/5

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

The description adds no parameter-specific information beyond what's already in the schema (which has 100% coverage). It doesn't explain how parameters interact (e.g., how 'platform' affects 'query') or provide usage examples. With high schema coverage, the baseline is 3, but the description doesn't compensate with additional semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search for') and resource ('channels on a social platform'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'search-bulk-channels' or 'search-content', which would require more specificity about what makes this search unique.

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 provides no guidance on when to use this tool versus alternatives like 'search-bulk-channels' or 'search-content'. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

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

Related 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/Beyond-Network-AI/beyond-mcp-server'

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