Skip to main content
Glama

add_task

Create new tasks for revenue tracking and business management by specifying description, priority, due date, and related details.

Instructions

Add a new task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskDescriptionYes
priorityNo
dueDateNoYYYY-MM-DD
relatedToNo
estimatedHoursNo
notesNo

Implementation Reference

  • Handler for the 'add_task' tool. Executes by calling the external API endpoint 'addTask' with the provided arguments.
    case "add_task":
      result = await callAPI("addTask", args);
      break;
  • Input schema definition for the 'add_task' tool, specifying parameters like taskDescription (required), priority, dueDate, etc.
    inputSchema: {
      type: "object",
      properties: {
        taskDescription: { type: "string" },
        priority: { type: "string", enum: ["High", "Medium", "Low"] },
        dueDate: { type: "string", description: "YYYY-MM-DD" },
        relatedTo: { type: "string" },
        estimatedHours: { type: "number" },
        notes: { type: "string" },
      },
      required: ["taskDescription"],
    },
  • index.js:264-279 (registration)
    Registration of the 'add_task' tool in the ListTools response, including name, description, and input schema.
    {
      name: "add_task",
      description: "Add a new task",
      inputSchema: {
        type: "object",
        properties: {
          taskDescription: { type: "string" },
          priority: { type: "string", enum: ["High", "Medium", "Low"] },
          dueDate: { type: "string", description: "YYYY-MM-DD" },
          relatedTo: { type: "string" },
          estimatedHours: { type: "number" },
          notes: { type: "string" },
        },
        required: ["taskDescription"],
      },
    },
  • Shared helper function callAPI used by the add_task handler (and others) to proxy requests to the external Google Apps Script backend handling the actual 'addTask' logic.
    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?

With no annotations provided, the description carries full burden for behavioral disclosure but offers none. 'Add a new task' implies a write/mutation operation, but the description doesn't address permissions needed, whether the operation is idempotent, what happens on success/failure, or any rate limits. For a creation tool with zero annotation coverage, this is critically insufficient.

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 extremely concise at just three words with no wasted language. While this conciseness comes at the expense of completeness, the description itself is efficiently structured and front-loaded with the core action.

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 a 6-parameter creation tool with no annotations, no output schema, and only 17% schema description coverage, the description is completely inadequate. It provides no information about the tool's behavior, parameters, usage context, or expected outcomes. The agent would struggle to use this tool correctly based solely on this description.

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

Parameters2/5

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

Schema description coverage is only 17% (only 'dueDate' has a description), leaving 5 parameters undocumented in the schema. The description 'Add a new task' provides zero information about any parameters - it doesn't mention required fields like 'taskDescription', optional fields like 'priority' with its enum values, or what 'relatedTo' or 'estimatedHours' mean. The description fails to compensate for the low schema coverage.

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 'Add a new task' restates the tool name 'add_task' without providing additional specificity. While it indicates the verb ('add') and resource ('task'), it doesn't distinguish this from sibling tools like 'update_task' or clarify what kind of task system this operates within. This is essentially a tautological restatement of the name.

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. There's no mention of when to choose 'add_task' over 'update_task' or 'get_tasks', nor any context about prerequisites, appropriate scenarios, or exclusions. The agent receives zero usage direction from this description.

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