Skip to main content
Glama
wspotter

MCP Art Supply Store

by wspotter

get_daily_sales

Retrieve daily sales data including revenue, transaction count, and top-selling items for business analysis and reporting.

Instructions

Get sales summary for a specific date including revenue, transaction count, and top-selling items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (default: today)

Implementation Reference

  • The core handler logic for the 'get_daily_sales' MCP tool. It fetches sales data for a given date from the mock storeData.sales array and formats a response with revenue, transaction count, average transaction value, and top-selling item.
    case 'get_daily_sales': {
      const date = String(args?.date || '2025-10-03');
      const salesData = storeData.sales.find(s => s.date === date);
      
      if (!salesData) {
        return { content: [{ type: 'text', text: `No sales data found for ${date}` }] };
      }
      
      return {
        content: [{
          type: 'text',
          text: `šŸ“Š Sales Report for ${salesData.date}\n\nšŸ’µ Revenue: $${salesData.revenue.toFixed(2)}\nšŸ›’ Transactions: ${salesData.transactions}\nšŸ“ˆ Avg Transaction: $${(salesData.revenue / salesData.transactions).toFixed(2)}\nšŸ† Top Seller: ${salesData.topItem}`
        }]
      };
    }
  • The tool schema definition including name, description, and input schema (optional date parameter). This is returned by the ListToolsRequestHandler.
      name: 'get_daily_sales',
      description: 'Get sales summary for a specific date including revenue, transaction count, and top-selling items.',
      inputSchema: {
        type: 'object',
        properties: {
          date: { type: 'string', description: 'Date in YYYY-MM-DD format (default: today)' },
        },
      },
    },
  • src/index.ts:516-518 (registration)
    Registration of the tools list via ListToolsRequestHandler, which includes 'get_daily_sales' in the 'tools' array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/index.ts:518-521 (registration)
    The CallToolRequestHandler switch statement registers and dispatches to the get_daily_sales case handler.
    });
    
    // Handle tool calls
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
  • Mock sales data used by the get_daily_sales handler.
    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' },
    ],
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 implies a read-only operation ('get') but doesn't specify permissions, rate limits, or response format. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior beyond basic functionality.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the key information ('get sales summary') and includes essential details without any waste. It's appropriately sized for the tool's complexity and easy to parse.

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 (1 parameter, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and output structure but lacks behavioral context, usage guidelines, and differentiation from siblings, which are important for effective tool selection.

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?

The schema description coverage is 100%, with the single parameter 'date' well-documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format details or constraints, so it meets the baseline score for high schema coverage.

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 specific verbs ('get sales summary') and resources ('revenue, transaction count, and top-selling items'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'get_sales_report' or 'get_best_sellers', which might have overlapping functionality.

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_sales_report' or 'get_best_sellers', nor does it mention any prerequisites or exclusions. It only describes what the tool does, not when it's appropriate to use it.

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