You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add WIQL query tool and update documentation for work items (#1118)
This pull request introduces a new tool for executing WIQL (Work Item
Query Language) queries against Azure DevOps work items, along with
comprehensive documentation and test coverage. The main changes are the
addition of the `wit_query_by_wiql` tool, updates to documentation, and
new tests to ensure correct behavior and error handling.
## GitHub issue number
N/A
## **Associated Risks**
Poorly created WIQL could have an effect on rate limits
## ✅ **PR Checklist**
- [x] **I have read the [contribution
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)**
- [x] **I have read the [code of conduct
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)**
- [x] Title of the pull request is clear and informative.
- [x] 👌 Code hygiene
- [x] 🔭 Telemetry added, updated, or N/A
- [x] 📄 Documentation added, updated, or N/A
- [x] 🛡️ Automated tests added, or N/A
## 🧪 **How did you test it?**
ran several manual tests and generated auto tests
Download a work item attachment by its ID and return the content as a base64-encoded resource. Useful for viewing images (e.g. screenshots) attached to work items such as bugs.
"Execute a WIQL (Work Item Query Language) query and return the matching work items. If a project is not specified, you will be prompted to select one.",
1276
+
{
1277
+
wiql: z.string().max(32768).describe('The WIQL query string to execute, e.g., "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.TeamProject] = @project"'),
1278
+
project: z.string().optional().describe("The name or ID of the Azure DevOps project. Reuse from prior context if already known. If not provided, a project selection prompt will be shown."),
1279
+
team: z.string().optional().describe("The name or ID of the Azure DevOps team. If not provided, the default team context will be used."),
1280
+
timePrecision: z.boolean().optional().describe("Whether to include time precision in date fields. Defaults to false."),
1281
+
top: z.coerce.number().default(50).describe("The maximum number of results to return. Defaults to 50."),
1282
+
},
1283
+
async({ wiql, project, team, timePrecision, top })=>{
1284
+
try{
1285
+
constconnection=awaitconnectionProvider();
1286
+
letresolvedProject=project;
1287
+
1288
+
if(!resolvedProject){
1289
+
constresult=awaitelicitProject(server,connection,"Select the Azure DevOps project to run the WIQL query against.");
"Download a work item attachment by its ID and return the content as a base64-encoded resource. Useful for viewing images (e.g. screenshots) attached to work items such as bugs.",
0 commit comments