Skip to main content
Glama

upload_data_source

Create a new data source from an inline base64-encoded file (CSV, TSV, JSON, Excel, TXT, PDF). The file goes through the same validation and preprocessing as a web upload. Returns the data_source_id you can pass to run_analysis as soon as preprocessing completes (poll get_data_source_schema for readiness or pass wait_seconds to block here).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name for the new data source. Shown in the web app and in subsequent list_data_sources calls.
formatYesFile format. Drives MIME detection and the preprocessing route inside clariBI. csv covers comma-separated; tsv is tab-separated; xlsx is modern Excel; json must be a top-level array of objects or a single object.
data_base64YesBase64-encoded file contents. Maximum 25 MB encoded (~18 MB raw). For larger payloads, host the file at a public URL and use ingest_url_data_source.
descriptionNoOptional human-readable description. Surfaces in the web app and in get_data_source_schema.
wait_secondsNoHow long (seconds) to wait for preprocessing to finish before returning. 0 returns immediately with status="preprocessing"; the caller polls get_data_source_schema or list_data_sources.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
formatYesDetected file format (csv, json, xlsx, ...).
statusYesPreprocessing status. Poll get_data_source_schema until "active".
web_urlNo
raw_data_idYes
bytes_uploadedYes
data_source_idYes

TDQS

A4.7/5.0
Behavior5/5

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

The description reveals critical behavioral traits not captured by the false-only annotations: the file undergoes the same validation and preprocessing as a web upload, the tool returns a data_source_id asynchronously, and the caller must poll or use wait_seconds to await completion. This sets clear expectations about state changes and timing, going well beyond the minimal annotation hints.

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?

Two sentences deliver purpose, formats, validation behavior, return value, and async guidance without redundancy. Each clause adds critical information, and the description is front-loaded with the primary function. No filler or repetition.

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 tool with asynchronous preprocessing, multiple supported formats, and size constraints, the description is impressively complete. It explains the return value, how to handle readiness (poll or wait), and the alternative for large payloads. With an output schema present, there is no need to detail the response structure further.

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?

The input schema already provides 100% coverage with rich descriptions for all five parameters, including format specifics, size limits, and wait_seconds semantics. The tool description adds contextual value by linking data_source_id to run_analysis but does not meaningfully elaborate on individual parameters beyond what the schema states. Baseline 3 is appropriate.

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 opens with 'Create a new data source from an inline base64-encoded file' – a specific verb and resource with the exact mechanism. It enumerates supported formats and explicitly mentions returning a data_source_id, making the tool's purpose unmistakable. It also distinguishes itself from the sibling ingest_url_data_source by contrasting inline base64 with URL-based ingestion.

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?

The description gives explicit when-to-use guidance: 'For larger payloads, host the file at a public URL and use ingest_url_data_source.' It also explains the async workflow: either pass wait_seconds to block or poll get_data_source_schema for readiness. This clearly directs the agent on choosing this tool over alternatives and how to handle the asynchronous nature.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are generally distinct by resource and action, but a few status polling tools (check_integration_status, get_analysis_status) could be confused without careful reading; descriptions clarify the difference.

Naming Consistency4/5

Most tools use a consistent verb_noun snake_case pattern, but there is minor variation (e.g., 'check' vs 'get' for status, and some compound nouns like 'request_oauth_integration_url').

Tool Count4/5

26 tools is slightly above the typical range but appropriate for a comprehensive BI platform covering data ingestion, analysis, forecasting, reports, dashboards, and account management; each tool has a clear purpose.

Completeness2/5

The tool surface is heavily read-oriented, lacking update and delete operations for most resources (data sources, dashboards, reports, forecasts). This leaves significant lifecycle management gaps for an agent.

Resources