Skip to main content
Glama

search_feed

Search and sort WebSim feed content using queries with trending, newest, or popular filters to discover projects and community content.

Instructions

Search WebSim feed with sorting options

Input Schema

NameRequiredDescriptionDefault
sortYesSort method (trending, newest, or popular)
searchYesSearch query
limitNoNumber of results to return (default: 20)
offsetNoNumber of results to skip (default: 0)

Input Schema (JSON Schema)

{ "properties": { "limit": { "default": 20, "description": "Number of results to return (default: 20)", "type": "number" }, "offset": { "default": 0, "description": "Number of results to skip (default: 0)", "type": "number" }, "search": { "description": "Search query", "type": "string" }, "sort": { "description": "Sort method (trending, newest, or popular)", "enum": [ "trending", "newest", "popular" ], "type": "string" } }, "required": [ "sort", "search" ], "type": "object" }

Implementation Reference

  • The handler function for the 'search_feed' tool. It validates the input arguments using FeedSearchSchema, calls the apiClient.searchFeed method with the parameters, and returns a formatted response containing the search results.
    handler: async (args) => { const { sort, search, limit = 20, offset = 0 } = FeedSearchSchema.parse(args); const result = await apiClient.searchFeed(sort, search, limit, offset); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Found ${result.items?.length || 0} results for "${search}" (sorted by ${sort})` }, null, 2) }] }; }
  • The input schema definition for the 'search_feed' tool, specifying parameters: sort (enum: trending/newest/popular), search (string), optional limit and offset.
    inputSchema: { type: "object", properties: { sort: { type: "string", enum: ["trending", "newest", "popular"], description: "Sort method (trending, newest, or popular)" }, search: { type: "string", description: "Search query" }, limit: { type: "number", description: "Number of results to return (default: 20)", default: 20 }, offset: { type: "number", description: "Number of results to skip (default: 0)", default: 0 } }, required: ["sort", "search"] },
  • The WebSimAPIClient method searchFeed that makes the actual API request to /api/v1/feed/search/{sort}/{search} with pagination params.
    async searchFeed(sort, search, limit = 20, offset = 0) { const params = new URLSearchParams({ limit: limit.toString(), offset: offset.toString() }); return this.makeRequest(`/api/v1/feed/search/${sort}/${search}?${params}`); }
  • Zod validation schema used in the handler to parse required inputs: sort and search (limit/offset destructured with defaults).
    const FeedSearchSchema = z.object({ sort: z.enum(['trending', 'newest', 'popular']).describe('Sort method'), search: z.string().describe('Search query') });
  • server.js:710-752 (registration)
    The full tool registration object in the tools array, including name, description, inputSchema, and handler for 'search_feed'.
    { name: "search_feed", description: "Search WebSim feed with sorting options", inputSchema: { type: "object", properties: { sort: { type: "string", enum: ["trending", "newest", "popular"], description: "Sort method (trending, newest, or popular)" }, search: { type: "string", description: "Search query" }, limit: { type: "number", description: "Number of results to return (default: 20)", default: 20 }, offset: { type: "number", description: "Number of results to skip (default: 0)", default: 0 } }, required: ["sort", "search"] }, handler: async (args) => { const { sort, search, limit = 20, offset = 0 } = FeedSearchSchema.parse(args); const result = await apiClient.searchFeed(sort, search, limit, offset); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Found ${result.items?.length || 0} results for "${search}" (sorted by ${sort})` }, null, 2) }] }; } },

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/gigachadtrey/websimm'

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