# import_data

Import data into a Cloud SQL instance. If the file doesn't start with gs://, then the assumption is that the file is stored locally. If the file is local, then the file must be uploaded to Cloud Storage before you can make the actual import_data call. To upload the file to Cloud Storage, you can use the gcloud or gsutil commands. Before you upload the file to Cloud Storage, consider whether you want to use an existing bucket or create a new bucket in the provided project. After the file is uploaded to Cloud Storage, the instance service account must have sufficient permissions to read the uploaded file from the Cloud Storage bucket. This can be accomplished as follows: 1. Use the get_instance tool to get the email address of the instance service account. From the output of the tool, get the value of the serviceAccountEmailAddress field. 2. Grant the instance service account the storage.objectAdmin role on the provided Cloud Storage bucket. Use a command like gcloud storage buckets add-iam-policy-binding or a request to the Cloud Storage API. It can take from two to up to seven minutes or more for the role to be granted and the permissions to be propagated to the service account in Cloud Storage. If you encounter a permissions error after updatingthe IAM policy, then wait a few minutes and try again. After permissions are granted, you can import the data. We recommend that you leave optional parameters empty and use the system defaults. The file type can typically be determined by the file extension. For example, if the file is a SQL file, .sql or .csv for CSV file. The following is a sample SQL importContext for MySQL. { "uri": "gs://sample-gcs-bucket/sample-file.sql", "kind": "sql#importContext", "fileType": "SQL" } There is no database parameter present for MySQL since the database name is expected to be present in the SQL file. Specify only one URI. No other fields are required outside of importContext. For PostgreSQL, the database field is required. The following is a sample PostgreSQL importContext with the database field specified. { "uri": "gs://sample-gcs-bucket/sample-file.sql", "kind": "sql#importContext", "fileType": "SQL", "database": "sample-db" } The import_data tool returns a long-running operation. Use the get_operation tool to poll its status until the operation completes.

Agent View of the PolicyLayer registry record for `import_data`. HTML page: https://policylayer.com/tools/com-googleapis-sqladmin-mcp/import-data

## Facts

- Tool: `import_data`
- Server: Mcp (`https://sqladmin.googleapis.com/mcp`) — https://policylayer.com/tools/com-googleapis-sqladmin-mcp.md
- Homepage: https://github.com/https://sqladmin.googleapis.com/mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 4
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `body` | object | no |  |
| `project` | string | no | Project ID of the project that contains the instance. |
| `instance` | string | no | Cloud SQL instance ID. This does not include the project ID. |
| `location` | string | no | Optional. Region of the Cloud SQL instance. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "import_data",
    "arguments": {}
  }
}
```

## Why import_data is rated Medium

An AI agent can call import_data faster than any human can review: one bad instruction and it creates or modifies resources in Mcp by the hundred, each call as confident as the last.

Risk signals: Accepts raw HTML/template content (body)

## Use case

AI agents use import_data to create or update resources in Mcp, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "import_data": {
      "limits": [
        {
          "counter": "import_data_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Mcp (14)

- `execute_sql` — Execute — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/execute-sql.md
- `execute_sql_readonly` — Execute — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/execute-sql-readonly.md
- `postgres_upgrade_precheck` — Execute — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/postgres-upgrade-precheck.md
- `get_instance` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/get-instance.md
- `get_operation` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/get-operation.md
- `list_instances` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/list-instances.md
- `list_users` — Read — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/list-users.md
- `clone_instance` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/clone-instance.md
- `create_backup` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/create-backup.md
- `create_instance` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/create-instance.md
- `create_user` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/create-user.md
- `restore_backup` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/restore-backup.md
- `update_instance` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/update-instance.md
- `update_user` — Write — https://policylayer.com/tools/com-googleapis-sqladmin-mcp/update-user.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-googleapis-sqladmin-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-googleapis-sqladmin-mcp
