matrix_daily_summary
Generate formatted daily summaries of Matrix entries by parsing timestamps, bug UIDs, and time spent data. Creates human-readable reports for revenue tracking and business management.
Instructions
Generate formatted summary of Matrix entries for a specific date. Automatically parses timestamps, bug UIDs, time spent, and generates human-readable output.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date in YYYY-MM-DD format (defaults to today) | |
| format | No | Output format |
Implementation Reference
- index.js:719-721 (handler)Handler for matrix_daily_summary tool call. Dispatches to external Google Apps Script API via callAPI function with action 'matrixDailySummary' and tool arguments.case "matrix_daily_summary": result = await callAPI("matrixDailySummary", args); break;
- index.js:502-515 (schema)Input schema defining parameters for matrix_daily_summary: optional date (YYYY-MM-DD) and format (bullet, prose, slack).inputSchema: { type: "object", properties: { date: { type: "string", description: "Date in YYYY-MM-DD format (defaults to today)" }, format: { type: "string", description: "Output format", enum: ["bullet", "prose", "slack"] } } }
- index.js:499-516 (registration)Registration of the matrix_daily_summary tool in the ListToolsRequestHandler response, including name, description, and input schema.{ name: "matrix_daily_summary", description: "Generate formatted summary of Matrix entries for a specific date. Automatically parses timestamps, bug UIDs, time spent, and generates human-readable output.", inputSchema: { type: "object", properties: { date: { type: "string", description: "Date in YYYY-MM-DD format (defaults to today)" }, format: { type: "string", description: "Output format", enum: ["bullet", "prose", "slack"] } } } },
- index.js:74-131 (helper)callAPI helper function that all proxied tools (including matrix_daily_summary) use to POST requests to the Google Apps Script backend URL with the action name and arguments as form data.async function callAPI(action, data = {}) { debugLog('=== API CALL START ==='); debugLog(`Action: ${action}`); debugLog(`Data: ${JSON.stringify(data)}`); try { // Build form-encoded body for POST const formData = new URLSearchParams(); formData.append('action', action); // Add all data fields to form for (const [key, value] of Object.entries(data)) { if (value !== undefined && value !== null) { formData.append(key, value.toString()); } } const formString = formData.toString(); debugLog(`FormData: ${formString}`); debugLog(`API_URL: ${API_URL}`); // Use POST with proper content type const response = await fetch(API_URL, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: formString }); debugLog(`Response status: ${response.status}`); debugLog(`Response ok: ${response.ok}`); if (!response.ok) { debugLog(`Response not OK: ${response.status} ${response.statusText}`); throw new Error(`API request failed: ${response.status} ${response.statusText}`); } const text = await response.text(); debugLog(`Response text length: ${text.length}`); debugLog(`Response text: ${text}`); if (!text) { debugLog('ERROR: Empty response from API'); throw new Error('Empty response from API'); } const parsed = JSON.parse(text); debugLog(`Parsed successfully: ${JSON.stringify(parsed)}`); debugLog('=== API CALL END ==='); return parsed; } catch (error) { debugLog(`ERROR in callAPI: ${error.message}`); debugLog(`ERROR stack: ${error.stack}`); throw error; } }