examples.hotfolder
Package examples.hotfolder. Tools (MCP name hotfolder.<tool>): list, read_text, file_info, hash, search_text, write_text, append_text, mkdir, move, copy. Part of the Java Tool SDK examples.
By ToolGate Examples Signed
Java 17, protocol 2
Use in ToolGate
In the ToolGate console, open Server packages, then Marketplace, and install this package. These values identify exactly what you install:
{
"marketplace": "olo-labs-marketplace",
"packageId": "examples.hotfolder",
"version": "0.1.0",
"packageDigest": "sha256:27056810f9dae1a34d40337f37a6b738cd74069d1b9263815cf38b553c08cc44"
}
Overview
HotFolder
Package examples.hotfolder. Tools (MCP name hotfolder.<tool>): list, read_text, file_info, hash, search_text, write_text, append_text, mkdir, move, copy. Part of the Java Tool SDK examples.
Text files in a protected folder on an enrolled device. Every tool is a @ClientTool: it runs only on the device the caller selects, and it reaches files only through ToolContext.files(). The package holds all of the tool behaviour; the device provides one generic, confined files area (ADR 027) and nothing specific to this package.
Safety
@DeviceFileAccessdeclares the access each tool needs (DEVICE_FILES_READ, orDEVICE_FILES_WRITEfor the five that change files). The administrator sees and grants these permissions; Control signs them into the device's registration.- The device confines every path to its one service-owned folder: no
.., absolute paths, hidden names, links or other users' files, only allowed text file types, and bounded file sizes, folder capacity and file operations per call. - A call may only touch the paths it was invoked with:
pathanddestinationmust be arguments of that call. moveandcopynever overwrite an existing destination. A missing file is reported as data (exists: false,moved: false), so the examples hold in an empty folder, which is how a device self-tests the package.
Try it
toolgate dev # an MCP server over stdio
toolgate pack # build/toolgate/hotfolder-0.1.0.tgpkg
- Source repository
- License: Apache-2.0
Tools
hotfolder.append_textNon idempotent- Append to a text file Appends text, creating the file when needed.
hotfolder.copyNon idempotent- Copy a file Copies a file to a new path that does not exist yet.
hotfolder.file_infoRead only- File size Reports whether a file exists and its size.
hotfolder.hashRead only- Hash a file SHA-256 of a text file.
hotfolder.listRead only- List files Lists the files and folders in a folder of the HotFolder, or all of them.
hotfolder.mkdirIdempotent- Create a folder Creates a folder inside the HotFolder.
hotfolder.moveNon idempotent- Move a file Moves a file to a new path that does not exist yet.
hotfolder.read_textRead only- Read a text file Reads a UTF-8 text file from the HotFolder.
hotfolder.search_textRead only- Search a file Line numbers of a text file that contain the query.
hotfolder.write_textIdempotent- Write a text file Creates or replaces a text file.
Settings it needs
No settings.
Versions
| Version | API change | Compatibility | Published |
|---|---|---|---|
| 0.1.0 | none | Java 17, protocol 2 | 17 Oct 2026 - 21:40 |
Publisher
ToolGate Examples, OLO Labs
Publisher details are supplied by the publisher. Validation checks package format, not code safety.