Skip to main content
Glama

add_wiki_attachment

Attach a file to a wiki page, identified by 'pageId' or by 'spaceKey' + 'title': pass its bytes as 'contentBase64', or its content as 'text' when the file is text. Re-attaching a filename the page already has replaces its bytes and bumps its version, as the wiki does everywhere else, so retrying this call cannot leave two copies. An attached file is not on the page until the body references it — the answer hands you the Markdown to add with update_wiki_page. An image may also carry a dark-theme version, attached as the same name with '-dark' before the extension (diagram.svg + diagram-dark.svg); the body still references the plain name. Requires permission to edit the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoThe file's content as text, stored as UTF-8 — for a log, CSV or Markdown file you are writing here. Alternative to 'contentBase64'; passing both is refused.
titleNoExact page title, when identifying the page by title.
pageIdNoPage id (as returned by search_wiki).
commentNoShort note about this upload, shown in the page's attachment list.
filenameYesFile name to store, e.g. 'diagram.png'. Any directory part is dropped.
mimeTypeNoContent type to record for the listing, e.g. 'text/csv'. Ignored when the bytes identify themselves, and never used to serve the file.
spaceKeyNoSpace key, when identifying the page by title.
contentBase64NoThe file's bytes, base64-encoded (a 'data:…;base64,…' URL is accepted and unwrapped). Use 'text' instead when the file is text.

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?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so thoroughly. It discloses idempotent re-attachment behavior (replacing bytes and bumping version), the fact that attaching does not place the file on the page until referenced, the dark-theme variant naming, and the permission requirement ('Requires permission to edit the page'). This goes well beyond a minimal description.

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?

The description is dense but well-organized: it front-loads the core action and identification methods, then covers content modes, re-attachment behavior, the page-reference caveat, dark-theme naming, and permissions. Every sentence adds value, though the length is slightly high for a tool whose schema already documents parameters. Still, the extra sentences are all behaviorally relevant.

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 an 8-parameter tool with no annotations and no output schema, the description is remarkably complete. It covers identification, content input, idempotency, the need to follow up with update_wiki_page, dark-theme variants, and permissions. An agent has everything needed to invoke it correctly and to understand the post-conditions.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful semantics beyond the schema: it explains the relationship between 'text' and 'contentBase64' (mutually exclusive, both refused if passed), the dark-theme suffix convention for filenames, and the fact that directory parts are dropped. It does not enumerate every parameter, but the schema already covers them, and the description clarifies the non-obvious interactions.

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?

The description states a specific verb ('Attach'), a resource ('a file to a wiki page'), and the two identification methods ('pageId' or 'spaceKey' + 'title'). It also distinguishes the content input modes ('contentBase64' vs 'text'). This clearly differentiates it from siblings like add_attachment (generic attachment) and get_wiki_attachment (retrieval).

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?

The description explicitly explains when to use this tool: to attach a file to a wiki page, and it names the follow-up tool (update_wiki_page) for adding the Markdown reference to the page body. It also clarifies the alternative content input modes and the dark-theme naming convention, giving an agent enough context to select and invoke it correctly.

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.

Resources