Motherduck rest api

From motherduckdb/agent-skills · View interactive version

Motherduck rest api is an AI agent skill from the GitHub repository motherduckdb/agent-skills. Administer MotherDuck service accounts, tokens, Ducklings, and Dive embed sessions through the control-plane REST API.

How to use this skill

Skill file

REST API Administration

Source Of Truth

Default Posture

Workflow

  1. Identify whether the task is service-account provisioning, token management, Duckling sizing, active-account inspection, or Dive embedding.
  2. Resolve the admin token from the existing environment and identify the target username or dive_id; ask only when a required value cannot be discovered, and never invent production identifiers.
  3. Check token scope before calling token endpoints: users can create tokens for themselves, and admins can create tokens for service accounts, but admins cannot create tokens for other non-service-account members through the API.
  4. For Duckling config changes, read the current config first, then update both read_write and read_scaling because the PUT payload requires both.
  5. Preserve response fields that are only returned once, especially newly created token strings and embed session strings.
  6. Surface API errors by status and response body; do not hide 400, 401, 403, 404, or 500 responses behind success-shaped fallbacks.
  7. If the connected MotherDuck MCP server lists user-admin tools (such as create_service_account), prefer them over raw HTTP and call get_user_admin_guide first when it is listed. Many MCP setups do not expose them; then use the REST API directly. The MCP column in references/REST_API_GUIDE.md maps the names.

For answer, review, or planning requests, inspect and report without mutating the control plane. For create or update requests, perform the requested in-scope operation and verify the response; retain confirmation for destructive deletes or broader administrative changes.

References

Read only the reference sections needed for the current task.

Related Skills

Load related skills only for missing capabilities; reuse established context.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.