Skip to main content
Glama

create_upload_session

Get a binary upload URL for local image files to avoid base64 corruption. PUT raw bytes to the returned URL and receive a file_id for vision tools.

Instructions

Returns upload instructions for the binary side channel (use this to analyze LOCAL image files without base64 corruption). Before uploading, verify the local file exists and is non-empty with Bash (e.g. ls -la <path> or test -f <path> && stat -c %s <path>). Then PUT the raw bytes to the returned upload_url with curl --data-binary (NOT base64); the response gives a file_id to pass to any vision tool. Stateless -- call once to learn the endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mime_typeNoMIME type of the image you will upload. Used in the curl Content-Type header.image/png
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses the stateless nature ('Stateless -- call once'), the expected HTTP interaction, and the requirement to verify the local file before upload. It also clarifies the return payload includes an upload_url and that the response yields a file_id.

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?

The description is under six sentences and front-loaded with the purpose. Each sentence adds distinct value: purpose, prerequisite verification, upload method, and statelessness.

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 one-parameter, no-output-schema tool, the description fully explains the workflow and what the caller will receive (upload_url, then file_id). It is self-contained for the intended local-file upload scenario.

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%; the single mime_type parameter already has a description and enum. The tool description adds no additional parameter semantics but also doesn't need to.

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 clearly states the tool 'returns upload instructions for the binary side channel' and explicitly positions it for analyzing local image files while avoiding base64 corruption. This distinguishes it from sibling vision-analysis tools, which analyze already-uploaded images.

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?

It provides explicit when-to-use guidance ('use this to analyze LOCAL image files') and detailed prerequisites and steps: verify the file with Bash, then PUT raw bytes with curl --data-binary (NOT base64), and pass the resulting file_id to any vision tool. It also mentions the tool is stateless and can be called once.

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/xyun1996/ocular'

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