Skip to main content
Glama
gabeosx

freedcamp

freedcamp_update_task

Modify existing Freedcamp tasks by updating title, description, priority, due date, assignee, or status. Supports bulk operations for multiple tasks.

Instructions

Update one or more existing tasks in Freedcamp including title, description, priority, due date, assignee, and status. Supports bulk operations for updating multiple tasks at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYes

Implementation Reference

  • The main tool handler function that processes a list of tasks to update, builds authentication parameters, calls the single task update helper for each, and returns formatted text results.
    async (args) => {
      const tasksToUpdate = args.tasks;
      const authParams = buildFreedcampAuthParams({
        api_key: config.apiKey,
        api_secret: config.apiSecret,
      });
    
      const results = await Promise.all(tasksToUpdate.map((taskArg: any) => processSingleUpdateTask(taskArg, authParams)));
      return { content: results.map(r => ({ type: "text", text: JSON.stringify(r) })) };
    }
  • Zod schema defining the input parameters for updating a single task. Referenced in the tool's inputSchema as an array for bulk support.
    const singleUpdateTaskSchema = z.object({
      task_id: z.string().describe("ID of the task to update (required) - must be valid existing Freedcamp task ID"),
      title: z.string().optional().describe("New task title (optional)"),
      description: z.string().optional().describe("New task description (optional)"),
      due_date: z.string().optional().describe("New due date as Unix timestamp string (optional) - e.g., '1735689600' for 2025-01-01"),
      assigned_to_id: z.string().optional().describe("User ID to reassign the task to (optional) - must be valid Freedcamp user ID"),
      priority: z.number().int().min(0).max(3).optional().describe("New task priority level (optional): 0=Low, 1=Normal, 2=High, 3=Urgent"),
      status: z.number().int().min(0).max(2).optional().describe("New task status (optional): 0=Open, 1=Completed, 2=Closed")
    });
  • Registration of the freedcamp_update_task tool in the MCP server, including description, input schema (bulk array), annotations, and handler function.
    server.registerTool("freedcamp_update_task",
      {
        description: "Update one or more existing tasks in Freedcamp including title, description, priority, due date, assignee, and status. Supports bulk operations for updating multiple tasks at once.",
        inputSchema: {
          tasks: z.array(singleUpdateTaskSchema)
        },
        annotations: {
          title: "Update Task"
        }
      },
      async (args) => {
        const tasksToUpdate = args.tasks;
        const authParams = buildFreedcampAuthParams({
          api_key: config.apiKey,
          api_secret: config.apiSecret,
        });
    
        const results = await Promise.all(tasksToUpdate.map((taskArg: any) => processSingleUpdateTask(taskArg, authParams)));
        return { content: results.map(r => ({ type: "text", text: JSON.stringify(r) })) };
      }
    );
  • Helper function that handles updating a single task: prepares data payload from args, makes POST request to Freedcamp edit endpoint, handles success/error responses.
    async function processSingleUpdateTask(taskArgs: z.infer<typeof singleUpdateTaskSchema>, authParams: Record<string, string>) {
      try {
        const data: Record<string, any> = {};
        if (taskArgs.title) data.title = taskArgs.title;
        if (taskArgs.description) data.description = taskArgs.description;
        if (taskArgs.due_date) data.due_date = taskArgs.due_date;
        if (taskArgs.assigned_to_id) data.assigned_to_id = taskArgs.assigned_to_id;
        if (typeof taskArgs.priority === "number") data.priority = taskArgs.priority;
        if (typeof taskArgs.status === "number") data.status = taskArgs.status;
    
        const url = `https://freedcamp.com/api/v1/tasks/${taskArgs.task_id}/edit`;
        const result = await executeFreedcampRequest(url, "POST", authParams, data);
    
        if (result.error) {
          return { type: "text", text: `Error updating task ID "${taskArgs.task_id}": ${result.error}`, task_id: taskArgs.task_id, details: result.details };
        }
        return { type: "text", text: `Task ID "${taskArgs.task_id}" updated.`, task_id: taskArgs.task_id, data: result.data };
      } catch (err: any) {
        console.error(`Error processing update for task ID "${taskArgs.task_id}":`, err);
        return { type: "text", text: `Failed to update task ID "${taskArgs.task_id}": ${err.message}`, task_id: taskArgs.task_id, error_details: err };
      }
    }
  • Utility function to execute HTTP requests to Freedcamp API using FormData for auth and body, handles DELETE specially, parses responses and errors.
    async function executeFreedcampRequest(url: string, method: string, authParams: Record<string, string>, bodyData?: Record<string, any>) {
      const form = new FormData();
      if (bodyData) {
        form.append("data", JSON.stringify(bodyData));
      }
      for (const [k, v] of Object.entries(authParams)) {
        form.append(k, v);
      }
    
      let requestUrl = url;
      let requestBody: any = form;
      if (method === "DELETE" && !bodyData) {
        const params = new URLSearchParams(authParams);
        requestUrl = `${url}?${params.toString()}`;
        requestBody = undefined;
      }
    
      console.log(`Making ${method} request to Freedcamp API: ${requestUrl}`);
    
      const resp = await fetch(requestUrl, {
        method: method,
        body: requestBody,
      });
      const json = (await resp.json()) as any;
      console.log("Freedcamp API response:", json);
    
      if (!resp.ok || (json && json.http_code >= 400)) {
        return { error: json?.msg || resp.statusText, details: json };
      }
      return { success: true, data: json?.data };
    }
Behavior2/5

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

Annotations only provide a title ('Update Task'), so the description carries the full burden. It mentions bulk operations but lacks details on permissions, rate limits, error handling, or what happens to unspecified fields (e.g., whether they remain unchanged). This is inadequate for a mutation tool with no 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.

Conciseness4/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 includes essential details like bulk support. It avoids redundancy but 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?

For a mutation tool with no annotations, 0% schema description coverage, and no output schema, the description is incomplete. It lacks behavioral context (e.g., side effects, auth needs), detailed parameter guidance, and output information, making it insufficient for safe and effective use.

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 0%, but the description lists key updatable fields (title, description, priority, due date, assignee, status), which adds meaning beyond the bare schema. However, it doesn't explain the 'tasks' array structure or parameter constraints, leaving gaps in documentation.

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 ('Update') and resource ('existing tasks in Freedcamp'), and lists specific fields that can be updated. It distinguishes itself from siblings by focusing on updates rather than adding, deleting, or listing tasks. However, it doesn't explicitly contrast with siblings beyond the core action.

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

Usage Guidelines3/5

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

The description implies usage for updating tasks, including bulk operations, but doesn't provide explicit guidance on when to use this tool versus alternatives like 'freedcamp_add_task' for new tasks or 'freedcamp_delete_task' for removal. No exclusions or prerequisites are mentioned.

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/gabeosx/freedmcpcamp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server