Skip to main content
Glama

Upload Blob

upload_blob

Uploads a file or blob to AFFiNE workspace storage, returning a blob key for later use; does not attach to documents.

Instructions

Upload a file or blob into AFFiNE workspace storage and return its blob key. This creates stored content but does not attach it to a document by itself.

Input Schema

NameRequiredDescriptionDefault
contentYesBlob content encoded according to the encoding field.
encodingNoContent encoding. Defaults to utf8; use base64 explicitly for binary data.utf8
filenameNoOptional filename stored with the upload. Defaults to a generated .bin name.
contentTypeNoOptional MIME type. Defaults to application/octet-stream.
workspaceIdYesAFFiNE workspace id that owns the blob.

Output Schema

NameRequiredDescriptionDefault
idNo
okNo
keyNo
codeNo
sizeNo
errorNo
detailsNo
encodingNo
filenameNo
causeCodeNo
retryableNo
uploadedAtNo
contentTypeNo
workspaceIdNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the 'creates stored content' sentence largely restates that. The genuinely additive detail is the non-attachment side effect, which warns agents about orphan blobs. No mention of size limits, quota, or duplicate handling despite idempotentHint=false.

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 sentences, front-loaded with the action and ending on the constraint that matters most. No filler.

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?

With annotations covering safety and an output schema covering the returned blob key, the description is close to sufficient for a one-shot upload. A pointer to blob cleanup/attachment follow-ups would close the remaining gap.

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% with per-field descriptions including the encoding enum and defaults, so the schema carries all parameter meaning. The description adds nothing about workspaceId, content, encoding, or filename.

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?

States a specific verb and resource ('upload a file or blob into AFFiNE workspace storage') plus the return value ('blob key'). The clause 'does not attach it to a document by itself' implicitly separates it from document/block tools like append_block, though no sibling is named.

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?

The note that the upload is not attached to a document implies a two-step workflow (upload, then attach), which is real routing guidance. However, it never states when to prefer this over alternatives nor mentions the follow-up tools (delete_blob, cleanup_blobs) that manage orphans.

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