rr_acknowledge_alert
Acknowledge inventory alerts to confirm receipt and update status, enabling better tracking and management of stock notifications.
Instructions
Acknowledge an alert
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alert_id | Yes | ||
| note | No |
Implementation Reference
- src/index.ts:57-74 (handler)The handler logic for the tool is generic, as all tools are executed through the callApi function which forwards the tool name and arguments to a remote API.
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:46-46 (registration)Definition and registration of the rr_acknowledge_alert tool in the TOOLS array.
{ name: 'rr_acknowledge_alert', description: 'Acknowledge an alert', inputSchema: { type: 'object' as const, properties: { alert_id: { type: 'string' }, note: { type: 'string' } }, required: ['alert_id'] } },