Check a file before uploading it
check_image_supportedGiven a filename, MIME type and/or byte size, says whether PiPic will accept the image and, if not, which error an upload would return. Use it to filter a file list locally instead of spending quota on requests that are going to be rejected.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_image_supported"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | File name or path; the extension is used to infer the type. | |
| sizeBytes | No | File size in bytes, if known. | |
| contentType | No | MIME type, if you already know it. Takes precedence over filename. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Why — including which error code an upload would return. | |
| supported | Yes | Whether PiPic will accept this image. | |
| contentType | No | The MIME type that was determined, to send as the Content-Type header. |