Skip to main content
Glama
wspotter

MCP Art Supply Store

by wspotter

get_customer_recommendations

Generate personalized art supply recommendations for customers based on their purchase history and preferences to enhance shopping experience and increase sales.

Instructions

Get personalized product recommendations based on customer purchase history and preferences.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerIdYesCustomer ID

Implementation Reference

  • Handler function that finds a customer by ID, matches their preferences against inventory items to generate personalized product recommendations, and returns a formatted list of up to 5 suggested products with prices and stock levels.
    case 'get_customer_recommendations': {
      const customerId = String(args?.customerId || '');
      const customer = storeData.customers.find(c => c.id === customerId);
      
      if (!customer) {
        return { content: [{ type: 'text', text: `❌ Customer ${customerId} not found` }] };
      }
      
      const recommendations = storeData.inventory.filter(item =>
        customer.preferences.some(pref => 
          item.name.toLowerCase().includes(pref.toLowerCase()) ||
          item.category.toLowerCase().includes(pref.toLowerCase())
        )
      ).slice(0, 5);
      
      return {
        content: [{
          type: 'text',
          text: `🎯 Personalized recommendations for ${customer.name}:\n\nBased on preferences: ${customer.preferences.join(', ')}\n\n${recommendations.map(item =>
            `• ${item.name} - $${item.price}\n  ${item.quantity} in stock`
          ).join('\n')}`
        }]
      };
    }
  • Tool schema definition including name, description, and input schema requiring a customerId string.
    {
      name: 'get_customer_recommendations',
      description: 'Get personalized product recommendations based on customer purchase history and preferences.',
      inputSchema: {
        type: 'object',
        properties: {
          customerId: { type: 'string', description: 'Customer ID' },
        },
        required: ['customerId'],
      },
    },
  • src/index.ts:516-518 (registration)
    Registration of the ListToolsRequestSchema handler which returns the full list of tools including get_customer_recommendations via the 'tools' array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool 'Get[s] personalized product recommendations' but doesn't specify whether this is a read-only operation, what permissions might be required, how recommendations are generated (e.g., algorithm details, data sources beyond purchase history), or any rate limits. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly, and every part of the sentence contributes meaningfully to understanding the tool.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what the recommendations output looks like (e.g., format, fields), behavioral traits like safety or performance, or how to handle edge cases. For a tool that likely returns complex data (product recommendations), this leaves the agent under-informed.

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 input schema has 100% description coverage, with the parameter 'customerId' documented as 'Customer ID'. The description adds context by implying that recommendations are based on 'customer purchase history and preferences', which relates to the 'customerId' parameter, but it doesn't provide additional semantic details beyond what the schema already covers. This meets the baseline score of 3 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 a specific verb ('Get') and resource ('personalized product recommendations'), and it specifies the basis ('based on customer purchase history and preferences'). However, it doesn't explicitly distinguish this tool from potential siblings like 'suggest_bundle' or 'get_best_sellers', which might also involve recommendations, leaving some ambiguity in sibling differentiation.

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 doesn't mention prerequisites (e.g., needing a valid customer ID), exclusions, or comparisons to sibling tools like 'suggest_bundle' or 'lookup_customer', leaving the agent to infer usage context without explicit direction.

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