Skip to content

Commit 1fc2533

Browse files
committed
remove workers_builds_set_active_build
1 parent 7897958 commit 1fc2533

File tree

1 file changed

+2
-60
lines changed

1 file changed

+2
-60
lines changed

apps/workers-builds/src/tools/workers-builds.tools.ts

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -150,35 +150,14 @@ export function registerBuildsTools(agent: BuildsMCP) {
150150
}
151151
)
152152

153-
agent.server.tool(
154-
'workers_builds_set_active_build',
155-
'Set the active build UUID for subsequent calls.',
156-
{
157-
buildUUID: z.string().describe('The build UUID to set as active.'),
158-
},
159-
async ({ buildUUID }) => {
160-
await agent.setActiveBuildUUID(buildUUID)
161-
return {
162-
content: [
163-
{
164-
type: 'text',
165-
text: `Active build UUID set to ${buildUUID}`,
166-
},
167-
],
168-
}
169-
}
170-
)
171-
172153
agent.server.tool(
173154
'workers_builds_get_build',
174155
fmt.trim(`
175156
Get details for a specific build by its UUID.
176-
If no buildUUID is provided, the active build (set by workers_builds_set_active_build) will be used.
177-
178157
Includes build and deploy commands for the build (useful for debugging build failures).
179158
`),
180159
{
181-
buildUUID: z.string().optional(),
160+
buildUUID: z.string().describe('The build UUID to get details for.'),
182161
},
183162
async ({ buildUUID }) => {
184163
const accountId = await agent.getActiveAccountId()
@@ -193,26 +172,6 @@ export function registerBuildsTools(agent: BuildsMCP) {
193172
}
194173
}
195174

196-
if (!buildUUID) {
197-
const activeBuildUUID = await agent.getActiveBuildUUID()
198-
if (activeBuildUUID) {
199-
buildUUID = activeBuildUUID
200-
} else {
201-
return {
202-
content: [
203-
{
204-
type: 'text',
205-
text: fmt.oneLine(`
206-
No buildUUID provided and no active buildUUID.
207-
Either provide a buildUUID or call workers_builds_set_active_build first.
208-
If needed, call workers_builds_list_builds to list builds.
209-
`),
210-
},
211-
],
212-
}
213-
}
214-
}
215-
216175
try {
217176
const { result: build } = await getBuild({
218177
apiToken: agent.props.accessToken,
@@ -269,10 +228,9 @@ export function registerBuildsTools(agent: BuildsMCP) {
269228
'workers_builds_get_build_logs',
270229
fmt.trim(`
271230
Get logs for a Cloudflare Workers build.
272-
Either provide a buildUUID or call workers_builds_set_active_build first.
273231
`),
274232
{
275-
buildUUID: z.string().optional(),
233+
buildUUID: z.string().describe('The build UUID to get logs for.'),
276234
},
277235
async ({ buildUUID }) => {
278236
const accountId = await agent.getActiveAccountId()
@@ -287,22 +245,6 @@ export function registerBuildsTools(agent: BuildsMCP) {
287245
}
288246
}
289247

290-
if (!buildUUID) {
291-
const activeBuildUUID = await agent.getActiveBuildUUID()
292-
if (activeBuildUUID) {
293-
buildUUID = activeBuildUUID
294-
} else {
295-
return {
296-
content: [
297-
{
298-
type: 'text',
299-
text: 'No active build UUID set. Either provide a buildUUID or call workers_builds_set_active_build first.',
300-
},
301-
],
302-
}
303-
}
304-
}
305-
306248
try {
307249
const logs = await getBuildLogs({
308250
apiToken: agent.props.accessToken,

0 commit comments

Comments
 (0)