Skip to main content
Glama
rafaelfreba

mcp-azure-devops-server

by rafaelfreba

Atualizar work item

update_work_item

Update existing Azure DevOps work items: change fields like state, assignee, title, priority, sprint, or tags, and add discussion comments. Only specified fields are modified, leaving others unchanged.

Instructions

Atualiza campos de um work item existente do Azure DevOps Server e/ou registra um comentário na aba Discussion. Devolve o item já atualizado e a lista de campos alterados.

Use para mudar estado, responsável, título, descrição, prioridade, sprint, tags, campos customizados, ou apenas para deixar um comentário. Só envia os campos informados — os demais permanecem como estão. Esta operação ESCREVE no Azure DevOps e gera notificação para os envolvidos.

Parâmetros:

  • id (obrigatório): o número do work item.

  • Pelo menos um campo além do id precisa ser informado.

  • state: precisa ser um estado válido para o tipo e a transição precisa ser permitida pelo processo (ex.: em muitos processos não se vai de "New" direto para "Closed").

  • comment: vai para o histórico de discussão (System.History), em HTML.

  • tags: SUBSTITUI a lista inteira de tags (passe [] para limpar todas). Para alteração incremental use tagsToAdd e/ou tagsToRemove, que preservam as demais. Não combine "tags" com "tagsToAdd"/"tagsToRemove" na mesma chamada.

  • description e demais campos de texto longo: HTML, nunca Markdown nem CDATA.

  • additionalFields: outros campos por nome de referência.

Exemplos de pedidos que devem acionar esta tool:

  • "fecha o bug 1234"

  • "passa a tarefa 88 para Active e atribui ao Carlos"

  • "comenta no item 4521 que o deploy foi feito em produção"

  • "adiciona a tag regressao no bug 1234 sem mexer nas outras tags"

  • "move a US 890 para a sprint 13"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID numérico do work item, como aparece na interface web
tagsNoSubstitui a lista completa de tags. Passe [] para remover todas. Não combine com tagsToAdd/tagsToRemove.
stateNoNovo estado, respeitando o fluxo do tipo (ex.: "Active", "Resolved", "Closed"). Transições inválidas são recusadas pelo Azure DevOps.
titleNoNovo título.
commentNoComentário a registrar na aba Discussion do work item (campo System.History). Campos de texto longo no Azure DevOps são HTML — use <p>, <br>, <ul>. Não use blocos CDATA nem Markdown.
projectNoNome ou ID do projeto no Azure DevOps Server. Pode ser omitido se ADO_DEFAULT_PROJECT estiver configurado no servidor.
areaPathNoNovo area path.
priorityNoNova prioridade, de 1 (mais alta) a 4 (mais baixa).
tagsToAddNoTags a acrescentar, preservando as existentes.
assignedToNoNovo responsável: nome de exibição, e-mail ou DOMINIO\usuario.
descriptionNoNova descrição. Campos de texto longo no Azure DevOps são HTML — use <p>, <br>, <ul>. Não use blocos CDATA nem Markdown.
tagsToRemoveNoTags a remover, preservando as demais.
iterationPathNoNovo iteration path (sprint).
additionalFieldsNoOutros campos a atualizar, por nome de referência. Ex.: {"Custom.Sistema": "Portal", "Microsoft.VSTS.Common.Severity": "2 - High"}.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
workItemYes
updatedFieldsYesNomes de referência dos campos efetivamente enviados na atualização

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false), the description discloses that the operation writes to Azure DevOps and generates notifications to involved parties. It also clarifies that only provided fields are sent and others remain unchanged, that tag replacement is destructive while tagsToAdd/Remove are incremental, and that long text fields must be HTML – all valuable behavioral context beyond the annotations.

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 well-structured: it leads with the core function, then lists usage scenarios, then details parameters with specific constraints, and ends with illustrative example prompts. While long, every sentence adds value – there is no fluff or redundancy, and the most important behavioral notes (write + notification, partial update) appear early.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 14 parameters and complex behaviors, the description covers everything needed: required fields, the at-least-one-other-field rule, state transition constraints, tag handling, HTML formatting for long text, additionalFields usage, and example prompts. The output schema is present, so return format is defined externally; nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds significant meaning: it explains that tags replaces the entire list and [] clears it, warns against combining tags with tagsToAdd/tagsToRemove, specifies that comment goes to System.History in HTML, and describes additionalFields as reference-name key-value pairs. These details are not present in the schema alone and materially help the agent build correct calls.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise statement: it updates fields of an existing Azure DevOps work item and/or registers a comment in the Discussion tab, and returns the updated item plus a list of changed fields. It then lists concrete update targets (state, assignee, title, description, priority, sprint, tags, custom fields) and gives example user requests, making the tool's purpose unmistakable and clearly distinct from the read/create siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit use cases ('Use para mudar estado, responsável, título...') and provides five realistic user-phrase examples that should trigger this tool. It implies the tool is for existing items by saying 'work item existente', but it does not explicitly direct agents away from create_work_item for new items or mention when not to use it; however, the context is strong enough for correct routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.