Skip to main content
Glama

commerce_recall

Read-only

Retrieve past commerce feedback with quality scores to inform product recommendations, brand compliance, sizing, pricing, and regulatory decisions.

Instructions

Recall past feedback filtered by commerce categories (product_recommendation, brand_compliance, sizing, pricing, regulatory). Returns quality scores alongside memories for agentic commerce agents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesProduct or brand context to find relevant past feedback
categoriesNoCommerce categories to filter (default: all commerce categories)
limitNoMax memories to return (default 5)

Implementation Reference

  • The function that implements the logic for 'commerce_recall', aggregating quality scores based on commerce feedback.
    function buildCommerceRecallResponse(args = {}) {
      const requestedCategories = Array.isArray(args.categories) && args.categories.length > 0
        ? args.categories
        : COMMERCE_CATEGORIES;
      const modelPath = path.join(SAFE_DATA_DIR, 'feedback_model.json');
      const reliability = getReliability(loadModel(modelPath));
      const lines = ['## Commerce Quality Scores', ''];
    
      for (const category of requestedCategories) {
        const stats = reliability[category];
        if (!stats) continue;
        const successRate = typeof stats.success_rate === 'number'
          ? `${(stats.success_rate * 100).toFixed(1)}%`
          : 'n/a';
        lines.push(`- ${category}: ${successRate} success rate over ${stats.total || 0} samples`);
      }
    
      if (lines.length === 2) {
        lines.push('- No commerce quality scores recorded yet.');
      }
    
      lines.push('');
      lines.push(`Query: ${args.query || ''}`);
      return toTextResult(lines.join('\n'));
  • The tool registration and schema definition for 'commerce_recall'.
    readOnlyTool({
      name: 'commerce_recall',
      description: 'Recall past feedback filtered by commerce categories (product_recommendation, brand_compliance, sizing, pricing, regulatory). Returns quality scores alongside memories for agentic commerce agents.',
      inputSchema: {
        type: 'object',
        required: ['query'],
        properties: {
          query: { type: 'string', description: 'Product or brand context to find relevant past feedback' },
          categories: { type: 'array', items: { type: 'string' }, description: 'Commerce categories to filter (default: all commerce categories)' },
          limit: { type: 'number', description: 'Max memories to return (default 5)' },
        },
      },
    }),
  • The switch-case handler that calls the implementation function when the 'commerce_recall' tool is invoked.
    case 'commerce_recall':
      return buildCommerceRecallResponse(args);
Behavior3/5

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

The description adds some behavioral context beyond annotations: it specifies the five commerce categories used for filtering and mentions that quality scores are returned alongside memories. However, annotations already declare readOnlyHint=true, so the agent knows this is a safe read operation. The description doesn't disclose important behavioral aspects like pagination, rate limits, or authentication requirements.

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 extremely concise and front-loaded with essential information in a single sentence. Every word earns its place: it specifies the action (recall), the resource (past feedback), the filtering mechanism (commerce categories), and the return value (quality scores alongside memories). There's zero wasted verbiage.

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?

For a read-only tool with full schema coverage and no output schema, the description is minimally adequate. It covers the basic purpose and mentions what's returned, but doesn't explain the format of returned quality scores or memories. Given the complexity of filtering by commerce categories and returning both scores and memories, more detail about the output structure would be helpful.

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%, so the schema already fully documents all three parameters. The description adds marginal value by listing the five specific commerce categories (product_recommendation, brand_compliance, sizing, pricing, regulatory) that the 'categories' parameter accepts, but doesn't provide additional syntax, format, or constraint details beyond what the schema provides.

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: 'Recall past feedback filtered by commerce categories' with specific categories listed. It distinguishes from the generic 'recall' sibling tool by specifying commerce categories and mentioning quality scores for agentic commerce agents. However, it doesn't explicitly contrast with other feedback-related siblings like 'feedback_stats' or 'feedback_summary'.

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 'agentic commerce agents' as the target, but doesn't specify scenarios, prerequisites, or exclusions. With multiple feedback-related siblings (capture_feedback, feedback_stats, feedback_summary, recall), this lack of differentiation is a significant gap.

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/IgorGanapolsky/mcp-memory-gateway'

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