PromptHub: upload a binary artifact
prompthub_upload_artifactUploads a local binary file (image, video, or PDF) as an artifact to a repository's Artifacts panel, reading the file path and inferring type from its extension.
Instructions
Upload a local BINARY file (image/video/pdf) as a generated artifact to a repo's Artifacts (产物) panel. Pass a local file path; this tool reads it and uploads directly. type defaults from the extension (.png/.jpg/.gif/.webp→IMAGE ≤10MB, .mp4/.webm→VIDEO ≤100MB, .pdf→FILE ≤25MB). For inline Markdown/HTML use prompthub_publish_artifact. The server APPENDS (no de-dup); to REPLACE, prompthub_get_repo + prompthub_delete_artifact the old id first. See prompthub_describe_artifact_format.
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": {
"owner": "<owner>",
"name": "<name>",
"file": "<file>"
},
"name": "prompthub_upload_artifact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to a local file (absolute or relative to the server's cwd). | |
| name | Yes | ||
| role | No | Defaults to FINAL. Use INTERMEDIATE only for a workflow node output. | |
| type | No | Defaults from the file extension. | |
| owner | Yes | ||
| title | No | ||
| filePath | No | PREFER OMITTING. Omit = repo-level artifact, visible on every file page (recommended). Only set to an EXISTING repo file path (from prompthub_get_repo's files[].path); a wrong/non-existent path is accepted but the artifact will NOT show in the UI panel. | |
| targetId | No | Workflow node id required with role=INTERMEDIATE. | |
| targetKind | No | Required with role=INTERMEDIATE. |