Skip to main content
Glama

browse_products

Search and discover digital products like downloadable files, datasets, and templates in the402.ai marketplace catalog using keyword queries.

Instructions

Search the digital product catalog on the402.ai. Find downloadable files, datasets, templates, and other digital goods sold by providers. Supports keyword search. No authentication required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch keywords (full-text search)
limitNoResults per page (default: 20)
offsetNoPagination offset

Implementation Reference

  • The handler function for the browse_products tool which makes a GET request to the /v1/products endpoint.
    async ({ query, limit, offset }) => {
    	const params: Record<string, string> = {};
    	if (query) params.q = query;
    	if (limit !== undefined) params.limit = String(limit);
    	if (offset !== undefined) params.offset = String(offset);
    
    	const result = await client.get("/v1/products", params);
    	return {
    		content: [
    			{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    		],
    	};
    }
  • The schema definition (Zod) for the browse_products tool arguments.
    {
    	query: z
    		.string()
    		.optional()
    		.describe("Search keywords (full-text search)"),
    	limit: z.number().optional().describe("Results per page (default: 20)"),
    	offset: z.number().optional().describe("Pagination offset"),
    },
  • Registration of the browse_products tool using the McpServer instance.
    server.tool(
    	"browse_products",
    	"Search the digital product catalog on the402.ai. Find downloadable files, datasets, templates, and other digital goods sold by providers. Supports keyword search. No authentication required.",
    	{
    		query: z
    			.string()
    			.optional()
    			.describe("Search keywords (full-text search)"),
    		limit: z.number().optional().describe("Results per page (default: 20)"),
    		offset: z.number().optional().describe("Pagination offset"),
    	},
    	async ({ query, limit, offset }) => {
    		const params: Record<string, string> = {};
    		if (query) params.q = query;
    		if (limit !== undefined) params.limit = String(limit);
    		if (offset !== undefined) params.offset = String(offset);
    
    		const result = await client.get("/v1/products", params);
    		return {
    			content: [
    				{ type: "text" as const, text: JSON.stringify(result, 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/the402ai/mcp-server'

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