Skip to main content
Glama
hedging8563

TokenLab MCP Server

by hedging8563

Upload file

upload_file

Uploads files for batch processing, image editing, or the Anthropic Files API. Specify a purpose or enable Anthropic mode with the appropriate flag.

Instructions

Upload file Uploads a TokenLab/OpenAI-compatible batch or image file. With anthropic-beta: files-api-2025-04-14, uploads an Anthropic Files resource without a purpose field and returns Anthropic file metadata.

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.
purposeNoRequired in TokenLab/OpenAI-compatible mode: use batch for Batch API JSONL files, or user_data/vision for image edits. Omit in Anthropic Files mode.
anthropic-betaNoInclude files-api-2025-04-14 to use Anthropic Files API mode.
Behavior3/5

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

Annotations indicate readOnlyHint=false and openWorldHint=true, and the description confirms a write operation. It mentions returning metadata for Anthropic mode but does not elaborate on persistence or other side effects. It adds some context but falls short of full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences but starts with a redundant 'Upload file' that repeats the title. The second sentence is dense but informative. Could be trimmed for conciseness without losing clarity.

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

Completeness2/5

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

No output schema is provided, but the description only mentions the return value for Anthropic Files mode. For the primary TokenLab/OpenAI mode, it does not specify the return format (e.g., a file object with id). This is a significant gap in completeness.

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 100%, and the description adds meaningful context: explaining the purpose parameter's three values, the model parameter's default and binding behavior, and the anthropic-beta header's effect. This adds value beyond the schema alone.

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?

The description clearly states the tool uploads TokenLab/OpenAI-compatible batch or image files, and optionally Anthropic Files resource via a header. It distinguishes between two modes, but the initial repetition of 'Upload file' and mixing of modes could be clearer. No explicit sibling differentiation, but the purpose is well-defined.

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 description provides context on when to use each mode (TokenLab/OpenAI vs Anthropic Files) based on the anthropic-beta header. However, it does not guide the agent away from alternatives like create_image_file or edit_image_file, nor does it specify prerequisites or limitations.

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