Skip to main content
Glama

update_task

Modify task details like status, hours, and notes in the Revenue Engine MCP system to track progress and maintain accurate business management records.

Instructions

Update a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes
statusNo
actualHoursNo
notesNo

Implementation Reference

  • Handler for the 'update_task' MCP tool. Dispatches to the shared callAPI helper with action 'updateTask' and tool arguments.
    case "update_task":
      result = await callAPI("updateTask", args);
      break;
  • Input schema defining parameters for the 'update_task' tool: taskId (required), status, actualHours, notes.
    inputSchema: {
      type: "object",
      properties: {
        taskId: { type: "number" },
        status: { type: "string", enum: ["To Do", "In Progress", "Completed", "Blocked"] },
        actualHours: { type: "number" },
        notes: { type: "string" },
      },
      required: ["taskId"],
    },
  • index.js:288-301 (registration)
    Registration of the 'update_task' tool in the MCP server's tool list, including name, description, and schema.
    {
      name: "update_task",
      description: "Update a task",
      inputSchema: {
        type: "object",
        properties: {
          taskId: { type: "number" },
          status: { type: "string", enum: ["To Do", "In Progress", "Completed", "Blocked"] },
          actualHours: { type: "number" },
          notes: { type: "string" },
        },
        required: ["taskId"],
      },
    },
  • Shared helper function callAPI used by update_task (and other tools) to POST requests to the Google Apps Script backend API with the specified action and parameters.
    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;
      }
    }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Update a task' implies a mutation operation but reveals nothing about permissions required, whether changes are reversible, side effects, error handling, or response format. This is inadequate for a tool that modifies data.

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

Conciseness2/5

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

While concise with just three words, the description is under-specified rather than efficiently structured. It lacks front-loaded critical information and doesn't earn its place by adding value beyond the tool name, making it ineffective despite its brevity.

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

Completeness1/5

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

Given the tool's complexity (4 parameters, mutation operation), absence of annotations, and no output schema, the description is severely incomplete. It doesn't address key aspects like what the tool returns, error conditions, or practical usage details, leaving the agent ill-equipped to use it correctly.

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

Parameters1/5

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

Schema description coverage is 0%, meaning parameters are undocumented in the schema. The description adds no information about parameters—it doesn't mention 'taskId', 'status', 'actualHours', or 'notes', nor does it explain their purposes or constraints. This fails to compensate for the schema's lack of documentation.

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

Purpose2/5

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

The description 'Update a task' is a tautology that merely restates the tool name without adding specificity. It doesn't distinguish this tool from sibling tools like 'update_lead' or 'add_task', nor does it clarify what aspects of a task can be updated beyond what's implied by the name alone.

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

Usage Guidelines1/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. It doesn't mention prerequisites (e.g., needing an existing task ID), differentiate from sibling tools like 'add_task' or 'get_tasks', or specify appropriate contexts for task updates, leaving the agent without usage direction.

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