Skip to main content
Glama
@prompthub/mcp
by LionelHao

PromptHub: upload a prompt reference

prompthub_upload_reference

Uploads a local repo file as a PromptReference input asset (not a generated artifact) bound to a prompt unit; specify target kind and ID for text files, workflow nodes, or conversation turns.

Instructions

Upload a local file as a PromptReference input asset, bound to a prompt unit. This is NOT a generated artifact. Set filePath to an existing repo file path; targetKind is TEXT_FILE, WORKFLOW_NODE, or CONVERSATION_TURN. targetId is required for node/turn targets. See prompthub_describe_reference_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>",
      "filePath": "<filePath>",
      "targetKind": "<targetKind>"
    },
    "name": "prompthub_upload_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to a local file.
kindNoDefaults from the file extension.
nameYes
ownerYes
titleNo
filePathYesExisting repo file path from prompthub_get_repo.
targetIdNoRequired for WORKFLOW_NODE and CONVERSATION_TURN.
targetKindYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the key constraint that filePath must be an existing repo file path (obtained from prompthub_get_repo) and that targetId is mandatory for node/turn targets, but it says nothing about overwrite/replace behavior on re-upload, size or format limits, permissions, or error conditions.

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

Conciseness4/5

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

Four short sentences, front-loaded with the identity of the operation, then constraints, then a pointer to the format-describing sibling. Minor redundancy where targetKind enumeration and targetId requirement restate the schema.

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

Completeness3/5

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

For an eight-parameter mutation tool with no annotations and no output schema, the description covers intent and the two tricky parameters but leaves half the inputs and all failure/post-upload behavior undocumented. Adequate to invoke correctly, not complete.

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

Parameters3/5

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

Schema coverage is 50%. The description clarifies the conditional requirement on targetId and enumerates targetKind values, but the schema already carries those details, and the four undocumented parameters (owner, name, title, and the file/kind relationship) get no explanation in the description either.

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 concrete verb and resource ('Upload a local file as a PromptReference input asset') plus the binding scope ('bound to a prompt unit'), and explicitly negates the nearest sibling concept ('This is NOT a generated artifact'), distinguishing it from prompthub_upload_artifact.

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

Usage Guidelines4/5

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

The negation against generated artifacts gives a clear selection rule for reference-vs-artifact, and it routes the agent to prompthub_describe_reference_format for detail. It stops short of stating positive preconditions (e.g. prompt unit must already exist) or what to do when the target kind is wrong.

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