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;
    }
Behavior2/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. It states this is a 'Get' operation which implies read-only behavior, but doesn't specify authentication requirements, rate limits, error conditions, or what format the workflow information returns. For a tool with 3 required parameters and no output schema, this leaves significant behavioral gaps.

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 is appropriately concise with a single sentence that gets straight to the point. The bracketed '[Project Management]' provides helpful domain context upfront. There's no wasted verbiage or unnecessary elaboration.

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 tool has 3 required parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what 'workflow information' includes, how it's structured, or what the agent can expect to receive. For a tool that presumably returns complex workflow data, more context about the return value would be helpful.

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 schema description coverage is 100%, with all three parameters (organizationId, projectId, workItemTypeId) well-documented in the schema. The description adds no additional parameter information beyond what's already in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

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 clearly states the action ('Get workflow information') and target resource ('for a specific work item type'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'get_work_item_type' or 'get_work_item_type_field_config', which also retrieve work item type information but focus on different aspects.

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. There's no mention of prerequisites, when this tool is appropriate versus other work item type tools, or any contextual limitations. The bracketed '[Project Management]' provides domain context but no usage guidance.

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