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
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search keywords (full-text search) | |
| limit | No | Results per page (default: 20) | |
| offset | No | Pagination offset |
Implementation Reference
- src/tools/products.ts:17-29 (handler)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) }, ], }; } - src/tools/products.ts:9-16 (schema)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"), }, - src/tools/products.ts:6-30 (registration)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) }, ], }; } );