Skip to main content
Glama

Upload file

upload_file

Use to upload JSONL files for batch API processing or image files for edit requests, returning a file_id for subsequent operations.

Instructions

Upload file Uploads a JSONL batch input file or an image input file that can be referenced by file_id in supported image edit requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPass local file path.
modelNoOptional TokenLab extension for image file uploads. Defaults to gpt-image-2 and binds the returned file_id to the selected image-edit configuration.
purposeYesUse batch for Batch API JSONL files. Use user_data or vision for image files that will be referenced from image edits.
Behavior3/5

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

The description adds behavioral context by stating that uploaded files can be referenced by file_id in image edits. However, it does not disclose other important traits like whether the upload overwrites existing files, file size limits, or that it returns a file_id. Annotations already indicate non-read-only, so this is adequate but not thorough.

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 a single sentence, but it starts with a redundant 'Upload file' phrase. It is front-loaded with the most important information and avoids unnecessary words, though minor repetition could be removed.

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

Completeness3/5

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

Given the presence of annotations and a complete schema, the description covers the primary use case but lacks details on return format, error handling, or size constraints. For a tool without an output schema, more behavioral completeness would be beneficial, but it is minimally adequate.

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%, so the schema already describes all three parameters well. The description does not elaborate on individual parameters beyond grouping them (batch vs image). It adds marginal value by tying the purpose to the file_id usage, but does not compensate for the lack of parameter-specific details beyond the schema.

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's purpose: uploading a JSONL batch input file or an image input file for referencing by file_id. It specifies the resource (file) and action (upload), and distinguishes between two use cases (batch vs image), making it easy for an agent to select this tool over siblings like create_image_file.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (for batch or image files) but does not explicitly state when not to use it or mention alternative tools (e.g., create_image_file for generation). It implies usage for files that need to be referenced by file_id, which is helpful.

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/hedging8563/tokenlab-mcp-server'

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