> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devtune.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Library uploads

> Upload supported documents, replace an upload with a new version, and interpret extraction and indexing states.

Uploads add project source material to the Library. DevTune stores the original file, extracts its text, and indexes readable content for Library search and optional agent grounding.

You need project management permission to upload a file or upload a new version.

Library uploads are available on paid plans. Every plan has the same fair-use limit: **1,000 Current uploads or 2 GB per project**, whichever comes first.

## Supported files

The Library accepts files up to **25 MB** in these formats:

| Format | Extension |
| - | - |
| PDF | `.pdf` |
| Microsoft Word | `.docx` |
| Markdown | `.md` |
| Plain text | `.txt` |

Scanned PDFs without readable text can be stored, but they are marked **Unindexed** because the upload path does not run optical character recognition.

## Upload a file

1. Open a project, select **Agents**, then the **Library** tab
2. Select **Upload**
3. Choose a supported file
4. Select **Upload**

The upload counts against the project's limit when it becomes a Current Library item. Superseded uploads count toward neither the file nor the storage limit. When a project reaches its limit, the upload dialog says so and the upload is not saved.

## Upload a new version

Open a Current upload and select **Upload new version**. The new file becomes Current and the previous file remains in the chain as Superseded.

Use a new upload instead when the document is unrelated. Version chains are for revisions of the same source, not merely files with similar names.

## Extraction and indexing

Upload processing has two stages:

1. **Extraction** reads text from the file. If no readable text is found or the parser fails, the item is saved as **Unindexed** with the original available to download.
2. **Indexing** splits extracted text into searchable passages and builds keyword and semantic search data. The item shows **Indexing** while this work is pending.

If semantic embeddings are temporarily unavailable, DevTune still stores full-text search data for the extracted passages.

## API and MCP uploads

The public REST API and MCP upload tool accept text content, not binary PDF or DOCX bodies:

* `POST /projects/{projectId}/library` accepts a title, up to 500,000 characters of text, and an optional `replaceItemId`.
* `devtune_upload_library_item` exposes the same operation to MCP clients.

Both require `library.write`, create an Upload item, and count against the same project limit. Use the in-app upload flow for PDF, DOCX, Markdown, and original-file downloads.

See the [REST API endpoint list](/api-reference/overview#available-endpoints) and [MCP server guide](/api-reference/mcp-server#library-and-knowledge-permissions).

## Next steps

* [Search uploaded material](/library/search-and-grounding)
* [Review catalog versions](/library/overview#version-chains)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.