From 39918c466a6d5da9c5431ef84e8b8de32b508bef Mon Sep 17 00:00:00 2001 From: eliets2 <287273517+eliets2@users.noreply.github.com> Date: Tue, 20 Oct 2026 22:16:08 +0300 Subject: [PATCH] Describe the shared-output refusal in the batch OCR tool description Agents read the tool description to plan a call. The description of ocr_recognize_files now says that two inputs which would write the same output file are refused before anything is read or written, so an agent does not expect a partial batch. Checked: cargo test -p pdfcraft-automation --test automation -- tools (86 passed, 0 failed). The text is the only change in this commit. --- crates/automation/src/tools.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/automation/src/tools.rs b/crates/automation/src/tools.rs index 4fff59c07d..3afa408ea6 100644 --- a/crates/automation/src/tools.rs +++ b/crates/automation/src/tools.rs @@ -1184,7 +1184,7 @@ pub fn tools() -> Vec { }), &["doc"], )), - t("ocr_recognize_files", "Recognize text in multiple files", "Scan & OCR ▸ Recognize text ▸ In multiple files: read every page of each PDF in paths and write the searchable result into folder under the same name (pages that already have text are left alone unless skip_text_pages is false, as in ocr_recognize). Returns, per file, the output path, word count and skipped pages, or the error.") + t("ocr_recognize_files", "Recognize text in multiple files", "Scan & OCR ▸ Recognize text ▸ In multiple files: read every page of each PDF in paths and write the searchable result into folder under the same name (pages that already have text are left alone unless skip_text_pages is false, as in ocr_recognize). Two inputs that would write the same output file are refused before anything is read or written. Returns, per file, the output path, word count and skipped pages, or the error.") .cmd("ocr.recognize_batch") .with(schema( json!({