importDatabaseRows
Load a CSV, TSV or Excel file into a table: an existing table, or a new one (newTable) whose fields are made from the file's columns. Call getDatabase with table first when the table exists: columns match its fields by exact name. For a small amount of data pass csv (text with a header row) and t...
This record as markdown: /tools/io-stablebaseline-sb/importdatabaserows.md
What importDatabaseRows does on Stable Baseline
AI agents use importDatabaseRows to create or update resources in Stable Baseline, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Stable Baseline environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
csv | string | — | Small data inline: comma or tab separated text, the first line being the column names. |
table | string | — | An existing table to add the rows to (id or name). |
dryRun | boolean | — | Check the file and the column mapping without adding anything. |
mapping | object | — | Column name -> field name or key to load it into, or null to skip the column. |
fileName | string | — | Open an upload for this file (.csv, .tsv, .txt, .xlsx). |
importId | string | — | Continue an import: from the upload answer, then from each answer until status is done. |
newTable | string | — | Make a new table with this name from the file's columns instead. |
sizeBytes | integer | — | The file's size, checked against the plan's import limit before you upload. |
databaseId | string | — | The database's id, friendly id (DB-12) or exact name. Not needed with importId. |
createFields | boolean | — | Add a text field for each column that matches no field (a new table always gets its fields). |
Parameters from the server's own tool schema.
Why importDatabaseRows is rated Medium
An AI agent can call importDatabaseRows faster than any human can review: one bad instruction and it creates or modifies resources in Stable Baseline by the hundred, each call as confident as the last.
Risk signalsAccepts file system path (fileName) · High parameter count (10 properties)
Attacks that exploit this kind of access
The rule that runs importDatabaseRows safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Stable Baseline, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For importDatabaseRows, this is the rule to start with:
importDatabaseRows stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Stable Baseline, apply this rule, and every importDatabaseRows call is checked against it from then on.
Questions about importDatabaseRows
Load a CSV, TSV or Excel file into a table: an existing table, or a new one (newTable) whose fields are made from the file's columns. Call getDatabase with table first when the table exists: columns match its fields by exact name. For a small amount of data pass csv (text with a header row) and the rows are added at once. For a file, pass fileName (and sizeBytes): you get an uploadUrl; send the file's bytes there with an HTTP PUT, then call again with the importId, and again with each importId the answer returns, until status is done. Columns match fields by name; mapping renames or skips columns; createFields adds a text field for each column that matches no field. dryRun checks the file and the columns without adding anything. The organisation's plan limits the size of one import. getDatabaseGuide topic importing. It is categorised as a Write tool in the Stable Baseline MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
importDatabaseRows accepts 10 parameters: csv, table, dryRun, mapping, fileName, importId, newTable, sizeBytes, databaseId, createFields. The full parameter table on this page comes from the server's own tool schema.
Register the Stable Baseline MCP server in PolicyLayer and add a rule for importDatabaseRows: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Stable Baseline. Nothing to install.
importDatabaseRows is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the importDatabaseRows rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for importDatabaseRows. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
importDatabaseRows is provided by the Stable Baseline MCP server (https://api.stablebaseline.io/functions/v1/cloud-serve/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Stable Baseline, and thousands of servers like it.
This server
Across the catalogue