insert_row
InactiveTool of io.github.butterbase-ai/mcp
Insert a new row into a table using the auto-generated REST API. By default, this tool authenticates with the platform API key (butterbase_service role), which bypasses Row-Level Security. Inserts via this tool are not subject to RLS policies. To test RLS enforcement on writes, use the as_role and as_user parameters: - as_role: "anon" — simulate an anonymous insert (butterbase_anon role) - as_role: "user", as_user: "<user-uuid>" — simulate a specific end-user (butterbase_user role) Without as_role, this tool always runs as butterbase_service (full access, bypasses RLS). Use this to: - Add new records to tables (as admin/service — bypasses RLS) - Bootstrap initial data - Create test data Example: Input: { app_id: "app_abc123", table: "posts", data: { "title": "Hello World", "body": "This is my first post", "status": "draft" } } Output: { id: "uuid-1234", title: "Hello World", body: "This is my first post", status: "draft", created_at: "2024-01-15T10:00:00Z" } Notes: - Only provide columns that exist in the table schema - Columns with defaults (like id, created_at) can be omitted - The response includes the full inserted row with generated values Common errors: - VALIDATION_TABLE_NOT_FOUND: Table doesn't exist, use manage_schema (action: "get") to verify - VALIDATION_UNIQUE_CONSTRAINT_VIOLATION: Duplicate value in unique column - VALIDATION_FOREIGN_KEY_VIOLATION: Referenced record doesn't exist - VALIDATION_NOT_NULL_VIOLATION: Required field is missing Idempotency: Not idempotent - creates a new row each time.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"app_id",
"table",
"data"
],
"properties": {
"data": {
"type": "object",
"description": "Column values to insert",
"additionalProperties": {}
},
"table": {
"type": "string",
"description": "The table name"
},
"app_id": {
"type": "string",
"description": "The app ID"
},
"as_role": {
"enum": [
"anon",
"user"
],
"type": "string",
"description": "Simulate a specific role for RLS testing. \"anon\" for anonymous, \"user\" for authenticated end-user (requires as_user)."
},
"as_user": {
"type": "string",
"description": "User ID (UUID) to simulate when as_role is \"user\". Required when as_role is \"user\"."
}
},
"additionalProperties": false
}No endpoints wrapped at confidence ≥ 0.50.
Parent server
io.github.butterbase-ai/mcp
https://github.com/butterbase-ai/butterbase-oss
1/7 registries