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
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'metadata for smart field updates,' hinting at read-only behavior, but doesn't clarify permissions, rate limits, pagination, or response format. This is inadequate for a tool that likely returns structured data.

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 with zero waste. It front-loads the core purpose ('Get all work item fields') and adds value with the 'metadata for smart field updates' context, making it appropriately sized and structured.

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, no output schema, and a single parameter with full schema coverage, the description is incomplete. It lacks details on behavioral traits (e.g., read-only nature, error handling) and output expectations, which are crucial for an agent to use this tool effectively in a project context.

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?

Schema description coverage is 100%, so the schema fully documents the single parameter 'project.' The description adds no additional parameter details beyond implying the project context, which aligns with the schema. Baseline 3 is appropriate as the schema handles 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 all work item fields') and resource ('available in a project'), with a specific purpose ('with metadata for smart field updates'). It distinguishes from siblings like 'get_work_item' or 'get_work_item_types' by focusing on fields rather than items or types, though it doesn't explicitly name alternatives.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_work_item_types' or 'get_work_item_states', nor does it mention prerequisites such as needing project access. The context is implied (project-based), but explicit usage scenarios are missing.

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