Skip to main content
Glama
mrchris2000

MCP DevOps Plan Server

by mrchris2000

create_work_item

Create new work items in DevOps Plan systems by specifying title, description, type, application, and project to track development tasks.

Instructions

Creates a new work item in Plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentNoAn optional component name if any are available in the project, this is not required.
titleYesTitle of the work item
descriptionYesDescription of the work item
workItemTypeYesType of the work item from the list of available work item types
applicationYesName of the application
projectNameYesName of the project

Implementation Reference

  • The tool definition and handler logic for "create_work_item".
    server.tool(
        "create_work_item",
        "Creates a new work item in Plan",
        {
            component: z.string().optional().describe("An optional component name if any are available in the project, this is not required."),
            title: z.string().describe("Title of the work item"),
            description: z.string().describe("Description of the work item"),
            workItemType: z.string().describe("Type of the work item from the list of available work item types"),
            application: z.string().describe("Name of the application"),
            projectId: z.string().describe("ID of the project")
        },
        async ({component, title, description, workItemType, application, projectId }) => {
            try {
                if (!globalCookies) {
                    globalCookies = await getCookiesFromServer(serverURL);
                    if (!globalCookies) {
                        console.error("Failed to retrieve cookies from server.");
                        return { error: "Failed to retrieve cookies." };
                    }
                    console.log("Received Cookies:", globalCookies);
                } else {
                    console.log("Reusing Stored Cookies:", globalCookies);
                }
                let bodyJSON = JSON.parse(createWorkItemBody);
                if(component !== undefined){
                    // Use empty string if not provided
                    bodyJSON.fields[0].value = component || "";
                    bodyJSON.fields[0].valueAsList[0] = component || "";
                } 
                bodyJSON.fields[2].value = projectId;
                bodyJSON.fields[2].valueAsList[0] = projectId;
                bodyJSON.fields[4].value = title;
                bodyJSON.fields[4].valueAsList[0] = title;
                bodyJSON.fields[5].value = description;
                bodyJSON.fields[5].valueAsList[0] = description;
                bodyJSON.fields[6].value = workItemType;
                bodyJSON.fields[6].valueAsList[0] = workItemType;
                let body = JSON.stringify(bodyJSON);
    
                const response = await fetch(`${serverURL}/ccmweb/rest/repos/${teamspaceID}/databases/${application}/records/WorkItem/?operation=Commit&useDbid=false`, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                        'Accept': 'application/json',
                        'Authorization': `Basic ${personal_access_token_string}`,
                        'Cookie': globalCookies
                    },
                    body: body
                });
    
                const data = await response.json();
                if (data.viewURL) {
                    return {
                        content: [{ type: 'text', text: `Work item created successfully. View it at: ${serverURL}/#${data.viewURL}` }]
                    };
                } else {
                    throw new Error("Failed to create work item");
                }
            } catch (e) {
                return {
                    content: [{ type: 'text', text: `Error creating work item: ${e.message}` }]
                };
            }
        }
    );
  • The JSON template used for creating a work item.
    const createWorkItemBody = `
    {
      "dbId": "33554505",
      "displayName": "string",
      "entityDefName": "Project",
      "fields": [
          {
          "name": "Component",
          "value": "",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "REFERENCE",
          "valueAsList": [
            ""
          ],
          "messageText": "",
          "maxLength": 0
        },
        {
          "name": "dbid",
          "value": "33554505",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "DBID",
          "valueAsList": [
            "33554505"
          ],
          "messageText": "",
          "maxLength": 0
        },
        {
          "name": "Project",
          "value": "Devops Code",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "REFERENCE",
          "valueAsList": [
            "Devops Code"
          ],
          "messageText": "",
          "maxLength": 0
        },
        {
          "name": "record_type",
          "value": "WorkItem",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "RECORDTYPE",
          "valueAsList": [
            "WorkItem"
          ],
          "messageText": "",
          "maxLength": 30
        },
        {
          "name": "Title",
          "value": "Plan Item",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "SHORT_STRING",
          "valueAsList": [
            "Plan Item"
          ],
          "messageText": "",
          "maxLength": 254
        },
    	{
          "name": "Description",
          "value": "Plan Item",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "MULTILINE_STRING",
          "valueAsList": [
            "Plan Item"
          ],
          "messageText": "",
          "maxLength": 0
        },
        {
          "name": "WIType",
          "value": "Task",
          "valueStatus": "HAS_VALUE",
          "validationStatus": "_KNOWN_VALID",
          "requiredness": "READONLY",
          "requirednessForUser": "READONLY",
          "type": "SHORT_STRING",
          "valueAsList": [
            "Task"
          ],
          "messageText": "",
          "maxLength": 254
        }
      ],
      "legalActions": [
        {
          "actionName": "Submit",
          "formDefName": "Defect_Base_Submit"
        }
      ],
      "isEditable": true,
      "isDuplicate": true,
      "original": {
        "dbId": "33554524",
        "displayName": "string",
        "entityDefName": "Project",
        "viewURL": "string"
      },
      "isOriginal": true,
      "hasDuplicates": true,
      "errorMessage": "string",
      "duplicates": [
        {
          "child": {
            "dbId": "33554524",
            "displayName": "string",
            "entityDefName": "Project",
            "viewURL": "string"
          },
          "parent": {
            "dbId": "33554524",
            "displayName": "string",
            "entityDefName": "Project",
            "viewURL": "string"
          }
        }
      ],
      "viewURL": "string"
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states that it 'Creates' a work item. It fails to mention idempotency concerns, what constitutes success, whether the created item ID is returned (critical given no output schema exists), or required permissions.

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 consists of a single efficient sentence with no redundant or wasteful language. However, it is overly terse given the tool's complexity, sacrificing necessary behavioral and usage context for brevity.

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 6 parameters and no output schema or annotations, the description is insufficient. It omits critical context such as error handling (e.g., duplicate titles), the relationship between 'application' and 'projectName' parameters, and whether the operation is atomic.

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?

The input schema has 100% description coverage, adequately documenting all 6 parameters including optional vs. required status. The description adds no parameter-specific guidance (e.g., valid formats for 'workItemType'), but with complete schema coverage, it meets the baseline expectation.

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 states a specific verb ('Creates') and resource ('work item') and identifies the target system ('in Plan'). However, it does not explicitly differentiate from similar mutation siblings like 'update_work_item' or distinguish when to create vs. modify existing items.

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

Usage Guidelines2/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, nor does it mention prerequisites such as using 'get_available_workitem_types' or 'get_available_projects' to populate required parameters correctly.

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/mrchris2000/mcp-devops-plan'

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