Skip to main content
Glama

rr_get_stockout_risk

Identify stockout risk levels for specific SKUs to prevent inventory shortages and optimize replenishment planning.

Instructions

Get stockout risk levels for SKUs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
risk_levelNo
skuNo
store_idNo
limitNo

Implementation Reference

  • The generic handler function that dispatches tool calls to the ReplenishRadar API. All tools, including 'rr_get_stockout_risk', are handled through this function.
    async function callApi(toolName: string, input: Record<string, unknown>): Promise<unknown> {
      const resp = await fetch(`${BASE_URL}/api/mcp/call`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${API_KEY}`,
        },
        body: JSON.stringify({ tool: toolName, input }),
      });
    
      if (!resp.ok) {
        const errorBody = await resp.text();
        throw new Error(`API error ${resp.status}: ${errorBody}`);
      }
    
      const data = await resp.json();
      return data.result;
    }
  • src/index.ts:26-26 (registration)
    Registration of the 'rr_get_stockout_risk' tool in the TOOLS array.
    { name: 'rr_get_stockout_risk', description: 'Get stockout risk levels for SKUs', inputSchema: { type: 'object' as const, properties: { risk_level: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] }, sku: { type: 'string' }, store_id: { type: 'string' }, limit: { type: 'number', default: 100 } } } },

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/ReplenishRadar/MCP'

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