content_batch_analyze
Analyze multiple content files simultaneously to extract insights, compare documents, or summarize information using batch processing with configurable modes.
Instructions
Analyze multiple content files from a directory or explicit file list.
Supports two modes: 'compare' sends all files to Gemini in a single call for cross-document analysis, 'individual' analyzes each file separately with bounded concurrency (3 parallel calls).
Args: instruction: What to analyze or extract from the content. directory: Directory to scan for content files. file_paths: Explicit list of file paths to analyze. glob_pattern: Glob to filter files in directory mode. mode: 'compare' or 'individual' analysis mode. output_schema: Optional JSON Schema dict for custom output shape. thinking_level: Gemini thinking depth. max_files: Maximum number of files to process.
Returns: Dict with file counts, per-file items, and optional comparison result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instruction | No | What to analyze — e.g. 'compare methodologies', 'summarize each document', 'extract key findings' | Provide a comprehensive analysis of these documents. |
| directory | No | Directory to scan for content files | |
| file_paths | No | Explicit list of file paths to analyze | |
| glob_pattern | No | Glob pattern to filter files within directory | * |
| mode | No | 'compare' for cross-document analysis in one call, 'individual' for separate per-file analysis | compare |
| output_schema | No | Optional JSON Schema for each result | |
| thinking_level | No | high | |
| max_files | No | Maximum files to process |