Skip to main content
Glama

get_matrix_row

Retrieve all topics for a specific date from the revenue tracking matrix to access complete daily data for business management.

Instructions

Get all topics for a specific date. Returns complete row from Matrix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (defaults to today)

Implementation Reference

  • index.js:441-453 (registration)
    Registration of the 'get_matrix_row' tool in the ListTools response, including name, description, and input schema.
    {
      name: "get_matrix_row",
      description: "Get all topics for a specific date. Returns complete row from Matrix.",
      inputSchema: {
        type: "object",
        properties: {
          date: {
            type: "string",
            description: "Date in YYYY-MM-DD format (defaults to today)"
          }
        }
      }
    },
  • Input schema definition for the 'get_matrix_row' tool, specifying optional 'date' parameter.
    inputSchema: {
      type: "object",
      properties: {
        date: {
          type: "string",
          description: "Date in YYYY-MM-DD format (defaults to today)"
        }
      }
    }
  • Tool handler that delegates execution to the external API via callAPI('getMatrixRow', args).
    case "get_matrix_row":
      result = await callAPI("getMatrixRow", args);
      break;
  • Helper function callAPI used by all tools (including get_matrix_row) to proxy requests to the Google Apps Script backend at the specified API_URL.
    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;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it returns a complete row, lacking details on permissions, rate limits, error handling, or what 'complete row' entails (e.g., data format, size). It mentions the return but doesn't disclose behavioral traits beyond the basic operation.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that are front-loaded and efficient, stating purpose and return value without waste. Every sentence earns its place, though it could be slightly more structured for clarity.

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

Completeness2/5

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

Given no annotations, no output schema, and a single parameter with full schema coverage, the description is incomplete. It doesn't explain return values (e.g., what 'complete row' includes), error cases, or usage context, leaving gaps for a tool that retrieves data from a matrix.

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%, with the parameter 'date' fully documented in the schema. The description adds no additional meaning beyond implying date filtering, so it meets the baseline of 3 without compensating or enhancing parameter understanding.

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

Purpose4/5

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

The description clearly states the action ('Get') and resource ('all topics for a specific date'), specifying it returns a complete row from the Matrix. It distinguishes from siblings like 'query_matrix' or 'matrix_daily_summary' by focusing on row retrieval by date, but doesn't explicitly contrast them.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'query_matrix' or 'matrix_daily_summary', which might offer similar or overlapping functionality. The description implies usage for date-specific row retrieval but lacks explicit when/when-not instructions or sibling comparisons.

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