Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

create_work_item

Create a work item in Alibaba Cloud DevOps to track tasks, assign team members, and manage project progress with custom fields and labels.

Instructions

[Project Management] Create a work item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID
spaceIdYesSpace ID, project unique identifier
subjectYesWork item title
workitemTypeIdYesWork item type ID
assignedToYesAssignee user ID
customFieldValuesNoCustom field values
descriptionNoWork item description
labelsNoAssociated label IDs
parentIdNoParent work item ID
participantsNoParticipant user IDs
sprintNoAssociated sprint ID
trackersNoCC user IDs
verifierNoVerifier user ID
versionsNoAssociated version IDs

Implementation Reference

  • MCP tool handler implementation that parses input arguments using CreateWorkItemSchema and delegates to the createWorkItemFunc helper function.
    case "create_work_item": { const args = types.CreateWorkItemSchema.parse(request.params.arguments); const workItemInfo = await workitem.createWorkItemFunc(args.organizationId, args.assignedTo, args.spaceId, args.subject, args.workitemTypeId, args.customFieldValues, args.description, args.labels, args.parentId, args.participants, args.sprint, args.trackers, args.verifier, args.versions); return { content: [{ type: "text", text: JSON.stringify(workItemInfo, null, 2) }], }; }
  • Tool registration entry defining the name, description, and input schema for the create_work_item tool.
    { name: "create_work_item", description: "[Project Management] Create a work item", inputSchema: zodToJsonSchema(types.CreateWorkItemSchema), },
  • Zod schema defining the input parameters and validation for creating a work item.
    export const CreateWorkItemSchema = z.object({ organizationId: z.string().describe("Organization ID"), spaceId: z.string().describe("Space ID, project unique identifier"), subject: z.string().describe("Work item title"), workitemTypeId: z.string().describe("Work item type ID"), assignedTo: z.string().describe("Assignee user ID"), customFieldValues: z.record(z.string()).optional().describe("Custom field values"), description: z.string().optional().describe("Work item description"), labels: z.array(z.string()).optional().describe("Associated label IDs"), parentId: z.string().optional().describe("Parent work item ID"), participants: z.array(z.string()).optional().describe("Participant user IDs"), sprint: z.string().optional().describe("Associated sprint ID"), trackers: z.array(z.string()).optional().describe("CC user IDs"), verifier: z.string().optional().describe("Verifier user ID"), versions: z.array(z.string()).optional().describe("Associated version IDs") });
  • Core helper function that constructs the API payload and makes a POST request to the Yunxiao API endpoint to create the work item.
    export async function createWorkItemFunc( organizationId: string, assignedTo: string, spaceId: string, subject: string, workitemTypeId: string, customFieldValues?: RecordType<string, string> | undefined, description?: string | undefined, labels?: string[], parentId?: string | undefined, participants?: string[] | undefined, sprint?: string | undefined, trackers?: string[] | undefined, verifier?: string | undefined, versions?: string[] | undefined ): Promise<z.infer<typeof WorkItemSchema>> { const url = `/oapi/v1/projex/organizations/${organizationId}/workitems`; const payload: Record<string, any> = { assignedTo, spaceId, subject, workitemTypeId }; if (customFieldValues) { payload.customFieldValues = customFieldValues; } if (description !== undefined) { payload.description = description; } if (labels && labels.length > 0) { payload.labels = labels; } if (parentId !== undefined) { payload.parentId = parentId; } if (participants && participants.length > 0) { payload.participants = participants; } if (sprint !== undefined) { payload.sprint = sprint; } if (trackers && trackers.length > 0) { payload.trackers = trackers; } if (verifier !== undefined) { payload.verifier = verifier; } if (versions && versions.length > 0) { payload.versions = versions; } const response = await yunxiaoRequest(url, { method: "POST", body: payload, }); return WorkItemSchema.parse(response); }

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/aliyun/alibabacloud-devops-mcp-server'

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