Skip to main content
Glama

delete_matrix_rows

Remove specific rows from the Knowledge Matrix in Revenue Engine MCP. Preview deletions first, then confirm to execute. Cannot delete header rows.

Instructions

Delete rows from Knowledge Matrix with confirmation requirement. First call shows preview, second call with confirm=true executes deletion. Cannot delete header rows (1-2).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startRowYesFirst row to delete (must be >= 3)
endRowYesLast row to delete (inclusive)
confirmNoSet to true to actually delete (first call without this shows preview)

Implementation Reference

  • The handler for the 'delete_matrix_rows' tool in the MCP server's switch statement. It proxies the tool execution to the Google Apps Script backend by calling callAPI('deleteMatrixRows', args).
    case "delete_matrix_rows": result = await callAPI("deleteMatrixRows", args); break;
  • index.js:477-498 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema definition.
    { name: "delete_matrix_rows", description: "Delete rows from Knowledge Matrix with confirmation requirement. First call shows preview, second call with confirm=true executes deletion. Cannot delete header rows (1-2).", inputSchema: { type: "object", properties: { startRow: { type: "number", description: "First row to delete (must be >= 3)" }, endRow: { type: "number", description: "Last row to delete (inclusive)" }, confirm: { type: "boolean", description: "Set to true to actually delete (first call without this shows preview)" } }, required: ["startRow", "endRow"] } },
  • Input schema validation for the delete_matrix_rows tool, defining parameters startRow, endRow, and optional confirm.
    inputSchema: { type: "object", properties: { startRow: { type: "number", description: "First row to delete (must be >= 3)" }, endRow: { type: "number", description: "Last row to delete (inclusive)" }, confirm: { type: "boolean", description: "Set to true to actually delete (first call without this shows preview)" } }, required: ["startRow", "endRow"] }
  • Shared helper function used by delete_matrix_rows and other tools to make HTTP POST requests to the Google Apps Script web app endpoint.
    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