lexicon_monitor_refunds
Monitor refund rate and customer satisfaction signals for a specific vendor to identify trends and improve retention.
Instructions
Refund rate and customer satisfaction signal monitoring for a vendor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | Vendor name | |
| industry | No | Industry context |
Implementation Reference
- index.js:59-70 (registration)Registration (definition) of the 'lexicon_monitor_refunds' tool in the TOOLS array, including its name, description, and inputSchema (requires 'vendor', optional 'industry').
{ name: "lexicon_monitor_refunds", description: "Refund rate and customer satisfaction signal monitoring for a vendor.", inputSchema: { type: "object", properties: { vendor: { type: "string", description: "Vendor name" }, industry: { type: "string", description: "Industry context" }, }, required: ["vendor"], }, }, - index.js:85-92 (registration)Mapping from the local tool name 'lexicon_monitor_refunds' to the remote endpoint 'lexicon.monitor.refunds' in the TOOL_MAP object.
const TOOL_MAP = { lexicon_compare_vs: "lexicon.compare.vs", lexicon_compare_methodology: "lexicon.compare.methodology", lexicon_compare_topic: "lexicon.compare.topic", lexicon_monitor_outage: "lexicon.monitor.outage", lexicon_monitor_refunds: "lexicon.monitor.refunds", lexicon_feed: "lexicon.feed", }; - index.js:101-128 (handler)Generic CallToolRequestSchema handler that receives 'lexicon_monitor_refunds', looks up the remote tool name, forwards the request via fetch to the remote MCP endpoint, and returns the response.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; const remoteTool = TOOL_MAP[name]; if (!remoteTool) { return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true }; } const headers = { "Content-Type": "application/json" }; if (API_KEY) headers["X-API-Key"] = API_KEY; const response = await fetch(`${BASE_URL}/mcp/v1`, { method: "POST", headers, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: remoteTool, arguments: args }, }), }); const data = await response.json(); if (data.result) return data.result; return { content: [{ type: "text", text: JSON.stringify(data.error || data) }], isError: true, }; });