Skip to content

Commit 6177294

Browse files
authored
fix: remove default value for format in work item field configuration (#1170)
This pull request makes a minor adjustment to the schema definition for work item fields in `src/tools/work-items.ts`. The default value for the `format` property has been removed, so it is now truly optional and will not default to "Markdown" if not specified. ## GitHub issue number #1166 ## **Associated Risks** None ## ✅ **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?** manual testing
1 parent a607959 commit 6177294

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/tools/work-items.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ function configureWorkItemTools(server: McpServer, tokenProvider: () => Promise<
877877
z.object({
878878
name: z.string().describe("The name of the field, e.g., 'System.Title'."),
879879
value: z.string().describe("The value of the field."),
880-
format: z.enum(["Html", "Markdown"]).optional().default("Markdown").describe("the format of the field value, e.g., 'Html', 'Markdown'. Optional, defaults to 'Markdown'."),
880+
format: z.enum(["Html", "Markdown"]).optional().describe("the format of the field value, e.g., 'Html', 'Markdown'. Optional, defaults to 'Markdown'."),
881881
})
882882
)
883883
.describe("A record of field names and values to set on the new work item. Each fild is the field name and each value is the corresponding value to set for that field."),
@@ -1030,7 +1030,6 @@ function configureWorkItemTools(server: McpServer, tokenProvider: () => Promise<
10301030
format: z
10311031
.enum(["Html", "Markdown"])
10321032
.optional()
1033-
.default("Markdown")
10341033
.describe("The format of the field value. Only to be used for large text fields. e.g., 'Html', 'Markdown'. Optional, defaults to 'Markdown'."),
10351034
})
10361035
)

0 commit comments

Comments
 (0)