Skip to main content
Glama
box-community

MCP Server Box

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

TableJSON Schema
NameRequiredDescriptionDefault
file_idsYes
template_keyYes
ai_agent_idNo
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 behaviors: it's a read operation (extracts data), combines information from multiple files into one record, and specifies the output format ('json string format'). However, it doesn't mention potential limitations like file size constraints, processing time, or error handling, which could be useful for an agent.

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 front-loaded with the core purpose. Every sentence adds value: the first states the goal, the second explains multi-file handling, use cases provide concrete examples, and exclusions prevent misuse. There's no redundant or verbose content, making it efficient for an agent to parse.

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?

Given the tool's complexity (AI-based extraction with multiple files and templates) and lack of annotations or output schema, the description does a good job covering key aspects: purpose, usage, parameters, and output format. However, it could be more complete by mentioning authentication needs, rate limits, or what happens if extraction fails, which are relevant for an agent's decision-making.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context for all parameters: 'file_ids' is explained as 'The IDs of the files to read' with examples, 'template_key' as 'The ID of the template to use for extraction,' and 'ai_agent_id' as optional for 'The ID of the AI agent to use for processing.' This clarifies purpose beyond the bare schema, though it doesn't detail format constraints (e.g., template structure).

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.' It specifies the verb ('extract'), resource ('files'), and output ('single metadata instance'), and distinguishes it from siblings like batch processing tools by explicitly stating 'NOT for batch processing.'

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 includes use cases (single file, multiple files) and explicitly states when not to use it ('NOT for batch processing'), with a clear alternative: 'call this tool once per file in a loop.' This helps the agent choose correctly among extraction-related siblings.

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