Skip to main content
Glama

upload_asset

Upload an asset to the brand library from a local file path or base64-encoded content. Use filePath for local files to avoid truncation; for large files, use the chunked upload flow.

Instructions

Upload an asset to the brand library from a local file path or base64-encoded content. Prefer filePath for local files: the server reads and base64-encodes the file itself, avoiding truncation of large base64 strings over the tool_call boundary. fileBase64 is still supported for remote/inline use where no local path is available. For large files over the remote/HTTP transport, a single fileBase64 string can get truncated crossing the LLM→tool_call boundary — use the chunked flow instead: upload_asset_begin → upload_asset_chunk (× N) → upload_asset_finish. Provide exactly one of filePath or fileBase64. Returns the new asset ID and URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDisplay name for the asset
tagsNoTags to apply, e.g. ['logo', 'brand']
brandIdNoBrand ID (defaults to active brand)
fileNameNoOriginal file name including extension, e.g. 'logo.png'. Derived from filePath if omitted.
filePathNoAbsolute path to a local file to upload. Preferred over fileBase64 for local files.
mimeTypeNoMIME type of the file, e.g. 'image/png'
fileBase64NoBase64-encoded file content. Use filePath instead when the file is local.
descriptionNo
Behavior4/5

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

No annotations are provided, so the description carries the full transparency burden. It discloses server-side base64 encoding, the truncation risk crossing the LLM→tool_call boundary, and states the return value (asset ID and URL). However, it doesn't mention auth requirements or error handling, so it's not a perfect 5.

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 front-loaded with the core purpose and uses six sentences to convey necessary caveats and alternatives. Though slightly verbose, every sentence addresses a practical concern (truncation, chunked flow, exclusivity), so it earns its length.

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 an 8-parameter tool with no annotations or output schema, the description covers the key decision (filePath vs fileBase64), references the chunked flow, and states the return. Other parameters are adequately described in the schema, and the description integrates well with sibling tools like list_assets and upload_asset_abort.

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 coverage is 88%, so the baseline is 3. The description adds significant semantic value by explaining why filePath is preferred over fileBase64 and enforcing the constraint 'Provide exactly one of filePath or fileBase64,' which goes beyond the schema descriptions.

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 'Upload an asset to the brand library from a local file path or base64-encoded content' with a clear verb and resource. It also distinguishes itself from the chunked upload flow by explicitly naming upload_asset_begin/chunk/finish for large files, and implies contrast with import_asset_from_url.

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 instructs to 'Prefer filePath for local files' and describes when fileBase64 is appropriate for 'remote/inline use.' It also clearly directs users to the chunked flow for large files over remote/HTTP transport, providing a concrete alternative with the sequence upload_asset_begin → upload_asset_chunk → upload_asset_finish.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitsandtea/postking-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server