Skip to main content
Glama
modellers

ConsignCloud MCP Server

by modellers

get_sales_trends

Analyze sales performance over time by retrieving trends and analytics data from ConsignCloud. Specify date ranges and time buckets to identify patterns and inform 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 implementation of the get_sales_trends tool. This method in ConsignCloudClient makes an authenticated GET request to the '/trends/sales' API endpoint using the provided date range and bucket_size parameters, returning the raw API 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 createTools(). This defines the tool's name, description, and input schema, which is returned to MCP clients via ListToolsRequestHandler.
    { 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 the get_sales_trends tool, specifying required parameters and their types/validation for MCP tool calls.
    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 CallToolRequestSchema dispatch handler for 'get_sales_trends'. Delegates execution to the ConsignCloudClient.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