Skip to main content
Glama
aliyun

Alibaba Cloud DMS MCP Server

Official
by aliyun

approveOrder

Approve, reject, or cancel approval workflows for database change orders in Alibaba Cloud Data Management Service.

Instructions

Approve or reject an order in DMS. The workflow_instance_id can be obtained from getOrderInfo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_instance_idYesApproval workflow ID, can be obtained from getOrderInfo API
approval_typeYesApproval action: AGREE (approve), CANCEL (cancel), REJECT (reject)
commentNoComment for the approval actionOrder approved via MCP

Implementation Reference

  • Handler function that executes the approveOrder tool logic. It takes workflow_instance_id, approval_type (AGREE/CANCEL/REJECT), and an optional comment, then calls the Alibaba Cloud DMS ApproveOrder API.
    async def approve_order(
            workflow_instance_id: int = Field(description="Approval workflow ID, can be obtained from getOrderInfo API"),
            approval_type: str = Field(description="Approval action: AGREE (approve), CANCEL (cancel), REJECT (reject)"),
            comment: Optional[str] = Field(default="Order approved via MCP", 
                                           description="Comment for the approval action")
    ) -> Dict[str, Any]:
        client = create_client()
        req = dms_enterprise_20181101_models.ApproveOrderRequest(
            workflow_instance_id=workflow_instance_id,
            approval_type=approval_type
        )
        if comment:
            req.comment = comment
        if mcp.state.real_login_uid:
            req.real_login_user_uid = mcp.state.real_login_uid
        try:
            resp = client.approve_order(req)
            return resp.body.to_map()
        except Exception as e:
            logger.error(f"Error in approve_order: {e}")
            raise
  • Registration of approveOrder tool in the configured DB toolset (when default_database_id is set). Maps the tool name 'approveOrder' to the approve_order handler function.
    self.mcp.tool(name="approveOrder",
                  description="Approve or reject an order in DMS. The workflow_instance_id can be obtained from getOrderInfo.",
                  annotations={"title": "审批工单", "readOnlyHint": False})(approve_order)
  • Registration of approveOrder tool in the full toolset (when no default_database_id is set). Same mapping to the approve_order handler function.
    self.mcp.tool(name="approveOrder",
                  description="Approve or reject an order in DMS. The workflow_instance_id can be obtained from getOrderInfo.",
                  annotations={"title": "审批工单", "readOnlyHint": False})(approve_order)
Behavior2/5

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

Annotations already indicate readOnlyHint=false, and the description confirms a mutating action. However, it adds no further behavioral context such as success/failure outcomes, idempotency, or permission requirements. Without annotations, the description would be insufficient.

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 with two sentences, the first stating the purpose and the second providing a useful hint. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple approval tool, the description covers the basics. However, it lacks any mention of return values or side effects, and the sibling submitOrderApproval might require differentiation. Given no output schema, more detail could help.

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 already describes all parameters with 100% coverage. The description adds only a single hint about the source of workflow_instance_id. Since baseline is 3 for high coverage, this is adequate but not additive.

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 tool approves or rejects an order in DMS, specifying the action and resource. It does not explicitly differentiate from the sibling tool 'submitOrderApproval', but the purpose is specific and unambiguous.

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

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a useful hint that workflow_instance_id comes from getOrderInfo, guiding usage. However, it offers no guidance on when to prefer this tool over alternatives like submitOrderApproval, and does not mention any conditions or prerequisites.

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-dms-mcp-server'

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