Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

get_work_item_workflow

Retrieve workflow details for a specific work item type in Alibaba Cloud DevOps projects to understand process stages and transitions.

Instructions

[Project Management] Get workflow information for a specific work item type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYes企业ID,可在组织管理后台的基本信息页面获取
projectIdYes项目唯一标识
workItemTypeIdYes工作项类型ID

Implementation Reference

  • Tool handler case that parses arguments using the schema, calls the getWorkItemWorkflowFunc helper, and returns the workflow as JSON.
    case "get_work_item_workflow": { const args = types.GetWorkItemWorkflowSchema.parse(request.params.arguments); const workflow = await workitem.getWorkItemWorkflowFunc( args.organizationId, args.projectId, args.workItemTypeId ); return { content: [{ type: "text", text: JSON.stringify(workflow, null, 2) }], }; }
  • Zod schema definition for input parameters: organizationId, projectId, workItemTypeId.
    export const GetWorkItemWorkflowSchema = z.object({ organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"), projectId: z.string().describe("项目唯一标识"), workItemTypeId: z.string().describe("工作项类型ID"), });
  • Tool registration entry defining name, description, and input schema.
    { name: "get_work_item_workflow", description: "[Project Management] Get workflow information for a specific work item type", inputSchema: zodToJsonSchema(types.GetWorkItemWorkflowSchema), },
  • Core helper function that makes API request to retrieve work item workflow and handles response parsing.
    export async function getWorkItemWorkflowFunc( organizationId: string, projectId: string, workItemTypeId: string ): Promise<WorkItemWorkflow> { const url = `/oapi/v1/projex/organizations/${organizationId}/projects/${projectId}/workitemTypes/${workItemTypeId}/workflows`; const response = await yunxiaoRequest(url, { method: "GET", }); // 如果响应中包含result字段,则返回result中的数据 if (response && typeof response === 'object' && 'result' in response) { return response.result as WorkItemWorkflow; } // 否则直接返回响应 return response as WorkItemWorkflow; }

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