Skip to main content
Glama

create_work_item

Create new work items like Epics, User Stories, Tasks, or Bugs in Azure DevOps projects, with support for linking related items to organize development work.

Instructions

Creates a new work item in Azure DevOps. Supports Epic, User Story, Task, Bug, and work item linking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
work_item_typeYesThe type of work item (e.g., 'Bug', 'User Story', 'Task', 'Epic').
titleYesThe title of the work item.
descriptionYesThe description of the work item.
relationsNoA list of relations to other work items.

Implementation Reference

  • MCP tool dispatch handler for 'create_work_item' that calls the client method and returns formatted result.
    elif name == "create_work_item":
        work_item = self.client.create_work_item(**arguments)
        return {
            "id": work_item.id,
            "url": work_item.url,
            "title": work_item.fields.get('System.Title', 'N/A')
        }
  • Input schema definition for the create_work_item tool, defining parameters and validation rules.
    types.Tool(
        name="create_work_item",
        description="Creates a new work item in Azure DevOps. Supports Epic, User Story, Task, Bug, and work item linking.",
        inputSchema={
            "type": "object",
            "properties": {
                "project": {
                    "type": "string", 
                    "description": "The name or ID of the project."
                },
                "work_item_type": {
                    "type": "string", 
                    "description": "The type of work item (e.g., 'Bug', 'User Story', 'Task', 'Epic')."
                },
                "title": {
                    "type": "string", 
                    "description": "The title of the work item."
                },
                "description": {
                    "type": "string", 
                    "description": "The description of the work item."
                },
                "relations": {
                    "type": "array",
                    "description": "A list of relations to other work items.",
                    "items": {
                        "type": "object",
                        "properties": {
                            "rel": {
                                "type": "string", 
                                "description": "The relation type (e.g., 'System.LinkTypes.Dependency-Forward')."
                            },
                            "url": {
                                "type": "string", 
                                "description": "The URL of the related work item."
                            }
                        },
                        "required": ["rel", "url"]
                    }
                }
            },
            "required": ["project", "work_item_type", "title", "description"],
            "additionalProperties": False
        }
    ),
  • MCP list_tools handler that registers and returns the list of tools including create_work_item.
    @self.server.list_tools()
    async def list_tools() -> List[types.Tool]:
        """Return the list of available tools."""
        logger.info(f"Tools requested - returning {len(self.tools)} tools")
        self.tools_registered = True
        return self.tools
  • Core helper method in AzureDevOpsClient that implements the work item creation using Azure DevOps SDK JsonPatchOperations.
    def create_work_item(self, project, work_item_type, title, description, relations=None):
        patch_document = [
            JsonPatchOperation(
                op="add",
                path="/fields/System.Title",
                value=title
            ),
            JsonPatchOperation(
                op="add",
                path="/fields/System.Description",
                value=description
            )
        ]
    
        if relations:
            for relation in relations:
                patch_document.append(
                    JsonPatchOperation(
                        op="add",
                        path="/relations/-",
                        value={
                            "rel": relation["rel"],
                            "url": relation["url"]
                        }
                    )
                )
        
        return self.work_item_tracking_client.create_work_item(
            document=patch_document,
            project=project,
            type=work_item_type
        )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool creates a new work item, which implies a write operation, but doesn't disclose behavioral traits like required permissions, whether creation is idempotent, error handling, or rate limits. The mention of 'work item linking' adds some context but is insufficient for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/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 and includes key features (supported types and linking). There's no wasted verbiage, though it could be slightly more structured (e.g., separating core action from features).

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?

Given the tool is a mutation operation (creation) with no annotations and no output schema, the description is moderately complete but has gaps. It covers what the tool does and key features, but lacks details on behavioral aspects like permissions, side effects, or response format, which are important for an agent to use it correctly in context with sibling tools.

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 already documents all 5 parameters thoroughly. The description adds minimal value beyond the schema by listing supported work item types (e.g., 'Epic', 'User Story') and mentioning linking, but doesn't provide additional syntax, format details, or usage examples. Baseline 3 is appropriate when the schema does 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 verb ('Creates') and resource ('new work item in Azure DevOps'), and specifies the supported work item types (Epic, User Story, Task, Bug). It distinguishes from siblings like 'update_work_item' by focusing on creation, but doesn't explicitly differentiate from other creation tools like 'create_wiki_page' beyond the domain context.

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 for creating work items in Azure DevOps, but doesn't provide explicit guidance on when to use this vs. alternatives like 'update_work_item' or 'create_wiki_page'. It mentions work item linking as a feature, which hints at use cases involving dependencies, but lacks clear when/when-not directives or prerequisite context.

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