Skip to main content
Glama

Upload file

upload_file

Upload a file to AssetLab storage by sending its bytes inline (base64). The AssetLab backend performs the storage upload server-side - use this tool when the client cannot PUT directly to Supabase Storage (e.g. Claude integrations whose outbound network blocks arbitrary supabase.co hosts). Returns { path, bucket, file_size, content_type }. After uploading, pass path to the appropriate record tool (update_asset image_url, create_asset_document file_path, update_work_order image_url, create_attachment file_url, create_project_document file_path, create_contract_document file_path). Server limit is ~10 MB decoded; MCP arg ceiling effectively caps file size around 700 KB-1 MB. For larger files, use create_upload_url instead. Requires upload_urls:write scope.

Input Schema

NameRequiredDescriptionDefault
bucketYesStorage bucket (required). Use "asset-images" for asset photos, "attachments" for work-order/PM attachments.
file_nameYesFile name including extension (required)
content_typeNoMIME type (e.g. image/jpeg, application/pdf). Defaults to application/octet-stream.
content_base64YesFile contents base64-encoded (required). Data URI prefixes like "data:image/png;base64," are stripped automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"https://json-schema.org/draft/2020-12/schema"New value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent, closed-world write, so the safety profile is covered. The description adds genuinely useful operational context beyond that: the ~10 MB server-side decode limit, the effective 700 KB-1 MB MCP argument ceiling, and the required upload_urls:write scope. The low score reflects that this is still a short set of caveats rather than a rich behavioral account of error/failure modes, and much of the text is routing rather than behavior.

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?

Front-loaded with purpose before caveats and alternatives, and each sentence carries information (mechanism, return shape, size limits, alternative, permission). The parenthetical list of six downstream record tools is dense and slightly scan-hostile, but it is actionable chaining guidance rather than filler.

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 a four-parameter write with no output schema, the description compensates by naming the return object ({ path, bucket, file_size, content_type }), the size ceiling, the required scope, the fallback tool, and the follow-up consumers of path. An agent has everything needed to decide, call, and chain this tool.

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%, so the schema already documents bucket, file_name, content_type and content_base64 including the data-URI stripping rule. The description adds only the base64-inline framing, which the schema already states, so it does not meaningfully extend parameter semantics beyond the documented baseline.

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?

Opens with a specific verb+resource ('Upload a file to AssetLab storage') and immediately clarifies the transport mechanism (inline base64, server-side upload), which is the key differentiator from a presigned-URL flow. It also names the return shape, so the agent knows exactly what this tool produces.

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?

Gives an explicit use condition ('use this tool when the client cannot PUT directly to Supabase Storage, e.g. Claude integrations whose outbound network blocks arbitrary supabase.co hosts') and an explicit alternative for the out-of-scope case ('For larger files, use create_upload_url instead'). It further routes the agent downstream by listing which record tools consume the returned path.

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