Skip to content

Commit 7ecd771

Browse files
committed
fix: use toWizardToolErrorContent for batch validation error in confirm_event_plan
1 parent aaf6818 commit 7ecd771

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/lib/wizard-tools.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,14 +1947,13 @@ For codebases with >50 events the wizard runs the WRITE phase in chunks of ~25 e
19471947
});
19481948
if (batchError) {
19491949
logToFile(`confirm_event_plan: rejected batch metadata: ${batchError}`);
1950-
return {
1951-
content: [
1952-
{
1953-
type: 'text' as const,
1954-
text: `error: invalid batch metadata — ${batchError}. Re-call without batch fields to fall back to single-batch behavior, or fix the metadata and retry.`,
1955-
},
1956-
],
1957-
};
1950+
return toWizardToolErrorContent({
1951+
error: `invalid batch metadata — ${batchError}`,
1952+
guidance:
1953+
'Re-call confirm_event_plan without batch fields to fall back to single-batch behavior, or fix the metadata and retry.',
1954+
suggestedTool: 'mcp__wizard-tools__confirm_event_plan',
1955+
context: `batchIndex: ${args.batchIndex}; totalBatches: ${args.totalBatches}; chunkSize: ${args.chunkSize}; eventCount: ${args.events.length}`,
1956+
});
19581957
}
19591958
// Soft-gate the name format. Agents historically saw conflicting
19601959
// guidance (commandments said Title Case, the tool schema said

0 commit comments

Comments
 (0)