Skip to main content
Glama

get_work_item_states

Retrieve all valid states for a specific work item type in Azure DevOps to ensure accurate status tracking and updates.

Instructions

Get all possible states for a specific work item type to help with accurate status updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
work_item_typeYesThe work item type to get states for (e.g., 'Bug', 'User Story', 'Task').

Implementation Reference

  • Core handler implementing the get_work_item_states tool logic by fetching the work item type and extracting its states.
    def get_work_item_states(self, project, work_item_type): """ Get all possible states for a specific work item type. """ work_item_type_obj = self.work_item_tracking_client.get_work_item_type( project=project, type=work_item_type ) # Extract states from the work item type definition states = [] if hasattr(work_item_type_obj, 'states') and work_item_type_obj.states: states = [ { "name": state.name, "color": getattr(state, 'color', None), "category": getattr(state, 'category', None) } for state in work_item_type_obj.states ] return states
  • MCP server handler dispatching the tool call to the AzureDevOpsClient method.
    elif name == "get_work_item_states": return self.client.get_work_item_states(**arguments)
  • Tool registration including name, description, and input schema.
    types.Tool( name="get_work_item_states", description="Get all possible states for a specific work item type to help with accurate status updates.", 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 to get states for (e.g., 'Bug', 'User Story', 'Task')." }, }, "required": ["project", "work_item_type"], "additionalProperties": False } ),
  • Input schema definition for the get_work_item_states tool.
    types.Tool( name="get_work_item_states", description="Get all possible states for a specific work item type to help with accurate status updates.", 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 to get states for (e.g., 'Bug', 'User Story', 'Task')." }, }, "required": ["project", "work_item_type"], "additionalProperties": False } ),

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