ee3d34f675451836fc7fd2ca8081c49f2da5570bsource_git · a016098tony/azure-devops-cli-mcp · current release
Observed 2026-08-25T18:54:45.032Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.
{
"tools": {
"listChanged": true
}
}| Tool | Category | Annotations | Risk |
|---|---|---|---|
az_devops執行 Azure DevOps CLI 命令(az 前綴由 server 自動加上,command 請勿包含)。允許的命令群組:devops、repos、boards、pipelines、artifacts。預設 organization 為 https://dev.azure.com/SKMHHIS、project 為 MS,repos pr 命令預設 repository 為 MS-Web(未指定時 server 會自動補上,通常不需要帶 --org/--project/--repository)。未指定 -o/--output 時自動使用 --output json。範例:"repos pr list --status active"、"boards work-item show --id 123"。不確定語法時,先用 az_devops_help 查詢。Input schema{
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "不含 \"az\" 前綴的命令,例如 \"repos pr list --status active\""
},
"timeout": {
"type": "number",
"description": "逾時秒數,預設 120"
}
},
"required": [
"command"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_devops_help查詢 Azure DevOps CLI 命令的官方說明(等同 az <command> --help)。在不確定子命令或參數語法時先用這個工具,再用 az_devops 執行。範例:command 傳 "boards work-item update" 會回傳該命令的完整參數說明。Input schema{
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "命令群組或子命令,不含 \"az\" 前綴,例如 \"repos pr create\""
}
},
"required": [
"command"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_git_fetch在主機端對本機 repo 執行 git fetch(唯讀網路操作,不動工作目錄)。典型情境:Cowork sandbox 內 git fetch 被 proxy 擋下(403)時,用此工具在主機端代跑;完成後 sandbox 內即可用本機 git 操作 origin/<branch>。不提供 push/pull 等寫入操作。Input schema{
"type": "object",
"properties": {
"repoPath": {
"type": "string",
"description": "本機 repo 的「主機端」絕對路徑(例如 D:\\mygithub\\MS-Web;sandbox 內看到的路徑可能與主機不同)"
},
"remote": {
"type": "string",
"description": "遠端名稱,預設 origin(只接受 remote 名稱,不接受 URL)"
},
"refspec": {
"type": "string",
"description": "要 fetch 的分支或 refspec,例如 \"releases/s116/rc-092\";未指定時 fetch 該 remote 的全部分支"
},
"prune": {
"type": "boolean",
"description": "加 --prune,清除遠端已刪除分支的追蹤 ref"
},
"timeout": {
"type": "number",
"description": "逾時秒數,預設 120"
}
},
"required": [
"repoPath"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_git_ls_remote在主機端查詢本機 repo 的遠端 refs(git ls-remote,不下載物件)。適合在 fetch 前快速確認遠端分支是否存在,例如確認 releases/s116/rc-092 存在於 origin。Input schema{
"type": "object",
"properties": {
"repoPath": {
"type": "string",
"description": "本機 repo 的「主機端」絕對路徑(例如 D:\\mygithub\\MS-Web)"
},
"remote": {
"type": "string",
"description": "遠端名稱,預設 origin(只接受 remote 名稱,不接受 URL)"
},
"patterns": {
"type": "array",
"items": {
"type": "string"
},
"description": "ref 過濾,可給多個,符合任一者即列出,例如 [\"releases/s116/rc-092\", \"hotfix/*\"]"
},
"heads": {
"type": "boolean",
"description": "只列分支(--heads)"
},
"tags": {
"type": "boolean",
"description": "只列 tag(--tags)"
},
"timeout": {
"type": "number",
"description": "逾時秒數,預設 120"
}
},
"required": [
"repoPath"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_pr_changes以 REST API 取得 PR 的異動檔案清單(iteration changes)。未指定 iterationId 時自動使用最新 iteration,並在輸出開頭註明。預設 organization/project/repository 同 az_pr_show。Input schema{
"type": "object",
"properties": {
"prNumber": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "PR 編號"
},
"iterationId": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "指定 iteration,預設取最新"
},
"project": {
"type": "string",
"description": "覆寫預設 project(預設 MS)"
},
"repository": {
"type": "string",
"description": "覆寫預設 repository(預設 MS-Web)"
}
},
"required": [
"prNumber"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_pr_comment在 PR 上留言。未指定 threadId 時建立新的討論串(可用 filePath/line 錨定到檔案行);指定 threadId 時回覆該討論串(此時忽略 filePath/line/status)。預設 organization/project/repository 同 az_pr_show。Input schema{
"type": "object",
"properties": {
"prNumber": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "PR 編號"
},
"content": {
"type": "string",
"description": "留言內容(不可為空)"
},
"threadId": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "回覆既有討論串的 thread ID"
},
"filePath": {
"type": "string",
"description": "新討論串錨定的檔案路徑(自動補開頭的 /)"
},
"line": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "錨定的行號(需搭配 filePath)"
},
"status": {
"type": "string",
"enum": [
"active",
"closed",
"fixed",
"wontFix",
"pending"
],
"description": "新討論串的初始狀態,預設 active"
},
"project": {
"type": "string",
"description": "覆寫預設 project(預設 MS)"
},
"repository": {
"type": "string",
"description": "覆寫預設 repository(預設 MS-Web)"
}
},
"required": [
"prNumber",
"content"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_pr_show以 REST API 取得 PR 完整資訊(title、sourceRefName、targetRefName、status 等)。預設 organization 為 https://dev.azure.com/SKMHHIS、project 為 MS、repository 為 MS-Web。Input schema{
"type": "object",
"properties": {
"prNumber": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "PR 編號"
},
"project": {
"type": "string",
"description": "覆寫預設 project(預設 MS)"
},
"repository": {
"type": "string",
"description": "覆寫預設 repository(預設 MS-Web)"
}
},
"required": [
"prNumber"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_pr_workitems以 REST API 取得 PR 關聯的 work item 清單(id 與 url)。預設 organization/project/repository 同 az_pr_show。Input schema{
"type": "object",
"properties": {
"prNumber": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "PR 編號"
},
"project": {
"type": "string",
"description": "覆寫預設 project(預設 MS)"
},
"repository": {
"type": "string",
"description": "覆寫預設 repository(預設 MS-Web)"
}
},
"required": [
"prNumber"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_rest對 Azure DevOps 發送任意 REST 請求(GET/POST/PATCH)。優先使用專用工具(az_pr_show、az_pr_changes、az_pr_workitems、az_workitem_relations、az_pr_comment、az_workitem_update、az_workitem_attach);此工具僅供未涵蓋的端點使用。path 為 organization(https://dev.azure.com/SKMHHIS)之後的相對路徑,未帶 api-version 時自動補 7.1。Input schema{
"type": "object",
"properties": {
"method": {
"type": "string",
"enum": [
"GET",
"POST",
"PATCH"
],
"description": "HTTP method"
},
"path": {
"type": "string",
"description": "相對路徑,例如 \"MS/_apis/git/repositories/MS-Web/pullRequests/1/threads\""
},
"body": {
"type": "string",
"description": "JSON 字串(GET 不可帶)"
},
"contentType": {
"type": "string",
"description": "覆寫 Content-Type,預設自動判斷"
},
"timeout": {
"type": "number",
"description": "逾時秒數,預設 120"
}
},
"required": [
"method",
"path"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_workitem_attach將本機檔案上傳為 Azure DevOps work item 附件並建立連結(純文字與 binary 檔皆可,上限 100MB)。預設 organization 為 https://dev.azure.com/SKMHHIS、project 為 MS。認證優先使用 AZURE_DEVOPS_EXT_PAT 環境變數,否則使用 az login 的憑證。Input schema{
"type": "object",
"properties": {
"workItemId": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "目標 work item ID"
},
"filePath": {
"type": "string",
"description": "本機檔案的絕對路徑"
},
"comment": {
"type": "string",
"description": "附件備註,顯示在 work item 附件上"
},
"fileName": {
"type": "string",
"description": "覆寫附件顯示名稱,預設取 filePath 的檔名"
}
},
"required": [
"workItemId",
"filePath"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_workitem_relations以 REST API 取得 work item 的完整資訊含 relations($expand=relations),可用於檢查附件(AttachedFile 的 attributes.name)是否已存在。預設 organization 為 https://dev.azure.com/SKMHHIS。Input schema{
"type": "object",
"properties": {
"workItemId": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Work item ID"
}
},
"required": [
"workItemId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |
az_workitem_update以 REST API 更新 work item 欄位(json-patch 由 server 組裝,僅允許 /fields/*)。fields 的 key 為欄位參考名稱,例如 {"System.State": "Resolved"};historyComment 會寫入 System.History(等同在 Discussion 留言)。fields 與 historyComment 至少要提供一個。預設 organization 為 https://dev.azure.com/SKMHHIS。Input schema{
"type": "object",
"properties": {
"workItemId": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Work item ID"
},
"fields": {
"type": "object",
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
},
"description": "欄位參考名稱 → 新值,例如 {\"System.State\": \"Resolved\"}"
},
"historyComment": {
"type": "string",
"description": "寫入 System.History 的留言"
}
},
"required": [
"workItemId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
} | — | — · — | — |