Skip to main content
Glama
wspotter

MCP Art Supply Store

by wspotter

get_sales_report

Generate comprehensive sales reports for specific date ranges to analyze trends, compare performance, and gain business insights for art supply store management.

Instructions

Generate comprehensive sales report for a date range with trends, comparisons, and insights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateYesEnd date in YYYY-MM-DD format
startDateYesStart date in YYYY-MM-DD format

Implementation Reference

  • Tool schema definition with input schema requiring startDate and endDate parameters.
      name: 'get_sales_report',
      description: 'Generate comprehensive sales report for a date range with trends, comparisons, and insights.',
      inputSchema: {
        type: 'object',
        properties: {
          startDate: { type: 'string', description: 'Start date in YYYY-MM-DD format' },
          endDate: { type: 'string', description: 'End date in YYYY-MM-DD format' },
        },
        required: ['startDate', 'endDate'],
      },
    },
  • Handler function that filters sales data by date range, computes totals, averages, and returns a formatted sales report.
    case 'get_sales_report': {
      const startDate = String(args?.startDate || '');
      const endDate = String(args?.endDate || '');
      
      const periodSales = storeData.sales.filter(s => s.date >= startDate && s.date <= endDate);
      const totalRevenue = periodSales.reduce((sum, s) => sum + s.revenue, 0);
      const totalTransactions = periodSales.reduce((sum, s) => sum + s.transactions, 0);
      
      return {
        content: [{
          type: 'text',
          text: `šŸ“Š Sales Report: ${startDate} to ${endDate}\n\nšŸ’° Total Revenue: $${totalRevenue.toFixed(2)}\nšŸ›’ Total Transactions: ${totalTransactions}\nšŸ“ˆ Average Transaction: $${(totalRevenue / totalTransactions).toFixed(2)}\nšŸ“… Days in Period: ${periodSales.length}\nšŸ“Š Daily Average: $${(totalRevenue / periodSales.length).toFixed(2)}`
        }]
      };
    }
  • Mock sales data array used by the get_sales_report handler to compute reports.
    sales: [
      { date: '2025-10-03', revenue: 456.78, transactions: 12, topItem: 'Acrylic Paint Set' },
      { date: '2025-10-02', revenue: 623.45, transactions: 18, topItem: 'Canvas Panel 16x20"' },
      { date: '2025-10-01', revenue: 389.90, transactions: 9, topItem: 'Oil Paint Starter Kit' },
      { date: '2025-09-30', revenue: 712.34, transactions: 21, topItem: 'Drawing Pencil Set' },
    ],
  • src/index.ts:516-518 (registration)
    Registration of all tools list handler, which includes get_sales_report in the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'generates' a report, implying a read operation, but lacks details on permissions, rate limits, output format, or whether it's cached/real-time. For a reporting tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Generate comprehensive sales report') and includes key scope details. There's no wasted verbiage, though it could be slightly more structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 required parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on output format, behavioral traits, and usage context, which are important for a reporting tool with no structured metadata to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the input schema. The description adds context by mentioning 'date range', which aligns with the schema's startDate and endDate parameters, but doesn't provide additional semantic details beyond what the schema already specifies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Generate') and resource ('comprehensive sales report'), including scope details like 'date range with trends, comparisons, and insights'. It distinguishes from obvious siblings like 'get_daily_sales' by emphasizing comprehensiveness, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_daily_sales' or 'generate_eod_report'. It mentions a date range but doesn't specify use cases, prerequisites, or exclusions, leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/wspotter/mcpart'

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