whamlink-mcp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,6 +38,8 @@ Running from source instead of npm: `"command": "node", "args": ["/path/to/whaml
38
38
  | `replace_link_content` | Replace a link's content in place — the URL stays the same. |
39
39
  | `delete_link` | Permanently delete a link. |
40
40
 
41
+ > PDF and image files aren't supported over MCP (tool args are JSON, which can't carry binary) — use the [whamlink dashboard](https://whamlink.com/app) or the multipart API for those.
42
+
41
43
  **Never publish secrets, API keys, or private data.** Public links are unlisted but anyone with the URL can view them; use `private`/`password`/`email` visibility for anything sensitive.
42
44
 
43
45
  ## Develop
package/dist/index.js CHANGED
@@ -20,11 +20,13 @@ async function guard(fn, render) {
20
20
  }
21
21
  }
22
22
  const visibility = z.enum(["public", "private", "password", "email"]);
23
- const mode = z.enum(["sandboxed_html", "sanitized_html", "markdown", "pdf", "image", "text"]);
23
+ // Text-based modes only: MCP tool args are JSON, which can't carry binary. PDF/image files must
24
+ // go through the dashboard or the multipart API, so they're intentionally not offered here.
25
+ const mode = z.enum(["sandboxed_html", "sanitized_html", "markdown", "text"]);
24
26
  const server = new McpServer({ name: "whamlink", version: "0.1.0" });
25
- server.tool("publish_link", "Publish one file (HTML, Markdown, PDF as base64, image as base64, or text) to a permanent whamlink URL. Links are public (unlisted) by default; set visibility to private/password/email to gate them. Never publish secrets or private data.", {
26
- mode: mode.describe("sandboxed_html (runs JS, isolated), sanitized_html (scripts stripped), markdown, pdf, image, or text"),
27
- content: z.string().describe("The file content. For pdf/image, base64 is accepted via the API's text path only for small files; prefer text/markdown/html here."),
27
+ server.tool("publish_link", "Publish text-based content (HTML, Markdown, or plain text) to a permanent whamlink URL. Links are public (unlisted) by default; set visibility to private/password/email to gate them. (PDF/image files aren't supported over MCP — use the whamlink dashboard or multipart API for those.) Never publish secrets or private data.", {
28
+ mode: mode.describe("sandboxed_html (runs JS, isolated origin), sanitized_html (scripts stripped), markdown, or text"),
29
+ content: z.string().describe("The text content to publish (UTF-8)."),
28
30
  title: z.string().optional(),
29
31
  allowNetwork: z.boolean().optional().describe("Let sandboxed/sanitized HTML load https CDN scripts/styles"),
30
32
  visibility: visibility.optional().describe("Default public. private = owner only; password = also pass `password`; email = also pass `shareEmails`"),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "whamlink-mcp",
3
- "version": "0.1.0",
4
- "description": "MCP server for whamlink publish a single file to a permanent, shareable link from any MCP client.",
3
+ "version": "0.1.1",
4
+ "description": "MCP server for whamlink \u2014 publish a single file to a permanent, shareable link from any MCP client.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "whamlink-mcp": "dist/index.js"