Skip to main content
Glama

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
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (defaults to today)
formatNoOutput format

Implementation Reference

  • 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;
  • 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"]
          }
        }
      }
    },
  • 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;
      }
    }

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/PromptishOperations/mcpSpec'

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