@crypto512/jicon-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.env.example +9 -0
  2. package/.jicon.json.custom +21 -0
  3. package/.jicon.json.example +15 -0
  4. package/.jicon.json.readonly +15 -0
  5. package/CLAUDE.md +596 -0
  6. package/CONTRIBUTING.md +371 -0
  7. package/DEVELOPMENT.md +400 -0
  8. package/LICENSE +21 -0
  9. package/README.md +300 -0
  10. package/TOOL_LIST.md +435 -0
  11. package/dist/config/constants.d.ts +14 -0
  12. package/dist/config/constants.d.ts.map +1 -0
  13. package/dist/config/constants.js +18 -0
  14. package/dist/config/constants.js.map +1 -0
  15. package/dist/config/loader.d.ts +35 -0
  16. package/dist/config/loader.d.ts.map +1 -0
  17. package/dist/config/loader.js +108 -0
  18. package/dist/config/loader.js.map +1 -0
  19. package/dist/config/types.d.ts +130 -0
  20. package/dist/config/types.d.ts.map +1 -0
  21. package/dist/config/types.js +32 -0
  22. package/dist/config/types.js.map +1 -0
  23. package/dist/confluence/client.d.ts +30 -0
  24. package/dist/confluence/client.d.ts.map +1 -0
  25. package/dist/confluence/client.js +176 -0
  26. package/dist/confluence/client.js.map +1 -0
  27. package/dist/confluence/defaults.d.ts +23 -0
  28. package/dist/confluence/defaults.d.ts.map +1 -0
  29. package/dist/confluence/defaults.js +29 -0
  30. package/dist/confluence/defaults.js.map +1 -0
  31. package/dist/confluence/formatters.d.ts +22 -0
  32. package/dist/confluence/formatters.d.ts.map +1 -0
  33. package/dist/confluence/formatters.js +125 -0
  34. package/dist/confluence/formatters.js.map +1 -0
  35. package/dist/confluence/tools.d.ts +266 -0
  36. package/dist/confluence/tools.d.ts.map +1 -0
  37. package/dist/confluence/tools.js +376 -0
  38. package/dist/confluence/tools.js.map +1 -0
  39. package/dist/confluence/types.d.ts +122 -0
  40. package/dist/confluence/types.d.ts.map +1 -0
  41. package/dist/confluence/types.js +5 -0
  42. package/dist/confluence/types.js.map +1 -0
  43. package/dist/index.d.ts +6 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +161 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/jira/client.d.ts +46 -0
  48. package/dist/jira/client.d.ts.map +1 -0
  49. package/dist/jira/client.js +178 -0
  50. package/dist/jira/client.js.map +1 -0
  51. package/dist/jira/defaults.d.ts +19 -0
  52. package/dist/jira/defaults.d.ts.map +1 -0
  53. package/dist/jira/defaults.js +57 -0
  54. package/dist/jira/defaults.js.map +1 -0
  55. package/dist/jira/formatters.d.ts +22 -0
  56. package/dist/jira/formatters.d.ts.map +1 -0
  57. package/dist/jira/formatters.js +128 -0
  58. package/dist/jira/formatters.js.map +1 -0
  59. package/dist/jira/tools.d.ts +334 -0
  60. package/dist/jira/tools.d.ts.map +1 -0
  61. package/dist/jira/tools.js +372 -0
  62. package/dist/jira/tools.js.map +1 -0
  63. package/dist/jira/types.d.ts +110 -0
  64. package/dist/jira/types.d.ts.map +1 -0
  65. package/dist/jira/types.js +5 -0
  66. package/dist/jira/types.js.map +1 -0
  67. package/dist/permissions/filter.d.ts +30 -0
  68. package/dist/permissions/filter.d.ts.map +1 -0
  69. package/dist/permissions/filter.js +89 -0
  70. package/dist/permissions/filter.js.map +1 -0
  71. package/dist/permissions/tool-registry.d.ts +49 -0
  72. package/dist/permissions/tool-registry.d.ts.map +1 -0
  73. package/dist/permissions/tool-registry.js +111 -0
  74. package/dist/permissions/tool-registry.js.map +1 -0
  75. package/dist/tempo/client.d.ts +32 -0
  76. package/dist/tempo/client.d.ts.map +1 -0
  77. package/dist/tempo/client.js +125 -0
  78. package/dist/tempo/client.js.map +1 -0
  79. package/dist/tempo/formatters.d.ts +30 -0
  80. package/dist/tempo/formatters.d.ts.map +1 -0
  81. package/dist/tempo/formatters.js +172 -0
  82. package/dist/tempo/formatters.js.map +1 -0
  83. package/dist/tempo/tools.d.ts +184 -0
  84. package/dist/tempo/tools.d.ts.map +1 -0
  85. package/dist/tempo/tools.js +392 -0
  86. package/dist/tempo/tools.js.map +1 -0
  87. package/dist/tempo/types.d.ts +98 -0
  88. package/dist/tempo/types.d.ts.map +1 -0
  89. package/dist/tempo/types.js +5 -0
  90. package/dist/tempo/types.js.map +1 -0
  91. package/dist/types.d.ts +27 -0
  92. package/dist/types.d.ts.map +1 -0
  93. package/dist/types.js +6 -0
  94. package/dist/types.js.map +1 -0
  95. package/dist/utils/http-client.d.ts +22 -0
  96. package/dist/utils/http-client.d.ts.map +1 -0
  97. package/dist/utils/http-client.js +137 -0
  98. package/dist/utils/http-client.js.map +1 -0
  99. package/dist/utils/response-formatter.d.ts +8 -0
  100. package/dist/utils/response-formatter.d.ts.map +1 -0
  101. package/dist/utils/response-formatter.js +38 -0
  102. package/dist/utils/response-formatter.js.map +1 -0
  103. package/package.json +50 -0
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Tempo MCP Tools
3
+ */
4
+ import { z } from "zod";
5
+ import { TempoClient } from "./client.js";
6
+ import type { ToolResult } from "../types.js";
7
+ export declare function createTempoTools(client: TempoClient): {
8
+ tempo_get_worklogs: {
9
+ description: string;
10
+ inputSchema: z.ZodObject<{
11
+ dateFrom: z.ZodOptional<z.ZodString>;
12
+ dateTo: z.ZodOptional<z.ZodString>;
13
+ projectKey: z.ZodOptional<z.ZodString>;
14
+ issueKey: z.ZodOptional<z.ZodString>;
15
+ accountId: z.ZodOptional<z.ZodString>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ projectKey?: string | undefined;
18
+ issueKey?: string | undefined;
19
+ dateFrom?: string | undefined;
20
+ dateTo?: string | undefined;
21
+ accountId?: string | undefined;
22
+ }, {
23
+ projectKey?: string | undefined;
24
+ issueKey?: string | undefined;
25
+ dateFrom?: string | undefined;
26
+ dateTo?: string | undefined;
27
+ accountId?: string | undefined;
28
+ }>;
29
+ handler: (args: {
30
+ dateFrom?: string;
31
+ dateTo?: string;
32
+ projectKey?: string;
33
+ issueKey?: string;
34
+ accountId?: string;
35
+ }) => Promise<ToolResult>;
36
+ };
37
+ tempo_get_worklog: {
38
+ description: string;
39
+ inputSchema: z.ZodObject<{
40
+ worklogId: z.ZodNumber;
41
+ }, "strip", z.ZodTypeAny, {
42
+ worklogId: number;
43
+ }, {
44
+ worklogId: number;
45
+ }>;
46
+ handler: (args: {
47
+ worklogId: number;
48
+ }) => Promise<ToolResult>;
49
+ };
50
+ tempo_log_work: {
51
+ description: string;
52
+ inputSchema: z.ZodObject<{
53
+ issueKey: z.ZodString;
54
+ hours: z.ZodNumber;
55
+ date: z.ZodString;
56
+ description: z.ZodOptional<z.ZodString>;
57
+ startTime: z.ZodOptional<z.ZodString>;
58
+ remainingEstimateHours: z.ZodOptional<z.ZodNumber>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ issueKey: string;
61
+ hours: number;
62
+ date: string;
63
+ description?: string | undefined;
64
+ startTime?: string | undefined;
65
+ remainingEstimateHours?: number | undefined;
66
+ }, {
67
+ issueKey: string;
68
+ hours: number;
69
+ date: string;
70
+ description?: string | undefined;
71
+ startTime?: string | undefined;
72
+ remainingEstimateHours?: number | undefined;
73
+ }>;
74
+ handler: (args: {
75
+ issueKey: string;
76
+ hours: number;
77
+ date: string;
78
+ description?: string;
79
+ startTime?: string;
80
+ remainingEstimateHours?: number;
81
+ }) => Promise<ToolResult>;
82
+ };
83
+ tempo_update_worklog: {
84
+ description: string;
85
+ inputSchema: z.ZodObject<{
86
+ worklogId: z.ZodNumber;
87
+ hours: z.ZodOptional<z.ZodNumber>;
88
+ description: z.ZodOptional<z.ZodString>;
89
+ date: z.ZodOptional<z.ZodString>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ worklogId: number;
92
+ description?: string | undefined;
93
+ hours?: number | undefined;
94
+ date?: string | undefined;
95
+ }, {
96
+ worklogId: number;
97
+ description?: string | undefined;
98
+ hours?: number | undefined;
99
+ date?: string | undefined;
100
+ }>;
101
+ handler: (args: {
102
+ worklogId: number;
103
+ hours?: number;
104
+ description?: string;
105
+ date?: string;
106
+ }) => Promise<ToolResult>;
107
+ };
108
+ tempo_delete_worklog: {
109
+ description: string;
110
+ inputSchema: z.ZodObject<{
111
+ worklogId: z.ZodNumber;
112
+ }, "strip", z.ZodTypeAny, {
113
+ worklogId: number;
114
+ }, {
115
+ worklogId: number;
116
+ }>;
117
+ handler: (args: {
118
+ worklogId: number;
119
+ }) => Promise<ToolResult>;
120
+ };
121
+ tempo_get_accounts: {
122
+ description: string;
123
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
124
+ handler: () => Promise<ToolResult>;
125
+ };
126
+ tempo_get_account: {
127
+ description: string;
128
+ inputSchema: z.ZodObject<{
129
+ accountKey: z.ZodString;
130
+ }, "strip", z.ZodTypeAny, {
131
+ accountKey: string;
132
+ }, {
133
+ accountKey: string;
134
+ }>;
135
+ handler: (args: {
136
+ accountKey: string;
137
+ }) => Promise<ToolResult>;
138
+ };
139
+ tempo_get_teams: {
140
+ description: string;
141
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
142
+ handler: () => Promise<ToolResult>;
143
+ };
144
+ tempo_get_team: {
145
+ description: string;
146
+ inputSchema: z.ZodObject<{
147
+ teamId: z.ZodNumber;
148
+ }, "strip", z.ZodTypeAny, {
149
+ teamId: number;
150
+ }, {
151
+ teamId: number;
152
+ }>;
153
+ handler: (args: {
154
+ teamId: number;
155
+ }) => Promise<ToolResult>;
156
+ };
157
+ tempo_get_team_worklogs: {
158
+ description: string;
159
+ inputSchema: z.ZodObject<{
160
+ teamId: z.ZodNumber;
161
+ dateFrom: z.ZodString;
162
+ dateTo: z.ZodString;
163
+ }, "strip", z.ZodTypeAny, {
164
+ dateFrom: string;
165
+ dateTo: string;
166
+ teamId: number;
167
+ }, {
168
+ dateFrom: string;
169
+ dateTo: string;
170
+ teamId: number;
171
+ }>;
172
+ handler: (args: {
173
+ teamId: number;
174
+ dateFrom: string;
175
+ dateTo: string;
176
+ }) => Promise<ToolResult>;
177
+ };
178
+ tempo_get_user_info: {
179
+ description: string;
180
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
181
+ handler: () => Promise<ToolResult>;
182
+ };
183
+ };
184
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/tempo/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAc1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;wBAwDxB;YACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBA8BD;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;wBAwE3C;YACpB,QAAQ,EAAE,MAAM,CAAC;YACjB,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;wBAsCD;YACpB,SAAS,EAAE,MAAM,CAAC;YAClB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBAqCD;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;uBA4B9C,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBAwBhB;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;uBA+B/C,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;wBAwBhB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;wBAoCxC;YACpB,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,EAAE,MAAM,CAAC;SAChB,KAAG,OAAO,CAAC,UAAU,CAAC;;;;;uBA+BJ,OAAO,CAAC,UAAU,CAAC;;EAgB3C"}
@@ -0,0 +1,392 @@
1
+ /**
2
+ * Tempo MCP Tools
3
+ */
4
+ import { z } from "zod";
5
+ import { formatSuccess, formatError, isApiError, } from "../utils/response-formatter.js";
6
+ import { formatWorklog, formatWorklogSearchResults, formatAccount, formatAccounts, formatTeam, formatTeams, } from "./formatters.js";
7
+ export function createTempoTools(client) {
8
+ return {
9
+ tempo_get_worklogs: {
10
+ description: `Get time tracking worklogs from Tempo.
11
+
12
+ Top 10 Useful Examples:
13
+
14
+ 1. My worklogs for today:
15
+ dateFrom: "2025-11-07", dateTo: "2025-11-07"
16
+ (Leave accountId empty to get your own)
17
+
18
+ 2. My worklogs this week:
19
+ dateFrom: "2025-11-04", dateTo: "2025-11-10"
20
+
21
+ 3. My worklogs this month:
22
+ dateFrom: "2025-11-01", dateTo: "2025-11-30"
23
+
24
+ 4. Team member's worklogs:
25
+ dateFrom: "2025-11-01", dateTo: "2025-11-07", accountId: "user-account-id"
26
+
27
+ 5. All worklogs for a project:
28
+ dateFrom: "2025-11-01", dateTo: "2025-11-30", projectKey: "PROJ"
29
+
30
+ 6. Worklogs for specific issue:
31
+ issueKey: "PROJ-123"
32
+
33
+ 7. Last 7 days worklogs:
34
+ dateFrom: "2025-10-31", dateTo: "2025-11-07"
35
+
36
+ 8. Yesterday's worklogs:
37
+ dateFrom: "2025-11-06", dateTo: "2025-11-06"
38
+
39
+ 9. Last month worklogs:
40
+ dateFrom: "2025-10-01", dateTo: "2025-10-31"
41
+
42
+ 10. Specific date range for project:
43
+ dateFrom: "2025-11-01", dateTo: "2025-11-15", projectKey: "MESH"
44
+
45
+ Date Format: YYYY-MM-DD
46
+ Note: Use tempo_get_user_info first to get accountId if needed`,
47
+ inputSchema: z.object({
48
+ dateFrom: z.string().optional().describe("Start date (YYYY-MM-DD)"),
49
+ dateTo: z.string().optional().describe("End date (YYYY-MM-DD)"),
50
+ projectKey: z
51
+ .string()
52
+ .optional()
53
+ .describe("Filter by project key (e.g., PROJ)"),
54
+ issueKey: z
55
+ .string()
56
+ .optional()
57
+ .describe("Filter by issue key (e.g., PROJ-123)"),
58
+ accountId: z
59
+ .coerce.string()
60
+ .optional()
61
+ .describe("Filter by user account ID (accepts string or number)"),
62
+ }),
63
+ handler: async (args) => {
64
+ try {
65
+ const result = await client.getWorklogs(args.dateFrom, args.dateTo, args.projectKey, args.issueKey, args.accountId);
66
+ return {
67
+ content: [
68
+ {
69
+ type: "text",
70
+ text: formatWorklogSearchResults(result),
71
+ },
72
+ ],
73
+ };
74
+ }
75
+ catch (error) {
76
+ return formatError(isApiError(error) ? error : new Error(String(error)));
77
+ }
78
+ },
79
+ },
80
+ tempo_get_worklog: {
81
+ description: "Get detailed information about a specific worklog entry",
82
+ inputSchema: z.object({
83
+ worklogId: z.number().describe("Tempo worklog ID"),
84
+ }),
85
+ handler: async (args) => {
86
+ try {
87
+ const result = await client.getWorklog(args.worklogId);
88
+ return {
89
+ content: [
90
+ {
91
+ type: "text",
92
+ text: formatWorklog(result),
93
+ },
94
+ ],
95
+ };
96
+ }
97
+ catch (error) {
98
+ return formatError(isApiError(error) ? error : new Error(String(error)));
99
+ }
100
+ },
101
+ },
102
+ tempo_log_work: {
103
+ description: `Log time to a Jira issue in Tempo.
104
+
105
+ Top 10 Common Time Logging Scenarios:
106
+
107
+ 1. Log 8 hours today:
108
+ issueKey: "PROJ-123", hours: 8, date: "2025-11-07"
109
+
110
+ 2. Log 4 hours with description:
111
+ issueKey: "PROJ-123", hours: 4, date: "2025-11-07", description: "Code review and testing"
112
+
113
+ 3. Log 2.5 hours (2h 30m):
114
+ issueKey: "PROJ-123", hours: 2.5, date: "2025-11-07"
115
+
116
+ 4. Log time for yesterday:
117
+ issueKey: "PROJ-123", hours: 6, date: "2025-11-06"
118
+
119
+ 5. Log time with specific start time:
120
+ issueKey: "PROJ-123", hours: 4, date: "2025-11-07", startTime: "09:00:00"
121
+
122
+ 6. Log 1 hour quick entry:
123
+ issueKey: "PROJ-123", hours: 1, date: "2025-11-07", description: "Meeting"
124
+
125
+ 7. Log partial hour (45 minutes = 0.75 hours):
126
+ issueKey: "PROJ-123", hours: 0.75, date: "2025-11-07"
127
+
128
+ 8. Log full day (8 hours):
129
+ issueKey: "PROJ-123", hours: 8, date: "2025-11-07", description: "Feature development"
130
+
131
+ 9. Log time for multiple days:
132
+ Call multiple times with different dates
133
+
134
+ 10. Log time with remaining estimate:
135
+ issueKey: "PROJ-123", hours: 4, date: "2025-11-07", remainingEstimateHours: 12
136
+
137
+ Time Format:
138
+ - hours: Decimal number (e.g., 1.5 = 1 hour 30 minutes, 0.25 = 15 minutes)
139
+ - date: YYYY-MM-DD
140
+ - startTime: HH:MM:SS (optional, defaults to 00:00:00)`,
141
+ inputSchema: z.object({
142
+ issueKey: z.string().describe("Jira issue key (e.g., PROJ-123)"),
143
+ hours: z.number().describe("Hours to log (decimal, e.g., 2.5 = 2h 30m)"),
144
+ date: z.string().describe("Date to log work (YYYY-MM-DD)"),
145
+ description: z.string().optional().describe("Work description"),
146
+ startTime: z
147
+ .string()
148
+ .optional()
149
+ .describe("Start time (HH:MM:SS, e.g., 09:00:00)"),
150
+ remainingEstimateHours: z
151
+ .number()
152
+ .optional()
153
+ .describe("Remaining estimate in hours"),
154
+ }),
155
+ handler: async (args) => {
156
+ try {
157
+ const timeSpentSeconds = Math.round(args.hours * 3600);
158
+ const remainingEstimateSeconds = args.remainingEstimateHours
159
+ ? Math.round(args.remainingEstimateHours * 3600)
160
+ : undefined;
161
+ const result = await client.logWork({
162
+ issueKey: args.issueKey,
163
+ timeSpentSeconds,
164
+ startDate: args.date,
165
+ startTime: args.startTime || "00:00:00",
166
+ description: args.description,
167
+ billableSeconds: timeSpentSeconds, // Default: all time is billable
168
+ remainingEstimateSeconds,
169
+ });
170
+ return formatSuccess({
171
+ success: true,
172
+ message: `Logged ${args.hours}h to ${args.issueKey} on ${args.date}`,
173
+ worklog: result,
174
+ });
175
+ }
176
+ catch (error) {
177
+ return formatError(isApiError(error) ? error : new Error(String(error)));
178
+ }
179
+ },
180
+ },
181
+ tempo_update_worklog: {
182
+ description: "Update an existing worklog entry",
183
+ inputSchema: z.object({
184
+ worklogId: z.number().describe("Tempo worklog ID to update"),
185
+ hours: z.number().optional().describe("New hours (decimal)"),
186
+ description: z.string().optional().describe("New description"),
187
+ date: z.string().optional().describe("New date (YYYY-MM-DD)"),
188
+ }),
189
+ handler: async (args) => {
190
+ try {
191
+ const updateData = {};
192
+ if (args.hours !== undefined) {
193
+ updateData.timeSpentSeconds = Math.round(args.hours * 3600);
194
+ updateData.billableSeconds = updateData.timeSpentSeconds;
195
+ }
196
+ if (args.description !== undefined) {
197
+ updateData.description = args.description;
198
+ }
199
+ if (args.date !== undefined) {
200
+ updateData.startDate = args.date;
201
+ }
202
+ const result = await client.updateWorklog(args.worklogId, updateData);
203
+ return formatSuccess({
204
+ success: true,
205
+ message: `Updated worklog #${args.worklogId}`,
206
+ worklog: result,
207
+ });
208
+ }
209
+ catch (error) {
210
+ return formatError(isApiError(error) ? error : new Error(String(error)));
211
+ }
212
+ },
213
+ },
214
+ tempo_delete_worklog: {
215
+ description: "Delete a worklog entry",
216
+ inputSchema: z.object({
217
+ worklogId: z.number().describe("Tempo worklog ID to delete"),
218
+ }),
219
+ handler: async (args) => {
220
+ try {
221
+ await client.deleteWorklog(args.worklogId);
222
+ return formatSuccess({
223
+ success: true,
224
+ message: `Deleted worklog #${args.worklogId}`,
225
+ });
226
+ }
227
+ catch (error) {
228
+ return formatError(isApiError(error) ? error : new Error(String(error)));
229
+ }
230
+ },
231
+ },
232
+ tempo_get_accounts: {
233
+ description: `Get all Tempo accounts.
234
+
235
+ Tempo Accounts are used to track work against customers, projects, or cost centers.
236
+
237
+ Common Use Cases:
238
+ 1. List all available accounts for time tracking
239
+ 2. Find account keys for worklog categorization
240
+ 3. Check account status (OPEN, CLOSED, ARCHIVED)
241
+ 4. Identify account leads and contacts
242
+ 5. View customer/project hierarchy`,
243
+ inputSchema: z.object({}),
244
+ handler: async () => {
245
+ try {
246
+ const result = await client.getAccounts();
247
+ return {
248
+ content: [
249
+ {
250
+ type: "text",
251
+ text: formatAccounts(result),
252
+ },
253
+ ],
254
+ };
255
+ }
256
+ catch (error) {
257
+ return formatError(isApiError(error) ? error : new Error(String(error)));
258
+ }
259
+ },
260
+ },
261
+ tempo_get_account: {
262
+ description: "Get detailed information about a Tempo account",
263
+ inputSchema: z.object({
264
+ accountKey: z.string().describe("Account key"),
265
+ }),
266
+ handler: async (args) => {
267
+ try {
268
+ const result = await client.getAccount(args.accountKey);
269
+ return {
270
+ content: [
271
+ {
272
+ type: "text",
273
+ text: formatAccount(result),
274
+ },
275
+ ],
276
+ };
277
+ }
278
+ catch (error) {
279
+ return formatError(isApiError(error) ? error : new Error(String(error)));
280
+ }
281
+ },
282
+ },
283
+ tempo_get_teams: {
284
+ description: `Get all Tempo teams.
285
+
286
+ Tempo Teams allow you to organize users and track team capacity and workload.
287
+
288
+ Common Use Cases:
289
+ 1. List all teams in the organization
290
+ 2. Find team IDs for worklog queries
291
+ 3. View team membership and structure
292
+ 4. Identify team leads
293
+ 5. Track team capacity and availability`,
294
+ inputSchema: z.object({}),
295
+ handler: async () => {
296
+ try {
297
+ const result = await client.getTeams();
298
+ return {
299
+ content: [
300
+ {
301
+ type: "text",
302
+ text: formatTeams(result),
303
+ },
304
+ ],
305
+ };
306
+ }
307
+ catch (error) {
308
+ return formatError(isApiError(error) ? error : new Error(String(error)));
309
+ }
310
+ },
311
+ },
312
+ tempo_get_team: {
313
+ description: "Get detailed information about a Tempo team",
314
+ inputSchema: z.object({
315
+ teamId: z.number().describe("Team ID"),
316
+ }),
317
+ handler: async (args) => {
318
+ try {
319
+ const result = await client.getTeam(args.teamId);
320
+ return {
321
+ content: [
322
+ {
323
+ type: "text",
324
+ text: formatTeam(result),
325
+ },
326
+ ],
327
+ };
328
+ }
329
+ catch (error) {
330
+ return formatError(isApiError(error) ? error : new Error(String(error)));
331
+ }
332
+ },
333
+ },
334
+ tempo_get_team_worklogs: {
335
+ description: `Get all worklogs for a team within a date range.
336
+
337
+ Useful for:
338
+ - Team capacity reports
339
+ - Sprint reviews and retrospectives
340
+ - Team performance tracking
341
+ - Resource allocation analysis
342
+ - Billing and invoicing
343
+
344
+ Example:
345
+ teamId: 1, dateFrom: "2025-11-01", dateTo: "2025-11-07"`,
346
+ inputSchema: z.object({
347
+ teamId: z.number().describe("Team ID"),
348
+ dateFrom: z.string().describe("Start date (YYYY-MM-DD)"),
349
+ dateTo: z.string().describe("End date (YYYY-MM-DD)"),
350
+ }),
351
+ handler: async (args) => {
352
+ try {
353
+ const result = await client.getTeamWorklogs(args.teamId, args.dateFrom, args.dateTo);
354
+ return {
355
+ content: [
356
+ {
357
+ type: "text",
358
+ text: formatWorklogSearchResults(result),
359
+ },
360
+ ],
361
+ };
362
+ }
363
+ catch (error) {
364
+ return formatError(isApiError(error) ? error : new Error(String(error)));
365
+ }
366
+ },
367
+ },
368
+ tempo_get_user_info: {
369
+ description: `Get current user information (accountId and displayName).
370
+
371
+ The accountId is needed for filtering worklogs by user. Use this tool first if you need to:
372
+ - Get worklogs for the current user explicitly
373
+ - Find your accountId for other Tempo operations
374
+ - Verify authentication is working`,
375
+ inputSchema: z.object({}),
376
+ handler: async () => {
377
+ try {
378
+ const result = await client.getCurrentUser();
379
+ return formatSuccess({
380
+ accountId: result.accountId,
381
+ displayName: result.displayName,
382
+ tip: "Use this accountId in tempo_get_worklogs to filter by user",
383
+ });
384
+ }
385
+ catch (error) {
386
+ return formatError(isApiError(error) ? error : new Error(String(error)));
387
+ }
388
+ },
389
+ },
390
+ };
391
+ }
392
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/tempo/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAGzB,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,OAAO;QACL,kBAAkB,EAAE;YAClB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAoC4C;YACzD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;gBACnE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;gBAC/D,UAAU,EAAE,CAAC;qBACV,MAAM,EAAE;qBACR,QAAQ,EAAE;qBACV,QAAQ,CAAC,oCAAoC,CAAC;gBACjD,QAAQ,EAAE,CAAC;qBACR,MAAM,EAAE;qBACR,QAAQ,E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CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CACrD,CAAC;gBACJ,CAAC;YACH,CAAC;SACF;QAED,mBAAmB,EAAE;YACnB,WAAW,EAAE;;;;;mCAKgB;YAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,IAAyB,EAAE;gBACvC,IAAI,CAAC;oBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,cAAc,EAAE,CAAC;oBAC7C,OAAO,aAAa,CAAC;wBACnB,SAAS,EAAE,MAAM,CAAC,SAAS;wBAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;wBAC/B,GAAG,EAAE,4DAA4D;qBAClE,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,WAAW,CAChB,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CACrD,CAAC;gBACJ,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Tempo-specific types
3
+ */
4
+ export interface TempoWorklog {
5
+ tempoWorklogId: number;
6
+ jiraWorklogId: number;
7
+ issue: {
8
+ key: string;
9
+ id: number;
10
+ };
11
+ timeSpentSeconds: number;
12
+ billableSeconds: number;
13
+ startDate: string;
14
+ startTime: string;
15
+ description: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ author: {
19
+ accountId: string;
20
+ displayName: string;
21
+ self: string;
22
+ };
23
+ attributes?: {
24
+ key: string;
25
+ value: string;
26
+ }[];
27
+ }
28
+ export interface TempoWorklogInput {
29
+ issueKey: string;
30
+ timeSpentSeconds: number;
31
+ startDate: string;
32
+ startTime?: string;
33
+ description?: string;
34
+ authorAccountId?: string;
35
+ billableSeconds?: number;
36
+ remainingEstimateSeconds?: number;
37
+ attributes?: Array<{
38
+ key: string;
39
+ value: string;
40
+ }>;
41
+ }
42
+ export interface TempoAccount {
43
+ id: number;
44
+ key: string;
45
+ name: string;
46
+ status: "OPEN" | "CLOSED" | "ARCHIVED";
47
+ lead: {
48
+ accountId: string;
49
+ displayName: string;
50
+ self: string;
51
+ };
52
+ contact?: {
53
+ accountId: string;
54
+ displayName: string;
55
+ self: string;
56
+ };
57
+ links?: {
58
+ self: string;
59
+ };
60
+ }
61
+ export interface TempoTeam {
62
+ id: number;
63
+ name: string;
64
+ summary?: string;
65
+ lead: {
66
+ accountId: string;
67
+ displayName: string;
68
+ self: string;
69
+ };
70
+ members: Array<{
71
+ accountId: string;
72
+ displayName: string;
73
+ self: string;
74
+ }>;
75
+ links?: {
76
+ self: string;
77
+ };
78
+ }
79
+ export interface TempoWorklogSearchResult {
80
+ results: TempoWorklog[];
81
+ metadata: {
82
+ count: number;
83
+ offset: number;
84
+ limit: number;
85
+ };
86
+ }
87
+ export interface TempoTimesheet {
88
+ startDate: string;
89
+ endDate: string;
90
+ requiredSeconds: number;
91
+ loggedSeconds: number;
92
+ user: {
93
+ accountId: string;
94
+ displayName: string;
95
+ self: string;
96
+ };
97
+ }
98
+ //# sourceMappingURL=types.d.ts.map