Skip to main content
Glama
wspotter

MCP Art Supply Store

by wspotter

get_best_sellers

Retrieve top-selling art supplies by category or overall, showing quantity sold and revenue data for specific time periods to identify popular products.

Instructions

Get top-selling products by category or overall, with quantity sold and revenue generated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoOptional: filter by category
periodYesTime period: week, month, quarter, year

Implementation Reference

  • Handler function for 'get_best_sellers' tool. Filters inventory by optional category, sorts by price descending (as proxy for best sellers), returns top 5 with details.
    case 'get_best_sellers': {
      const category = args?.category ? String(args.category) : null;
      const period = String(args?.period || 'week');
      
      let items = storeData.inventory;
      if (category) {
        items = items.filter(i => i.category.toLowerCase() === category.toLowerCase());
      }
      
      const bestSellers = items.sort((a, b) => b.price - a.price).slice(0, 5);
      
      return {
        content: [{
          type: 'text',
          text: `🏆 Best Sellers${category ? ` in ${category}` : ''} (${period}):\n\n${bestSellers.map((item, i) =>
            `${i + 1}. ${item.name}\n   Price: $${item.price} | In stock: ${item.quantity}`
          ).join('\n\n')}`
        }]
      };
    }
  • Input schema definition for the 'get_best_sellers' tool, specifying parameters category (optional) and period (required).
    {
      name: 'get_best_sellers',
      description: 'Get top-selling products by category or overall, with quantity sold and revenue generated.',
      inputSchema: {
        type: 'object',
        properties: {
          category: { type: 'string', description: 'Optional: filter by category' },
          period: { type: 'string', description: 'Time period: week, month, quarter, year' },
        },
        required: ['period'],
      },
    },
  • src/index.ts:516-518 (registration)
    Registration of all tools list handler, which includes 'get_best_sellers' in the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/dashboard.ts:49-49 (registration)
    Mock tool listing in dashboard server for UI display.
    { name: 'get_best_sellers', description: 'Top selling products', category: 'Sales & Analytics' },
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 by using 'Get', but doesn't address critical aspects like whether it requires authentication, has rate limits, returns paginated results, or what happens on errors. For a tool with no 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.

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core functionality and includes key details without any wasted words. It's appropriately sized for the tool's complexity, making it easy to parse and understand quickly.

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 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and parameters but lacks behavioral details and usage guidelines. Without annotations or output schema, more context on return values or operational constraints would improve completeness for effective agent use.

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 description adds some meaning by mentioning 'by category or overall', which clarifies the optional 'category' parameter, and implies time-based ranking through 'top-selling'. However, with 100% schema description coverage, the schema already documents both parameters well, so the description only provides marginal additional context without detailing syntax or format beyond what's in the schema.

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 ('Get') and resource ('top-selling products'), and it specifies what data is returned ('quantity sold and revenue generated'). However, it doesn't explicitly differentiate from sibling tools like 'get_daily_sales' or 'get_sales_report', which might also involve sales data, leaving some ambiguity about its unique role.

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. It mentions filtering by category or overall, but doesn't specify scenarios, prerequisites, or exclusions, such as compared to 'get_sales_report' or 'get_top_customers'. This lack of context makes it harder for an AI agent to choose appropriately among similar tools.

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