Skip to main content
Glama

upload training file

upload_training_file

Upload a JSONL training or validation file to receive a provider_file_id for referencing in fine-tuning job creation.

Instructions

Upload a JSONL training (or validation) file for fine-tuning; the returned provider_file_id is what a job creation references. POST /v1/fine_tuning/files (API-key scope: platform:write). Returns: 201 {id, provider_file_id, filename, bytes, purpose:"fine-tune", created_at}. Use provider_file_id (not id) as training.file_id / training_file_id / validation_file_id in POST /v1/fine_tuning/jobs. Notes: Request must be multipart/form-data with a 'file' field — 400 "Expected multipart/form-data with a 'file' field" / "Missing 'file' field" otherwise. Requires OWNER/ADMIN minting user (403). Rate limited per workspace: 20 uploads per 60s → 429 with Retry-After. Feature-flag gated (404 when fineTuning is off). Storage is billable; the upload itself does not charge the wallet. Scopes are not enforced on this route today (see list_training_files).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesmultipart/form-data field named "file" (NOT JSON). The file's own name is used as the filename (falls back to "training.jsonl" when empty). Empty files are refused (400 "File is empty").
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

The annotations only provide generic hints (readOnlyHint false, idempotentHint false), so the description carries the burden and fully delivers. It discloses the API route, required auth scope, OWNER/ADMIN minting requirement, multipart request constraints, rate limits, feature-flag gating, billing implications, and unenforced scopes — far beyond the annotation signals.

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 dense but every sentence carries distinct operational value: purpose, return value, downstream usage, request format, auth, rate limits, feature flag, and billing. It front-loads the core purpose and return contract before diving into edge cases.

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?

There is no output schema, yet the description provides the 201 response shape and the key field to use downstream. It also covers failure modes, rate limits, permissions, feature-flag gating, scopes, and billing, making the tool fully callable without external documentation.

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% and the schema already documents the only parameter, 'file', including the multipart field requirement and empty-file behavior. The description adds surrounding error messages and operational context, but it does not significantly enrich the parameter semantics beyond what the schema already states.

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 names the exact operation — uploading a JSONL training or validation file for fine-tuning — and explains the returned provider_file_id is what job creation references. This clearly separates it from sibling tools like list_training_files and create_fine_tuning_job by tying it to the upload lifecycle step.

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?

It clearly states when this tool fits in the workflow: before creating a fine-tuning job, and it even specifies which fields in POST /v1/fine_tuning/jobs should use provider_file_id. It does not explicitly list when-not-to-use or alternatives, but there is no same-purpose sibling, so the context is unambiguous.

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

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/omnia-v/errorbar-mcp'

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