Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): fewer MCP tools: action tools for preview, queue, questions, transfers, schedules #25124

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromfeat/fewer-mcp-toolsopened View on GitHub

Showing 21 changed files with 54 additions and 54 deletions (loading 18).

x
0 of 21 viewed, 21 left
33 additions and 15 deletionsapps/server/src/mcp/toolkits/orchestrator/handlers.tsModified
View file
@@ -78,14 +78,39 @@
);
}),
),
- schedule_task: McpToolAccess.startsThreads(
- () => ({}),
- (input) =>
- Effect.gen(function* () {
- const scope = yield* McpInvocationContext.McpInvocationContext;
- const service = yield* OrchestratorMcpService.OrchestratorMcpService;
- return yield* service.scheduleTask(scope, input);
- }),
+ schedule_task: McpToolAccess.either(
+ (input) => input.scheduledTaskId === undefined,
+ McpToolAccess.startsThreads(
+ () => ({}),
+ ({ prompt, schedule, ...input }) =>
+ Effect.gen(function* () {
+ if (prompt === undefined || schedule === undefined) {
+ return yield* new OrchestratorMcpFailure({
+ code: "invalid_request",
+ message: "A new scheduled task needs `prompt` and `schedule`.",
+ });
+ }
+ const scope = yield* McpInvocationContext.McpInvocationContext;
+ const service = yield* OrchestratorMcpService.OrchestratorMcpService;
+ return yield* service.scheduleTask(scope, { ...input, prompt, schedule });
+ }),
+ ),
+ McpToolAccess.writes(