get_trending
Fetch the newest and trending items on Vinted for a specific country. Optionally filter by category to discover current popular items and new arrivals.
Instructions
Fetch the newest and trending items on Vinted for a given country, ordered by recency. Optionally scoped to a specific category. Useful for discovering what's currently popular, monitoring new arrivals, or finding deals as they are listed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | Vinted country site to fetch trending items from | fr |
| categoryId | No | Optional category ID from get_categories to restrict results to a specific department | |
| limit | No | Number of trending items to return, 1–96 |
Implementation Reference
- src/ops/trending.ts:10-23 (handler)The opTrending function that executes the 'get_trending' tool logic. It calls searchItems with query='', sortBy='newest_first', and returns the result.
export async function opTrending( client: VintedClient, input: { country?: Country; categoryId?: number; limit?: number }, ): Promise<TrendingResult> { const country = input.country ?? 'fr'; const r = await searchItems(client, { query: '', country, categoryId: input.categoryId, perPage: Math.min(input.limit ?? 20, 100), sortBy: 'newest_first', }); return { country, items: r.items }; } - src/mcp.ts:179-190 (schema)Input schema definition for the 'get_trending' tool: accepts country (enum), categoryId (integer), and limit (integer, 1-96).
{ name: 'get_trending', description: 'Fetch the newest and trending items on Vinted for a given country, ordered by recency. Optionally scoped to a specific category. Useful for discovering what\'s currently popular, monitoring new arrivals, or finding deals as they are listed.', inputSchema: { type: 'object', properties: { country: { type: 'string', enum: COUNTRIES, default: 'fr', description: 'Vinted country site to fetch trending items from' }, categoryId: { type: 'integer', description: 'Optional category ID from get_categories to restrict results to a specific department' }, limit: { type: 'integer', default: 20, description: 'Number of trending items to return, 1–96' }, }, }, }, - src/mcp.ts:224-224 (registration)Registration of 'get_trending' in the MCP tool handler switch statement, dispatching to opTrending.
case 'get_trending': result = await opTrending(c, a as any); break; - src/ops/trending.ts:5-21 (helper)TrendingResult interface: country and items array.
export interface TrendingResult { country: Country; items: Item[]; } export async function opTrending( client: VintedClient, input: { country?: Country; categoryId?: number; limit?: number }, ): Promise<TrendingResult> { const country = input.country ?? 'fr'; const r = await searchItems(client, { query: '', country, categoryId: input.categoryId, perPage: Math.min(input.limit ?? 20, 100), sortBy: 'newest_first', });