{
  "service": "turso",
  "displayName": "Turso",
  "categories": [
    "Developer Tools",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Platform API Token",
      "placeholder": "eyJ...",
      "description": "Turso Platform API token used with the Authorization Bearer header. Create one with `turso auth api-tokens mint <name>` as documented here: https://docs.turso.tech/cli/auth/api-tokens/mint.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://turso.tech",
  "actions": [
    {
      "id": "turso.create_database",
      "service": "turso",
      "name": "create_database",
      "description": "Create a Turso database in one organization and group.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The Turso database name."
          },
          "group": {
            "type": "string",
            "minLength": 1,
            "description": "The Turso group where the database should be created."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug",
          "name",
          "group"
        ],
        "description": "The input payload for creating a Turso database."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "database": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "minLength": 1,
                "description": "The resource slug when Turso returns one."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "The resource name when Turso returns one."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "The resource type when Turso returns one."
              },
              "location": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "uuid": {
                "type": "string",
                "minLength": 1,
                "description": "The UUID when Turso returns one."
              },
              "group": {
                "type": "string",
                "minLength": 1,
                "description": "The group name when Turso returns one."
              },
              "hostname": {
                "type": "string",
                "minLength": 1,
                "description": "The database hostname when Turso returns one."
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Turso resource object returned by the Platform API."
              }
            },
            "additionalProperties": false,
            "required": [
              "raw"
            ],
            "description": "A normalized Turso Platform API resource."
          }
        },
        "additionalProperties": false,
        "required": [
          "database"
        ],
        "description": "The newly created Turso database."
      }
    },
    {
      "id": "turso.create_group",
      "service": "turso",
      "name": "create_group",
      "description": "Create a Turso group in one organization with a primary location.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The Turso group name."
          },
          "location": {
            "type": "string",
            "minLength": 1,
            "description": "The primary Turso location code for the group."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ],
                "description": "Enable every supported extension."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "One Turso extension name."
                },
                "description": "The explicit extension names to enable for new databases in the group.",
                "minItems": 1
              }
            ],
            "description": "The extensions to enable for new databases in the group."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug",
          "name",
          "location"
        ],
        "description": "The input payload for creating a Turso group."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "group": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "minLength": 1,
                "description": "The resource slug when Turso returns one."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "The resource name when Turso returns one."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "The resource type when Turso returns one."
              },
              "location": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "uuid": {
                "type": "string",
                "minLength": 1,
                "description": "The UUID when Turso returns one."
              },
              "group": {
                "type": "string",
                "minLength": 1,
                "description": "The group name when Turso returns one."
              },
              "hostname": {
                "type": "string",
                "minLength": 1,
                "description": "The database hostname when Turso returns one."
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Turso resource object returned by the Platform API."
              }
            },
            "additionalProperties": false,
            "required": [
              "raw"
            ],
            "description": "A normalized Turso Platform API resource."
          }
        },
        "additionalProperties": false,
        "required": [
          "group"
        ],
        "description": "The newly created Turso group."
      }
    },
    {
      "id": "turso.delete_database",
      "service": "turso",
      "name": "delete_database",
      "description": "Delete a Turso database from one organization.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The Turso database name."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug",
          "name"
        ],
        "description": "The input payload for deleting one Turso database."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean",
            "description": "Whether the connector finished the delete request successfully."
          }
        },
        "additionalProperties": false,
        "required": [
          "deleted"
        ],
        "description": "The normalized delete result returned by the connector."
      }
    },
    {
      "id": "turso.get_database",
      "service": "turso",
      "name": "get_database",
      "description": "Retrieve one Turso database by name within an organization.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The Turso database name."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug",
          "name"
        ],
        "description": "The input payload for retrieving one Turso database."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "database": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "minLength": 1,
                "description": "The resource slug when Turso returns one."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "The resource name when Turso returns one."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "The resource type when Turso returns one."
              },
              "location": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "uuid": {
                "type": "string",
                "minLength": 1,
                "description": "The UUID when Turso returns one."
              },
              "group": {
                "type": "string",
                "minLength": 1,
                "description": "The group name when Turso returns one."
              },
              "hostname": {
                "type": "string",
                "minLength": 1,
                "description": "The database hostname when Turso returns one."
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Turso resource object returned by the Platform API."
              }
            },
            "additionalProperties": false,
            "required": [
              "raw"
            ],
            "description": "A normalized Turso Platform API resource."
          }
        },
        "additionalProperties": false,
        "required": [
          "database"
        ],
        "description": "The Turso database returned by the Platform API."
      }
    },
    {
      "id": "turso.get_group",
      "service": "turso",
      "name": "get_group",
      "description": "Retrieve one Turso group by name within an organization.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The Turso group name."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug",
          "name"
        ],
        "description": "The input payload for retrieving one Turso group."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "group": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "minLength": 1,
                "description": "The resource slug when Turso returns one."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "The resource name when Turso returns one."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "The resource type when Turso returns one."
              },
              "location": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "uuid": {
                "type": "string",
                "minLength": 1,
                "description": "The UUID when Turso returns one."
              },
              "group": {
                "type": "string",
                "minLength": 1,
                "description": "The group name when Turso returns one."
              },
              "hostname": {
                "type": "string",
                "minLength": 1,
                "description": "The database hostname when Turso returns one."
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Turso resource object returned by the Platform API."
              }
            },
            "additionalProperties": false,
            "required": [
              "raw"
            ],
            "description": "A normalized Turso Platform API resource."
          }
        },
        "additionalProperties": false,
        "required": [
          "group"
        ],
        "description": "The Turso group returned by the Platform API."
      }
    },
    {
      "id": "turso.get_organization",
      "service": "turso",
      "name": "get_organization",
      "description": "Retrieve one Turso organization by slug.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug"
        ],
        "description": "The input payload for retrieving one organization."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "organization": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "minLength": 1,
                "description": "The resource slug when Turso returns one."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "The resource name when Turso returns one."
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "description": "The resource type when Turso returns one."
              },
              "location": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "uuid": {
                "type": "string",
                "minLength": 1,
                "description": "The UUID when Turso returns one."
              },
              "group": {
                "type": "string",
                "minLength": 1,
                "description": "The group name when Turso returns one."
              },
              "hostname": {
                "type": "string",
                "minLength": 1,
                "description": "The database hostname when Turso returns one."
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "description": "The location code when Turso returns one."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw Turso resource object returned by the Platform API."
              }
            },
            "additionalProperties": false,
            "required": [
              "raw"
            ],
            "description": "A normalized Turso Platform API resource."
          }
        },
        "additionalProperties": false,
        "required": [
          "organization"
        ],
        "description": "The organization returned by the Turso Platform API."
      }
    },
    {
      "id": "turso.list_databases",
      "service": "turso",
      "name": "list_databases",
      "description": "List Turso databases for one organization.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug"
        ],
        "description": "The input payload for listing Turso databases."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "databases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource slug when Turso returns one."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource name when Turso returns one."
                },
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource type when Turso returns one."
                },
                "location": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "uuid": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The UUID when Turso returns one."
                },
                "group": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The group name when Turso returns one."
                },
                "hostname": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The database hostname when Turso returns one."
                },
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Turso resource object returned by the Platform API."
                }
              },
              "additionalProperties": false,
              "required": [
                "raw"
              ],
              "description": "A normalized Turso Platform API resource."
            },
            "description": "The Turso databases belonging to the organization."
          }
        },
        "additionalProperties": false,
        "required": [
          "databases"
        ],
        "description": "The Turso databases returned for one organization."
      }
    },
    {
      "id": "turso.list_groups",
      "service": "turso",
      "name": "list_groups",
      "description": "List Turso groups for one organization.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "organizationSlug": {
            "type": "string",
            "minLength": 1,
            "description": "The organization slug used in the Turso API path."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizationSlug"
        ],
        "description": "The input payload for listing Turso groups."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource slug when Turso returns one."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource name when Turso returns one."
                },
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource type when Turso returns one."
                },
                "location": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "uuid": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The UUID when Turso returns one."
                },
                "group": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The group name when Turso returns one."
                },
                "hostname": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The database hostname when Turso returns one."
                },
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Turso resource object returned by the Platform API."
                }
              },
              "additionalProperties": false,
              "required": [
                "raw"
              ],
              "description": "A normalized Turso Platform API resource."
            },
            "description": "The Turso groups belonging to the organization."
          }
        },
        "additionalProperties": false,
        "required": [
          "groups"
        ],
        "description": "The Turso groups returned for one organization."
      }
    },
    {
      "id": "turso.list_locations",
      "service": "turso",
      "name": "list_locations",
      "description": "List available Turso locations that can host groups.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "The input payload for listing Turso locations."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource slug when Turso returns one."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource name when Turso returns one."
                },
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource type when Turso returns one."
                },
                "location": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "uuid": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The UUID when Turso returns one."
                },
                "group": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The group name when Turso returns one."
                },
                "hostname": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The database hostname when Turso returns one."
                },
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Turso resource object returned by the Platform API."
                }
              },
              "additionalProperties": false,
              "required": [
                "raw"
              ],
              "description": "A normalized Turso Platform API resource."
            },
            "description": "The available Turso locations."
          }
        },
        "additionalProperties": false,
        "required": [
          "locations"
        ],
        "description": "The locations returned by the Turso Platform API."
      }
    },
    {
      "id": "turso.list_organizations",
      "service": "turso",
      "name": "list_organizations",
      "description": "List organizations visible to the current Turso Platform API token.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "The input payload for listing Turso organizations."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "organizations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "slug": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource slug when Turso returns one."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource name when Turso returns one."
                },
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The resource type when Turso returns one."
                },
                "location": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "uuid": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The UUID when Turso returns one."
                },
                "group": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The group name when Turso returns one."
                },
                "hostname": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The database hostname when Turso returns one."
                },
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The location code when Turso returns one."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw Turso resource object returned by the Platform API."
                }
              },
              "additionalProperties": false,
              "required": [
                "raw"
              ],
              "description": "A normalized Turso Platform API resource."
            },
            "description": "The organizations visible to the current API token."
          }
        },
        "additionalProperties": false,
        "required": [
          "organizations"
        ],
        "description": "The organizations returned by the Turso Platform API."
      }
    }
  ]
}
