Skip to main content
Glama

Publish Document

publish_document

Publish Markdown or HTML to Gryz as a document and return its URL.

Public documents are reachable by anyone holding the link. Default lifespan by plan: anonymous 24h, free account 72h, Pro 30 days, Pro Plus permanent (or shorter if set). Private documents appear only in the owner's Gryz dashboard and never expire.

Visibility and retention are the publisher's choice, not properties of the content. Use the defaults below unless the person asks for something else.

Use this to save finished work the person would want again (a document, spec, plan, report or handoff) without waiting to be asked, unless they say not to. Do not save short answers, drafts in progress or routine replies. Unless the person asks for something else, use restricted on Pro and Pro Plus accounts. On a free account use public with show_on_explore: false: an unlisted link that stays off Explore and search engines, that anyone who has it can read, and that expires after 72 hours. On a free account, ask first if the work looks sensitive (client names, personal details, credentials). JSON and CSV can never be public, so use restricted for them. After saving, tell the person what was saved, who can read it and the link, and on a free account when the link expires. If a limit or an error stops the save, say so plainly; do not publish a listed public document instead, and do not say it was saved when it was not.

If the person may already have a document on this topic, you can look with list_documents and update that one (append_to_document or edit_document when available, otherwise update_document) rather than make a copy.

If the result says the person needs to accept the Terms, show them the message and its link, wait until they say it is done, then try again. Only they can accept, in their own browser. You cannot accept for them, and nothing was saved.

If the result lists warnings about parts of an HTML page that will not work for viewers, tell the user about them in plain words, skip any technical names, and offer to make the fix. Optional folder files the new document in a folder you can see (an id or a path such as "Handbook/Policies"; call map to see them). If no folder matches, the document is still saved at the top level and the result says so. Folders only help people find things; they never change who can open a document.

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": {
      "content": "<content>",
      "content_type": "<content_type>",
      "visibility": "<visibility>"
    },
    "name": "publish_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoCustom URL slug (e.g. "my-report"). Must be lowercase, 3–64 chars, letters/numbers/hyphens. Pro plan only.
titleNoDocument title. If omitted, Gryz will infer it from the content.
folderNoOptional: file the new document in this folder (an id from `map`, or a path such as "Handbook/Policies"). If no folder you can see matches, the document is saved at the top level.
contentYesThe full document content to publish (Markdown, HTML, SVG, CSV, Mermaid, or JSON)
visibilityYes"public" = shareable link anyone can open. "restricted" = private to your Gryz dashboard only. CSV and JSON documents must use "restricted" — the explore/trending feed only shows public prose/diagram/snippet content, not raw data.
content_typeYes"markdown" for Markdown content, "html" for HTML, "svg" for an SVG document (must start with an <svg> element), "csv" for tabular data (Pro and Pro Plus accounts only — every row must have the same number of columns as the header, and it can never be visibility: "public"), "mermaid" for Mermaid diagram syntax (Pro and Pro Plus accounts only — invalid syntax fails at render time, not publish time), "json" for JSON data (any signed-in account, but it can never be visibility: "public"). Default to "markdown" if unsure.
show_on_exploreNoFor public documents: set false to keep the document off Explore and search engines while the link still works for anyone who has it (an unlisted link). Omit or true = listed on Explore. Use false for a default save on a free account, or when the user asks to hide it. This is not security: anyone with the link can still read it.
expires_in_hoursNoFor public documents: hours until the link expires. Omit for your tier default (free account: 72h, Pro: 30d, Pro Plus: permanent). Clamped to your plan maximum. Ignored for private documents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare non-read-only, open-world, non-idempotent, non-destructive. The description adds substantial context beyond that: public links are world-reachable, retention varies by plan (24h/72h/30d/permanent), private docs never expire, JSON/CSV can never be public, Terms acceptance must happen in the user's browser and nothing was saved until then, and HTML warnings may mean broken viewer output. No contradiction with annotations — this is clearly a non-destructive write.

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?

Front-loaded with purpose, then behavioral rules, then error paths, in a sensible order. It is long and somewhat repetitive on folders (explained in the body and again in the schema), and the Terms/warnings paragraphs are detailed, but each block carries operational guidance an agent would otherwise have to guess.

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

Completeness5/5

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

No output schema exists, and the description compensates by stating that a URL is returned, that the result reports warnings, folder fallback, and Terms gating. Combined with tier defaults and failure handling ('do not say it was saved when it was not'), it is complete for an 8-parameter create tool.

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 100%, so the baseline is 3, but the description adds decision policy beyond the literal definitions: use `restricted` on Pro/Pro Plus by default, `public` with show_on_explore:false on free accounts, and `map` to discover folder ids/paths. It also clarifies that a non-matching folder still saves at top level rather than failing.

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?

Opens with a specific verb+resource+outcome: 'Publish Markdown or HTML to Gryz as a document and return its URL.' It names the accepted content formats and implicitly separates itself from the mutation siblings (append_to_document, edit_document, update_document) by being the creation path.

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 when-to-use ('save finished work the person would want again ... without waiting to be asked'), when-not ('short answers, drafts in progress or routine replies'), plan-specific defaults, and an ask-first rule for sensitive content. It also names alternatives: check list_documents and use append_to_document/edit_document/update_document instead of creating a duplicate.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.