Skip to main content
Glama
mrchris2000

MCP DevOps Plan Server

by mrchris2000

delete_work_item

Remove a work item from DevOps Plan systems by specifying its unique identifier and application name to maintain clean project records.

Instructions

Deletes a work item in Plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbidYesThe dbid field from the workitem to identify it, this is the first field returned for each workitem in the get_work_items tool.
applicationYesName of the application

Implementation Reference

  • The handler function that executes the DELETE request to remove a work item.
    async ({ dbid, application }) => {
        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); // Print cookies after receiving
            } else {
                console.log("Reusing Stored Cookies:", globalCookies); // Print when reusing stored cookies
            }
            const response = await fetch(`${serverURL}/ccmweb/rest/repos/${teamspaceID}/databases/${application}/records/WorkItem/${dbid}?actionName=Delete&useDbid=true`, {
                method: 'DELETE',
                headers: {
                    'Content-Type': 'application/json',
                    'Authorization': `Basic ${personal_access_token_string}`,
                    'Cookie': globalCookies
                }
            });
    
            if (response.ok) {
                return {
                    content: [{ type: 'text', text: `Work item ${dbid} deleted successfully` }]
                };
            } else {
                throw new Error("Failed to delete work item");
            }
        } catch (e) {
  • old-server.js:533-539 (registration)
    MCP tool registration for 'delete_work_item'.
    server.tool(
        "delete_work_item",
        "Deletes a work item in Plan",
        {
            dbid: z.string().describe("The dbid field from the workitem to identify it, this is the first field returned for each workitem in the get_work_items tool."),
            application: z.string().describe("Name of the application")
        },

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