Skip to main content
Glama

get_work_item_transitions

Retrieve valid state transitions for Azure DevOps work items to maintain proper workflow compliance when moving between statuses.

Instructions

Get valid state transitions for a work item type from a specific state to ensure proper workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
work_item_typeYesThe work item type (e.g., 'Bug', 'User Story', 'Task').
from_stateYesThe current state to get valid transitions from.

Implementation Reference

  • The core handler function that retrieves valid state transitions for a work item type from a specific state using the Azure DevOps API.
    def get_work_item_transitions(self, project, work_item_type, from_state):
        """
        Get valid state transitions for a work item type from a specific state.
        """
        try:
            # This requires calling the process configuration API
            # which might not be directly available in the Python SDK
            # We'll use the work item type to get transition info
            work_item_type_obj = self.work_item_tracking_client.get_work_item_type(
                project=project,
                type=work_item_type
            )
            
            # Extract transition rules if available
            transitions = []
            if hasattr(work_item_type_obj, 'transitions') and work_item_type_obj.transitions:
                transitions = [
                    {
                        "to": getattr(transition, 'to', None),
                        "actions": getattr(transition, 'actions', [])
                    }
                    for transition in work_item_type_obj.transitions
                    if hasattr(transition, 'from') and getattr(transition, 'from', None) == from_state
                ]
            else:
                # Fallback: return all available states as potential transitions
                if hasattr(work_item_type_obj, 'states') and work_item_type_obj.states:
                    transitions = [
                        {
                            "to": state.name,
                            "actions": []
                        }
                        for state in work_item_type_obj.states
                        if state.name != from_state
                    ]
            
            return transitions
        except Exception as e:
            # Fallback: return empty transitions with error info
            return {"error": str(e), "transitions": []}
  • Input schema definition for the get_work_item_transitions tool, specifying required parameters: project, work_item_type, from_state.
    types.Tool(
        name="get_work_item_transitions",
        description="Get valid state transitions for a work item type from a specific state to ensure proper workflow.",
        inputSchema={
            "type": "object",
            "properties": {
                "project": {
                    "type": "string", 
                    "description": "The name or ID of the project."
                },
                "work_item_type": {
                    "type": "string", 
                    "description": "The work item type (e.g., 'Bug', 'User Story', 'Task')."
                },
                "from_state": {
                    "type": "string", 
                    "description": "The current state to get valid transitions from."
                },
            },
            "required": ["project", "work_item_type", "from_state"],
            "additionalProperties": False
        }
    ),
  • Registration and dispatch logic in the MCP server's _execute_tool method, which calls the client handler with unpacked arguments.
    elif name == "get_work_item_transitions":
        return self.client.get_work_item_transitions(**arguments)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes a read operation ('Get'), but doesn't mention permissions, rate limits, error handling, or the format of returned transitions. For a tool with no annotation coverage, this is a significant gap in transparency about how it behaves and what to expect.

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 a single, efficient sentence that front-loads the core purpose. There's no wasted language or redundancy, making it easy to parse quickly. It effectively communicates the essential information without 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 no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a list of states, transition rules), error conditions, or dependencies. For a tool with three required parameters and no structured output information, more context is needed to ensure proper usage and expectations.

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, with clear parameter definitions. The description adds minimal value beyond the schema, as it doesn't explain parameter relationships, provide examples, or clarify semantics like what 'valid' means in context. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't enhance understanding.

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's purpose: 'Get valid state transitions for a work item type from a specific state.' It specifies the verb ('Get'), resource ('valid state transitions'), and scope ('for a work item type from a specific state'). However, it doesn't explicitly differentiate from sibling tools like 'get_work_item_states' or 'get_work_item_types,' which reduces clarity about its unique role.

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 implies usage context with 'to ensure proper workflow,' suggesting it's used when planning or validating workflow steps. It doesn't provide explicit guidance on when to use this tool versus alternatives like 'get_work_item_states' or 'update_work_item,' nor does it specify prerequisites or exclusions. This leaves usage somewhat open to interpretation.

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/xrmghost/mcp-azure-devops'

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