Skip to main content
Glama
makeplane

Plane MCP Server

Official
by makeplane

create_worklog

Generate a new worklog entry for a specific issue in a project, detailing the work performed, duration, and other essential data to track and manage tasks effectively.

Instructions

Create a new worklog for an issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesThe uuid identifier of the issue to create worklog for
project_idYesThe uuid identifier of the project containing the issue
worklog_dataYesThe data for creating the worklog

Implementation Reference

  • The async handler function that executes the create_worklog tool by making a POST request to the Plane API with the provided worklog data.
    async ({ project_id, issue_id, worklog_data }) => {
      const response = await makePlaneRequest(
        "POST",
        `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/worklogs/`,
        worklog_data
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Zod schema definition for IssueWorkLog, used to validate the worklog_data input for the create_worklog tool.
    export const IssueWorkLog = z.object({
      issue_id: z.string().uuid(),
      description: z.string().optional(),
      logged_by_id: z.string().uuid(),
      duration: z.number().int().min(0).describe("The duration of the worklog in minutes"),
      created_at: z.string().datetime(),
      updated_at: z.string().datetime(),
      project_id: z.string().uuid(),
      workspace_id: z.string().uuid(),
    });
    
    export type IssueWorkLog = z.infer<typeof IssueWorkLog>;
  • Direct registration of the create_worklog tool on the MCP server within registerWorkLogTools, including inline schema and handler.
      "create_worklog",
      "Create a new worklog for an issue",
      {
        project_id: z.string().describe("The uuid identifier of the project containing the issue"),
        issue_id: z.string().describe("The uuid identifier of the issue to create worklog for"),
        worklog_data: IssueWorkLog.partial()
          .required({
            duration: true,
            description: true,
          })
          .describe("The data for creating the worklog"),
      },
      async ({ project_id, issue_id, worklog_data }) => {
        const response = await makePlaneRequest(
          "POST",
          `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/worklogs/`,
          worklog_data
        );
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      }
    );
  • Higher-level registration call that invokes registerWorkLogTools to set up the create_worklog tool among others.
    registerWorkLogTools(server);

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/makeplane/plane-mcp-server'

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