Skip to main content
Glama

write_matrix_entry

Add or update entries in a knowledge matrix for tracking bugs, features, testing results, decisions, documentation, and goals within revenue management workflows.

Instructions

Write or append entry to Knowledge Matrix. Topics: Bugs & Fixes, Features Added, Testing Results, Decisions & Direction, Documentation Updates, Next Session Goals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (defaults to today)
topicYesMatrix topic
contentYesEntry content with timestamp (e.g., '3:45pm CST 🐛 Fixed bug in addTask')

Implementation Reference

  • index.js:396-418 (registration)
    Registers the 'write_matrix_entry' tool in the MCP server's listTools response, including name, description, and input schema.
    {
      name: "write_matrix_entry",
      description: "Write or append entry to Knowledge Matrix. Topics: Bugs & Fixes, Features Added, Testing Results, Decisions & Direction, Documentation Updates, Next Session Goals",
      inputSchema: {
        type: "object",
        properties: {
          date: {
            type: "string",
            description: "Date in YYYY-MM-DD format (defaults to today)"
          },
          topic: {
            type: "string",
            description: "Matrix topic",
            enum: ["Bugs & Fixes", "Features Added", "Testing Results", "Decisions & Direction", "Documentation Updates", "Next Session Goals"]
          },
          content: {
            type: "string",
            description: "Entry content with timestamp (e.g., '3:45pm CST 🐛 Fixed bug in addTask')"
          }
        },
        required: ["topic", "content"]
      }
    },
  • Defines the input schema for the write_matrix_entry tool, specifying parameters for date, topic, and content.
    inputSchema: {
      type: "object",
      properties: {
        date: {
          type: "string",
          description: "Date in YYYY-MM-DD format (defaults to today)"
        },
        topic: {
          type: "string",
          description: "Matrix topic",
          enum: ["Bugs & Fixes", "Features Added", "Testing Results", "Decisions & Direction", "Documentation Updates", "Next Session Goals"]
        },
        content: {
          type: "string",
          description: "Entry content with timestamp (e.g., '3:45pm CST 🐛 Fixed bug in addTask')"
        }
      },
      required: ["topic", "content"]
    }
  • The handler for the write_matrix_entry tool within the CallToolRequestSchema switch statement. Forwards arguments to the external Google Apps Script API via callAPI.
    case "write_matrix_entry":
      result = await callAPI("writeMatrixEntry", args);
      break;
  • Generic helper function callAPI that handles all tool invocations by POSTing to the Google Apps Script web app URL with the action 'writeMatrixEntry' and tool 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;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Write or append entry' implying a mutation, but doesn't clarify permissions, whether it overwrites or appends, error handling, or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, efficient sentence that front-loads the core action and lists topics without unnecessary details. Every part earns its place, making it highly concise and well-structured.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits like side effects, error cases, or return values, and doesn't compensate for the absence of structured data, leaving significant gaps for an AI agent.

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 lists topics but doesn't add syntax or format details beyond what the schema provides, such as explaining the 'content' format further. Baseline 3 is appropriate when schema does the heavy lifting.

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 verb ('Write or append entry') and resource ('Knowledge Matrix'), and lists the specific topics covered, making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'write_file' or 'edit_file', which might also involve writing operations, leaving some ambiguity about when to choose this tool over others.

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?

The description provides no guidance on when to use this tool versus alternatives like 'write_file' or 'edit_file', nor does it mention prerequisites or exclusions. It lists topics but doesn't explain context for choosing this tool over others, leaving usage unclear.

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