box_ai_extract_structured_using_template_tool
Extract structured data from Box files using templates to create single metadata records from one or multiple documents.
Instructions
Extract structured data from one or more files and return a SINGLE metadata instance.
This tool analyzes the provided file(s) and extracts information to populate a single metadata instance based on the specified template. When multiple files are provided, Box AI combines information from ALL files to create ONE complete metadata record.
Use cases:
Single file: Extract metadata from one receipt, invoice, or document
Multiple files: Combine data from multiple sources into one metadata instance (e.g., extract customer info from both a contract PDF and a supporting letter)
NOT for batch processing: If you need to extract metadata from multiple files as separate instances, call this tool once per file in a loop.
Args: ctx (Context): The context object containing the request and lifespan context. file_ids (List[str]): The IDs of the files to read. template_key (str): The ID of the template to use for extraction. ai_agent_id (Optional[str]): The ID of the AI agent to use for processing. Returns: dict: The extracted structured data in a json string format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_ids | Yes | ||
| template_key | Yes | ||
| ai_agent_id | No |