Skip to main content
Glama
box-community

MCP Server Box

box_ai_extract_structured_enhanced_using_template_tool

Extract structured data from files using AI to populate a single metadata template, combining information from multiple documents into one complete record.

Instructions

Extract structured data from one or more files and return a SINGLE metadata instance (Enhanced version).

This enhanced 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.

Enhanced features:

  • Uses advanced AI models (e.g., Google Gemini) for improved accuracy

  • Better handling of complex document layouts and image quality

  • More robust extraction for handwritten or low-quality scans

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 project info from a proposal PDF, budget spreadsheet, and timeline image)

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 key of the metadata template to use for the extraction. Example: "insurance_policy_template". Returns: dict: The extracted structured data in a json string format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idsYes
template_keyYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It does well by describing key behavioral traits: that it returns a SINGLE metadata instance even with multiple files, uses advanced AI models (Gemini), handles complex layouts and low-quality scans, and combines information from all files. However, it doesn't mention potential limitations like file size constraints, processing time, or error handling, which keeps it from a perfect score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with a clear purpose statement, then details enhanced features, use cases, exclusions, and finally parameter explanations. Every sentence adds value - no fluff or repetition. The information is front-loaded with the most important details first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex extraction tool with no annotations and no output schema, the description does an excellent job. It explains the tool's behavior, use cases, limitations, and parameters. The main gap is the lack of information about the return format beyond 'dict: The extracted structured data in a json string format' - more detail about the structure of the returned data would be helpful given no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 2 parameters, the description adds significant value beyond the bare schema. It explains that 'file_ids' are 'IDs of the files to read' and provides concrete examples of what files might contain. For 'template_key', it gives an example ('insurance_policy_template') and explains it's 'the key of the metadata template to use for the extraction.' This compensates well for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Extract structured data from one or more files and return a SINGLE metadata instance (Enhanced version).' It specifies the verb ('extract'), resource ('structured data from files'), and distinguishes from siblings by mentioning it's an 'enhanced version' and explicitly contrasting with batch processing. The description differentiates from sibling tools like 'box_ai_extract_structured_using_template_tool' by emphasizing enhanced AI models and multi-file consolidation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool vs alternatives. It states 'Use cases' with examples for single and multiple files, and crucially includes a 'NOT for batch processing' section that explicitly tells when NOT to use it ('If you need to extract metadata from multiple files as separate instances, call this tool once per file in a loop'). This gives clear alternatives and exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/box-community/mcp-server-box'

If you have feedback or need assistance with the MCP directory API, please join our Discord server