Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

upload_asset

Upload base64-encoded file content as a SiYuan asset with a filename and optional assets directory. Use it to add images or files to your workspace for embedding in documents.

Instructions

Upload a file as a SiYuan asset. Provide base64-encoded file content.

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": {
      "name": "<name>",
      "data": "<data>"
    },
    "name": "upload_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesBase64-encoded file content
nameYesFilename with extension (e.g. "image.png")
assetsDirPathNoTarget directory in assets/ (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and it discloses almost nothing beyond the input format. It does not say whether an existing asset with the same name is overwritten, whether there are size limits, where the file lands by default, or what the response contains (e.g., the resulting asset path, which an agent would need to reference the upload later). For a write/upload operation with zero annotation coverage this is a significant gap.

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?

Two short sentences, front-loaded with the action and followed by the key input constraint. No filler or redundancy. It is efficient, though the same space could have carried one or two behavioral facts at no cost to brevity.

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

Completeness2/5

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

A three-parameter mutation tool with no annotations and no output schema needs the description to explain side effects and results, and this one does not. Most critically, it never states what comes back after the upload (the asset path or identifier), which is essential for chaining the call. Adequate for identifying the tool, insufficient for invoking it reliably.

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%, with all three parameters (name, data, assetsDirPath) individually documented, so the schema already does the heavy lifting. The description only restates the base64 requirement for 'data' and adds no new meaning about naming collisions or how assetsDirPath interacts with defaults. A baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb+resource combination ('Upload a file as a SiYuan asset') and immediately clarifies the required content encoding. This is clear enough for an agent to know exactly what the tool does. It does not differentiate from any sibling tool, but none of the listed siblings operate on assets, so the risk of confusion is low.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the nature of the tool: use it when a file needs to be stored in the SiYuan workspace. There is no explicit statement of when to use it versus alternatives, no prerequisites, and no exclusions (e.g., whether it overwrites an existing file with the same name). Nothing is misleading, but guidance is only implied.

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