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;
      }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by describing the two-step confirmation process and the restriction on header rows, which are critical behavioral traits. However, it lacks details on error handling, permissions needed, or what the preview shows, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action, followed by essential details in two concise sentences. Every sentence adds value: the first explains the action and confirmation requirement, the second clarifies the process and restrictions, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description does a good job covering key aspects like the confirmation flow and restrictions. However, it lacks information on return values, error cases, or side effects, which would enhance completeness for such a critical operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds context about the confirmation process and header row restriction, which relates to parameters but doesn't provide additional semantic details beyond what's in the schema. This meets the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Delete rows from Knowledge Matrix') and distinguishes it from siblings by specifying the resource ('Knowledge Matrix'), which is unique among the listed tools. It also mentions the confirmation requirement, adding specificity beyond just the verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides usage guidance: it explains the two-step process (first call for preview, second with confirm=true for execution) and includes a restriction ('Cannot delete header rows (1-2)'). This gives clear instructions on when and how to use the tool effectively.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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