Skip to content

Commit 3520fa2

Browse files
committed
feat: remove upper limit on wait duration in scheduler tool
1 parent 6c29dd8 commit 3520fa2

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

source/mcp/scheduler.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type {MCPTool} from '../utils/execution/mcpToolsManager.js';
22

33
export interface SchedulerTaskArgs {
44
/**
5-
* 等待时长(秒),范围 1-3600
5+
* 等待时长(秒),最小 1 秒,无上限
66
*/
77
duration: number;
88
/**
@@ -43,9 +43,8 @@ export const mcpTools: MCPTool[] = [
4343
duration: {
4444
type: 'number',
4545
description:
46-
'Wait duration in seconds. Minimum 1 second, maximum 3600 seconds (1 hour). If user specifies a specific time (e.g., "3 PM", "15:30"), use terminal-execute to get current timestamp first, then calculate seconds from now to the target time.',
47-
minimum: 1,
48-
maximum: 3600,
46+
'Wait duration in seconds. Minimum 1 second, no upper limit. If user specifies a specific time (e.g., "3 PM", "15:30"), use terminal-execute to get current timestamp first, then calculate seconds from now to the target time.',
47+
minimum: 1
4948
},
5049
description: {
5150
type: 'string',

source/utils/execution/mcpToolsManager.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,14 +1690,13 @@ export async function executeMCPTool(
16901690
// Validate parameters
16911691
if (
16921692
typeof args.duration !== 'number' ||
1693-
args.duration < 1 ||
1694-
args.duration > 3600
1693+
args.duration < 1
16951694
) {
16961695
return {
16971696
content: [
16981697
{
16991698
type: 'text',
1700-
text: `Error: "duration" must be a number between 1 and 3600 seconds.\n\nReceived: ${JSON.stringify(
1699+
text: `Error: "duration" must be a number greater than or equal to 1 second.\n\nReceived: ${JSON.stringify(
17011700
args.duration,
17021701
)}`,
17031702
},

0 commit comments

Comments
 (0)