Skip to main content
Glama
@prompthub/mcp
by LionelHao

PromptHub: publish an inline artifact

prompthub_publish_artifact

Publish generated Markdown or HTML text results (up to 256 KiB) to a repository's Artifacts panel so outputs appear alongside the repo.

Instructions

Publish a GENERATED text RESULT (Markdown or HTML, ≤256 KiB) to a repo's Artifacts (产物) panel. This is NOT the prompt itself — for the prompt use create_repo/publish_session; for binary files (image/video/pdf) use prompthub_upload_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>",
      "type": "<type>",
      "content": "<content>"
    },
    "name": "prompthub_publish_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesRepository name.
roleNoDefaults to FINAL. Use INTERMEDIATE only for a workflow node output.
typeYes
ownerYesOwner handle (must be you).
titleNo
contentYesThe generated text (Markdown or HTML), ≤256 KiB.
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.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the append-only, no-de-dup write model, the replace workaround, the size ceiling, and the silent-failure caveat on filePath (accepted but not shown in the UI). It does not say what the call returns (e.g., an artifact id), which is the main remaining gap for a mutation tool with no output schema.

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?

Three dense sentences, front-loaded with the core action and limit, each subsequent sentence handling a distinct routing or behavioral point. No filler; capitalization and parenthetical glosses serve as fast-scannable emphasis rather than noise.

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 edges (append-only, silent filePath failure, size limit) and routes to the format-description sibling. It would be complete with a line on the return value and on the INTERMEDIATE/workflow-node case, which are only implied.

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 78%, so most parameters are already documented; the description mainly reinforces content type/size limits and the artifact-versus-prompt distinction. The role/targetId/targetKind workflow-node semantics are left entirely to the schema, so the description adds only marginal meaning beyond structured fields.

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 (publish) and resource (generated text result / inline artifact) with scope constraints (Markdown or HTML, ≤256 KiB) and explicitly disambiguates from the prompt itself and from binary uploads. An agent can distinguish this from prompthub_upload_artifact or prompthub_create_repo without opening any 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?

Explicit routing: prompts go to create_repo/publish_session, binary files to prompthub_upload_artifact, replacing requires get_repo + delete_artifact first, and format details live in prompthub_describe_artifact_format. Both when-to-use and when-not-to-use are covered with named alternatives.

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