Skip to main content
Glama
@prompthub/mcp
by LionelHao

PromptHub: upload a binary artifact

prompthub_upload_artifact

Uploads 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

NameRequiredDescriptionDefault
fileYesPath to a local file (absolute or relative to the server's cwd).
nameYes
roleNoDefaults to FINAL. Use INTERMEDIATE only for a workflow node output.
typeNoDefaults from the file extension.
ownerYes
titleNo
filePathNoPREFER 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.
targetIdNoWorkflow node id required with role=INTERMEDIATE.
targetKindNoRequired with role=INTERMEDIATE.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the burden and does so well: it discloses per-type size ceilings (10MB/100MB/25MB), extension-based type inference, that the server APPENDS without de-duplication, and that the local file is read and uploaded by the server. It stops short of stating authentication requirements or what happens on upload failure/quota breach, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action in sentence one, then layers type/limit rules, the sibling alternative, and the replace procedure in descending priority. Dense but every clause carries operational information; no filler or restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter mutation tool with no annotations and no output schema, the description covers the risky parts (size limits, append semantics, type inference, filePath guidance) thoroughly. The notable gap is the return value — with no output schema, the agent is not told what an upload returns (e.g., the artifact id needed for the documented replace flow).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description adds genuinely new meaning beyond it: the extension-to-type mapping table with size limits is not in the schema, and 'this tool reads it and uploads directly' clarifies that `file` is a server-side path rather than content. It leaves `role`, `targetId`, and `targetKind` entirely to the schema, so it does not fully compensate for the remaining coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Upload'), a specific resource ('a local BINARY file ... as a generated artifact to a repo's Artifacts panel'), and the input to supply ('Pass a local `file` path'). It explicitly distinguishes itself from the closest sibling by naming prompthub_publish_artifact as the tool for inline Markdown/HTML, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit use/when-not guidance: binary files here, inline Markdown/HTML to prompthub_publish_artifact. It also prescribes the full replace workflow (prompthub_get_repo + prompthub_delete_artifact before re-upload) and points to prompthub_describe_artifact_format for further detail, which is exactly the alternative-routing an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.