Skip to main content
Glama
modellers

ConsignCloud MCP Server

by modellers

get_sales_trends

Analyze sales performance over time by retrieving trend data for specified date ranges and time intervals to support business decisions.

Instructions

Get sales trends and analytics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYesStart date (ISO 8601: YYYY-MM-DD) - REQUIRED
end_dateYesEnd date (ISO 8601: YYYY-MM-DD) - REQUIRED
bucket_sizeYesTime bucket size - REQUIRED

Implementation Reference

  • The core handler implementation for the 'get_sales_trends' tool. This method in the ConsignCloudClient class makes an HTTP GET request to the '/trends/sales' API endpoint with the provided parameters (start_date, end_date, bucket_size) and returns the response data.
    async getSalesTrends(params?: { start_date: string; end_date: string; bucket_size: 'day' | 'week' | 'month'; }): Promise<any> { const response = await this.client.get('/trends/sales', { params }); return response.data; }
  • src/server.ts:277-289 (registration)
    Registration of the 'get_sales_trends' tool in the createTools() function, including name, description, and input schema. This defines the tool for the MCP server.
    { name: 'get_sales_trends', description: 'Get sales trends and analytics', inputSchema: { type: 'object', properties: { start_date: { type: 'string', description: 'Start date (ISO 8601: YYYY-MM-DD) - REQUIRED' }, end_date: { type: 'string', description: 'End date (ISO 8601: YYYY-MM-DD) - REQUIRED' }, bucket_size: { type: 'string', enum: ['day', 'week', 'month'], description: 'Time bucket size - REQUIRED' }, }, required: ['start_date', 'end_date', 'bucket_size'], }, },
  • Input schema definition for validating parameters of the 'get_sales_trends' tool.
    inputSchema: { type: 'object', properties: { start_date: { type: 'string', description: 'Start date (ISO 8601: YYYY-MM-DD) - REQUIRED' }, end_date: { type: 'string', description: 'End date (ISO 8601: YYYY-MM-DD) - REQUIRED' }, bucket_size: { type: 'string', enum: ['day', 'week', 'month'], description: 'Time bucket size - REQUIRED' }, }, required: ['start_date', 'end_date', 'bucket_size'], },
  • MCP server request handler dispatch for 'get_sales_trends', which calls the client.getSalesTrends method and formats the response as MCP content.
    case 'get_sales_trends': return { content: [{ type: 'text', text: JSON.stringify(await client.getSalesTrends(args as any), 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/modellers/mcp-consigncloud'

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