Skip to main content
Glama

Upload a file to a Docmost page

upload_attachment

Uploads a local image or file up to 50 MB to a Docmost page, returning its URL and Markdown image or link to insert into page content.

Instructions

Uploads a local image or file of up to 50 MB to a page and returns its URL and a Markdown image or link to place in the page with replace_page_text or update_page.

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": {
      "pageId": "<pageId>",
      "filePath": "<filePath>"
    },
    "name": "upload_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYesPage id, slug id, or the full page URL copied from the browser.
altTextNoAlt text for an image, or link text for another file; defaults to the file name.
filePathYesPath to the file on the machine running this server; ~ means the home directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, open-world behavior; the description adds the 50 MB size limit and the return payload, both of which the annotations do not convey. It does not spell out that repeat uploads create duplicates or what error surfaces on oversize files, so it is good 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?

A single sentence with the size constraint and the return value front-loaded, and no filler. Every clause carries information an agent needs before calling.

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?

For a three-parameter upload tool with no output schema, the definition covers the size limit, the local-path semantics, and the shape of the return value along with the follow-up tools. Nothing essential for a correct first call is missing.

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 100%, so pageId, altText, and filePath are already documented in the input schema, including the '~' home-directory convention. The description adds only the indirect hint that altText drives whether an image or link Markdown is produced, which is largely restated from the schema.

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 and resource ('Uploads a local image or file ... to a page') plus the 50 MB cap and what comes back (URL and Markdown snippet). That is clearly distinguishable from siblings like list_attachments, delete_attachment, and the page-editing tools it points to.

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?

Gives explicit downstream guidance: use the returned Markdown with replace_page_text or update_page to place it in the page, which tells the agent this tool does not insert content itself. It does not name when NOT to use it or contrast with other ingestion paths such as import_pages, so it falls short of full routing guidance.

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