Skip to main content
Glama
box-community

MCP Server Box

box_ai_extract_structured_enhanced_using_fields_tool

Extract structured data from documents using custom field definitions, combining information from multiple files into a single record with enhanced AI accuracy for complex layouts and low-quality scans.

Instructions

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

This enhanced tool analyzes the provided file(s) and extracts information based on custom field definitions you provide. When multiple files are provided, Box AI combines information from ALL files to create ONE complete data 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

  • Improved understanding of complex field relationships

Unlike template-based extraction, this tool allows you to define fields on-the-fly without creating a metadata template in Box first. This is useful for ad-hoc data extraction or when you need fields that don't match any existing template.

Use cases:

  • Single file: Extract custom fields from one document

  • Multiple files: Combine data from multiple sources into one data instance (e.g., extract patient info from medical records, lab results, and prescription images)

NOT for batch processing: If you need to extract data 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]): A list of file IDs to extract information from, example: ["1234567890", "0987654321"]. fields (List[dict[str, Any]]): The fields to extract from the files. Returns: dict: The AI response containing the extracted information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idsYes
fieldsYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: that it returns a single combined record from multiple files, uses advanced AI models for improved accuracy, handles complex layouts and low-quality scans, and is not for batch processing. However, it doesn't mention potential limitations like file size constraints, processing time, or error handling.

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 efficiently organized: it starts with the core purpose, explains enhanced features, distinguishes from alternatives, provides use cases, and includes clear parameter explanations. Every sentence adds value without redundancy, and the information is front-loaded with the most critical 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 AI extraction tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description does an excellent job covering purpose, usage, behavioral context, and parameter semantics. The main gap is the lack of output format details (only stating 'dict: The AI response containing the extracted information'), which would help the agent understand what to expect from the tool's response.

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 for both parameters, the description provides essential semantic context: file_ids are 'a list of file IDs to extract information from' with an example, and fields are 'the fields to extract from the files' defined as custom field definitions. While it doesn't detail the exact structure of the fields dictionary, it explains their purpose and relationship to the extraction process, significantly compensating for the schema gap.

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 specific action ('Extract structured data'), resource ('from one or more files'), and scope ('using custom fields and return a SINGLE data instance'). It explicitly distinguishes this as an 'Enhanced version' and differentiates from template-based extraction and batch processing, making it distinct from sibling tools like box_ai_extract_structured_using_fields_tool and box_ai_extract_structured_enhanced_using_template_tool.

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 ('for ad-hoc data extraction or when you need fields that don't match any existing template'), when NOT to use it ('NOT for batch processing'), and clear alternatives ('call this tool once per file in a loop' for batch processing). It also distinguishes from template-based extraction methods mentioned in sibling tools.

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