jira_add_watcher
Add a user as a watcher to a Jira issue to keep them informed about updates and changes.
Instructions
Add a watcher to a Jira issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The Jira issue key | |
| username | Yes | Username to add as watcher |
Implementation Reference
- src/index.ts:1103-1114 (handler)Handler case for jira_add_watcher tool that parses arguments, calls jiraClient.addWatcher, and returns success messagecase "jira_add_watcher": { const { issueKey, username } = AddWatcherSchema.parse(args); await jiraClient.addWatcher(issueKey, username); return { content: [ { type: "text", text: `Added ${username} as watcher to ${issueKey}`, }, ], }; }
- src/jira-client.ts:206-211 (helper)Core implementation of adding a watcher to a Jira issue via POST to /issue/{issueKey}/watchers endpointasync addWatcher(issueKey: string, username: string): Promise<void> { await this.request<void>(`/issue/${issueKey}/watchers`, { method: "POST", body: JSON.stringify(username), }); }
- src/index.ts:116-119 (schema)Zod input schema for validating jira_add_watcher tool parametersconst AddWatcherSchema = z.object({ issueKey: z.string().describe("The Jira issue key"), username: z.string().describe("Username to add as watcher"), });
- src/index.ts:426-439 (registration)Tool registration in ListTools response including name, description, and JSON input schemaname: "jira_add_watcher", description: "Add a watcher to a Jira issue", inputSchema: { type: "object", properties: { issueKey: { type: "string", description: "The Jira issue key" }, username: { type: "string", description: "Username to add as watcher", }, }, required: ["issueKey", "username"], }, },