> For the complete documentation index, see [llms.txt](https://whitepaper.aitech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.aitech.io/agentforge/tools/file.md).

# file

The File Parser tool provides a powerful way to extract and process content from various file formats, making it easy to incorporate document data into your agent workflows. This tool supports multiple file formats and can handle files up to 200MB in size.

With the File Parser, you can:

* **Process multiple file formats**: Extract text from PDFs, CSVs, Word documents (DOCX), text files, and more
* **Handle large files**: Process documents up to 200MB in size
* **Parse files from URLs**: Directly extract content from files hosted online by providing their URLs
* **Process multiple files at once**: Upload and parse several files in a single operation
* **Extract structured data**: Maintain formatting and structure from the original documents when possible

The File Parser tool is particularly useful for scenarios where your agents need to work with document content, such as analyzing reports, extracting data from spreadsheets, or processing text from various document sources. It simplifies the process of making document content available to your agents, allowing them to work with information stored in files just as easily as with direct text input.

### Usage Instructions

Upload and extract contents from structured file formats including PDFs, CSV spreadsheets, and Word documents (DOCX). Upload files directly. Specialized parsers extract text and metadata from each format. You can upload multiple files at once and access them individually or as a combined document.

### Tools

#### `file_parser`

Parse one or more uploaded files or files from URLs (text, PDF, CSV, images, etc.)

**Input**

| Parameter  | Type   | Required | Description                                                           |
| ---------- | ------ | -------- | --------------------------------------------------------------------- |
| `filePath` | string | Yes      | Path to the file(s). Can be a single path, URL, or an array of paths. |
| `fileType` | string | No       | Type of file to parse (auto-detected if not specified)                |

**Output**

| Parameter         | Type   | Description           |
| ----------------- | ------ | --------------------- |
| `files`           | json   | Parsed file data      |
| `combinedContent` | string | Combined file content |

### Notes

* Category: `tools`
* Type: `file`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://whitepaper.aitech.io/agentforge/tools/file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
