Skip to main content
Glama

Upload file to Wiki page

wiki_attachments_upload

Upload one small file and attach it to a wiki page in a single call.

Instructions

Upload one small file and attach it to a wiki page in a single call.

Runs the whole pipeline end to end: opens an upload session sized to data, PUTs the bytes as a single part, finishes the session, and attaches it to the page. Small-file path — for large files drive uploadsessions_create / uploadsessions_parts_upload (chunked) / uploadsessions_finish + attachments_attach yourself. Returns the newly-attached files.

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": {
      "page_id": "<page_id>",
      "file_name": "<file_name>",
      "data": "<data>"
    },
    "name": "wiki_attachments_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe file's bytes, base64-encoded.
dry_runNoSend nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).
page_idYesNumeric id of the page to attach the file to.
file_nameYesName to give the uploaded file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.142.2
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": false,
      +  "description": "Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).",
      +  "type": "boolean"
      +}
  2. First observedv0.67.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false and destructiveHint=false, so the description only needs to add beyond that, and it does: it discloses the four-step pipeline (open session, single-part PUT, finish, attach) and that it returns the newly-attached files. The main gap is that "small file" is never quantified, so an agent has no threshold for switching to the chunked path, and partial-failure behavior (e.g., session created but attach fails) is unmentioned.

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?

Two short paragraphs, front-loaded with the one-line purpose before the pipeline detail and the large-file alternative. Every clause carries information; the backticked sibling names make the contrast scannable.

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 mutating, non-idempotent tool with no output schema, the definition covers the mechanism, the alternative path and the return value (newly-attached files) — enough to call it correctly. It falls short only on a size threshold for "small" and on what happens to an opened session if the attach step fails.

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 description coverage is 100%, including the base64 format for data and the dry_run response shape, so the schema does the heavy lifting and baseline 3 applies. The description adds only the implicit note that the upload session is sized to ``data``; it gives no guidance on file_name collisions or dry_run usage.

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 (upload/attach) and resource (a file on a wiki page) plus the scope constraint "one small file ... in a single call." That phrasing immediately separates it from the chunked upload-session siblings without needing to open their schemas.

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?

Explicitly frames the tool as the small-file path and names the exact alternative pipeline (uploadsessions_create / parts_upload / uploadsessions_finish + attachments_attach) for large files. An agent knows both when to pick this and when to avoid it.

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

Deploy Server

Other Tools