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);
    }
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. It doesn't mention that this is a write/mutation operation (implied by 'Create'), what permissions are required, whether it's idempotent, what happens on failure, or what the response contains. For a 14-parameter creation tool with complex nested objects, this lack of behavioral context is severely inadequate.

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 - a single phrase with zero wasted words. It's front-loaded with the essential action and domain. While this conciseness comes at the cost of completeness, the structure itself is efficient and doesn't contain redundant or unnecessary information.

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?

Given the complexity (14 parameters, 5 required, nested objects) and absence of both annotations and output schema, the description is woefully incomplete. It doesn't help an agent understand what a work item is, when to create one, what behavioral constraints exist, or what to expect as output. For a creation tool in a system with many sibling tools, this minimal description fails to provide adequate context.

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 100%, so all 14 parameters are documented in the input schema. The description adds no parameter information beyond what's already in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 '[Project Management] Create a work item' is a tautology that essentially restates the tool name with minimal context. While it specifies the domain (Project Management) and action (Create), it doesn't explain what a 'work item' is or differentiate this tool from sibling creation tools like create_sprint, create_file, or create_effort_record. The purpose is vague beyond the basic verb-noun pairing.

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 zero guidance on when to use this tool versus alternatives. There are multiple sibling creation tools (e.g., create_sprint, create_file, create_change_request), but no indication of which scenarios warrant creating a work item specifically. No prerequisites, dependencies, or contextual triggers 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/aliyun/alibabacloud-devops-mcp-server'

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