Skip to main content
Glama

Onboard a new data source, step 1: create a data spec and get upload URL(s)

onboard_data_source

First step of setting up a new data integration: creates a data spec. By default (sourceType "file") this returns presigned upload URL(s) for the sample file (and optional format/target-schema file) — upload the file(s) per the returned instructions, then call finish_data_source_onboarding with the returned specId to kick off AI analysis and wait for it to complete.

Use sourceType "tables" instead when the request is to derive/aggregate data that is ALREADY loaded into workspace tables — e.g. "build me a daily summary of the customers table", or "set up a job that reads from the orders table and maintains a running total" — rather than loading a new file. It generates a SQL query (INSERT or MERGE, per merge) via AI instead of a Python parser, run through the query engine instead of a Glue job. There are never sample/format files, but targetOption still works the same three ways as sourceType "file" (see targetOption below) — so this call returns files: [] and you can call finish_data_source_onboarding immediately UNLESS targetOption is "target-schema-file", in which case it returns one upload URL for that file, same as the file-source path. The generated SQL automatically windows itself to rows added since the spec's last successful run. sourceType "tables" ALSO requires autoRefresh — how this spec stays up to date is not optional to decide, and must not be inferred from other jobs/triggers that happen to already exist in the workspace: ask the user whether it should re-run automatically whenever a specific upstream spec finishes loading ("spec_success" — the natural choice when the request is "run this after X finishes/loads"), on a plain cron-like cadence ("schedule" — the natural choice when the request is "run this every day/hour" with no mention of depending on another job), or stay manual-only ("none" — re-run later with run_data_job). If the request already states the timing unambiguously, that answers it; otherwise ask before calling this tool. Getting this wrong either way has a real cost: "none" means the summary silently goes stale until someone remembers to re-run it by hand, while an unwanted trigger keeps re-running (and charging credits for) a spec the user only wanted once. See autoRefresh below.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mergeNoUpsert instead of plain append when true (default false). For sourceType "tables": generates a MERGE statement instead of an INSERT — use true for a running aggregate/summary that updates existing rows. For sourceType "file" with targetOption "existing-tables": upserts loaded rows by the target table's inferred key instead of always inserting — use true whenever the request implies re-loading the same rows shouldn't create duplicates (e.g. "upsert on id", syncing/backfilling into a table that already has overlapping rows). Already automatic, no need to request it via additionalPrompt: target columns with no corresponding source column are null on newly inserted rows, and on a match keep their existing value rather than being nulled out.
specNameYesName for the new data spec.
sourceTypeNoDefaults to "file" (upload a sample file). Use "tables" to query existing workspace table(s) — see sourceTables — instead of loading a new file.
autoRefreshNosourceType "tables" only. Required for it — ask the user rather than assuming, and do not infer this from other jobs/triggers already in the workspace (a similar existing pipeline is not the user's answer for this one). "spec_success" re-runs this spec whenever autoRefreshUpstreamSpecName finishes loading; "schedule" re-runs it on autoRefreshFrequency; "none" leaves it manual-only (re-run later with run_data_job).
descriptionNoOptional description of the data spec.
workspaceIdNoWorkspace to act on. Defaults to your only workspace if you have exactly one.
sourceTablesNosourceType "tables" only: names of existing workspace tables the generated query reads from. Required for sourceType "tables".
targetOptionNoWhere transformed data should land — works the same for both sourceType values: "auto-infer" (default) lets the AI design the target table (for sourceType "tables", it designs the schema and the query together in one pass), "existing-tables" uses a table already in the workspace (requires targetTables), "target-schema-file" creates the table from a provided schema file (requires targetSchemaFileName).
targetTablesNoNames of existing workspace tables to target — exactly one entry for sourceType "tables" (the generated query has a single target), one or more for sourceType "file". Required when targetOption is "existing-tables". Optional otherwise: for "target-schema-file"/"auto-infer" the target table (and its name) is derived automatically — from the schema file, or AI-designed — unless you want to pin the name yourself, in which case pass exactly one entry.
formatFileNameNosourceType "file" only. File name of an optional format spec file.
sampleFileNameNosourceType "file" only (and required for it). File name of the sample data file (e.g. "customers.csv") — used to derive content-type, not read from disk.
additionalPromptNoInstructions for the AI. For sourceType "tables", describe what the query should compute from the source table(s) (e.g. "count signups per day per region"). This is stored on the spec verbatim and reused on every future re-analysis, so keep it to instructions that actually change behavior — do not restate default platform behavior (e.g. that unmapped target columns are null/preserved, see merge above) just to document it, since a note that's only true for one case (like new rows) can read as a standing instruction later and cause confusion on updates.
autoRefreshFrequencyNoRequired when autoRefresh is "schedule".
targetSchemaFileNameNoFile name of a target schema file. Required when targetOption is "target-schema-file", for either sourceType.
autoRefreshUpstreamSpecNameNoRequired when autoRefresh is "spec_success". The spec whose successful job completion should re-run this one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
specIdYes
messageYes
nextStepYesThe finish_data_source_onboarding call to make (once upload(s) are done, or immediately for sourceType "tables").
specNameYes
triggerIdNosourceType "tables" only, when autoRefresh was not "none": the auto-refresh trigger created alongside the spec.

TDQS

A4.9/5.0
Behavior5/5

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

With annotations all false, the description carries the full burden of explaining side effects. It details what is created, what is returned (upload URLs or empty files array), how the SQL query is generated for tables mode, and the real-world consequences (credits charged, stale summaries) of choosing the wrong autoRefresh value.

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 lengthy, but the complexity of the tool (15 params, two modes) justifies the detail. It front-loads the core purpose and organizes related information together. Could potentially be tightened with bullet formatting, but every sentence contributes useful guidance.

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 15 parameters, nested objects, enums, and an output schema, the description covers all major decision points, return flows, and next steps. It explains what to do after the call, what to expect in different sourceType/targetOption combinations, and when to ask the user for clarification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 100% schema coverage, the description adds substantial meaning to parameters like autoRefresh (explains the three options and when each is appropriate), merge (clarifies behavior for null columns), and targetOption. It provides decision guidance that goes far beyond the schema's field descriptions.

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 is the first step of onboarding a data source, creating a data spec and returning presigned upload URLs. It distinguishes itself from sibling tools like finish_data_source_onboarding by explicitly labeling itself as 'step 1' and describing the follow-up flow.

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 provides explicit guidance on when to use sourceType 'file' vs 'tables', with concrete examples ('build me a daily summary of the customers table'). It instructs the agent to ask the user for autoRefresh rather than inferring from existing workspace state, and warns about the costs of wrong choices.

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

A4.2/5.0
Disambiguation4/5

Most tools map to distinct lifecycle phases and the descriptions explicitly separate overlapping-sounding concepts, such as list_data versus submit_query and the generic call_dpf_api from dedicated tools. The three finish_* tools are similarly worded but each is clearly tied to a specific preceding operation, so confusion should be limited.

Naming Consistency4/5

The tool names are uniformly snake_case and mostly follow a readable verb_noun pattern like delete_data_spec, create_workspace, and run_data_job. It is not a perfect 5 because broader names like manage_connection and manage_trigger, the generic call_dpf_api, and list_my_workspaces with its pronoun make the naming pattern less predictable.

Tool Count4/5

At 16 tools, the set is just slightly above the ideal range, but the tools generally earn their place by representing distinct steps or workflow boundaries. The start/finish pairs create some apparent redundancy, but that is a natural consequence of the multi-step file-upload flow.

Completeness4/5

The toolset provides solid coverage of the core data-platform lifecycle: workspaces, data specs, jobs, connections, triggers, scheduled pulls, status polling, and SQL querying. Some additional DPF capabilities are only reachable through the generic call_dpf_api rather than dedicated tools, and billing mutations are explicitly left outside the MCP surface, so coverage is strong but not absolute.

Resources