scan_doc
Scan a local file to identify its true content type regardless of file extension, using Magika detection. Validates if the file matches safelist criteria for upload.
Instructions
Scan a local file with Magika to detect its true content type.
Uses the Source Parts document scanning API (backed by Google Magika) to identify what a file actually is, regardless of its extension. Useful for checking whether a file would be accepted by the safelist before uploading it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "scan_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the local file to scan. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||