Skip to main content
Glama

get_work_item_fields

Retrieve all work item fields and their metadata from Azure DevOps projects to enable accurate field updates and data management.

Instructions

Get all work item fields available in a project with metadata for smart field updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.

Implementation Reference

  • The core handler function that retrieves all work item fields for a given project using the Azure DevOps Work Item Tracking client, formats them into structured dictionaries with metadata like name, reference name, type, description, read-only status, and sortability.
    def get_work_item_fields(self, project): """ Get all work item fields available in a project. """ fields = self.work_item_tracking_client.get_fields(project=project) return [ { "name": field.name, "reference_name": field.reference_name, "type": getattr(field, 'type', None), "description": getattr(field, 'description', None), "read_only": getattr(field, 'read_only', False), "can_sort_by": getattr(field, 'can_sort_by', False) } for field in fields ]
  • The tool registration in the MCP server, defining the tool name, description, and input schema requiring a 'project' parameter.
    types.Tool( name="get_work_item_fields", description="Get all work item fields available in a project with metadata for smart field updates.", inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, }, "required": ["project"], "additionalProperties": False } ),
  • Dispatch helper in the MCP server's _execute_tool method that calls the client handler with unpacked arguments when the tool name matches.
    elif name == "get_work_item_fields": return self.client.get_work_item_fields(**arguments)
  • Input schema definition for the tool, specifying an object with a required 'project' string property.
    inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, }, "required": ["project"], "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