From 0c2527453b66ea32051abe54b37819ce8f472aa5 Mon Sep 17 00:00:00 2001 From: lijianlin <1569339843@qq.com> Date: Wed, 8 Apr 2026 08:36:21 +0800 Subject: [PATCH] fix(schedule): use anyOf for nullable max_calls --- internal/agent/tools/schedule.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/agent/tools/schedule.go b/internal/agent/tools/schedule.go index 30823211..c9e7a23a 100644 --- a/internal/agent/tools/schedule.go +++ b/internal/agent/tools/schedule.go @@ -92,7 +92,7 @@ func (p *ScheduleProvider) Tools(_ context.Context, session SessionContext) ([]s "properties": map[string]any{ "name": map[string]any{"type": "string"}, "description": map[string]any{"type": "string"}, "pattern": map[string]any{"type": "string"}, "command": map[string]any{"type": "string"}, - "max_calls": map[string]any{"type": []string{"integer", "null"}, "description": "Optional max calls, null means unlimited"}, + "max_calls": map[string]any{"anyOf": []map[string]any{{"type": "integer"}, {"type": "null"}}, "description": "Optional max calls, null means unlimited"}, "enabled": map[string]any{"type": "boolean"}, }, "required": []string{"name", "description", "pattern", "command"}, @@ -136,7 +136,7 @@ func (p *ScheduleProvider) Tools(_ context.Context, session SessionContext) ([]s "id": map[string]any{"type": "string"}, "name": map[string]any{"type": "string"}, "description": map[string]any{"type": "string"}, "pattern": map[string]any{"type": "string"}, "command": map[string]any{"type": "string"}, - "max_calls": map[string]any{"type": []string{"integer", "null"}}, + "max_calls": map[string]any{"anyOf": []map[string]any{{"type": "integer"}, {"type": "null"}}}, "enabled": map[string]any{"type": "boolean"}, }, "required": []string{"id"},