> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Turso

> Turso is a fully managed database platform built on libSQL, offering serverless SQLite databases with global replication and low-latency access.

![Turso logo](https://mintcdn.com/composio-preview/IA0_SoMcsWt17HEC/images/toolkits/turso.svg?fit=max\&auto=format\&n=IA0_SoMcsWt17HEC\&q=85\&s=5b041d71f68dc3df4a057cdee723e082)

* **Category:** databases
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 3
* **Triggers:** 0
* **Slug:** `TURSO`
* **Version:** 20261101\_00

## Tools

> [accordion] Closest Region
>
> **Slug:** `TURSO_CLOSEST_REGION`
>
> Tool to get the closest Turso region based on client location. Use when you need to minimize latency by selecting the nearest deployment region.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Listen To Changes
>
> **Slug:** `TURSO_LISTEN_TO_CHANGES`
>
> Listen for committed insert, update, or delete events on a table in a Turso database, using its database-specific URL. Returns up to 25 nonempty event lines.
>
> #### Input Parameters
>
> **table** `string` *required*
>
> Name of the table to listen for changes on (e.g., 'users', 'orders')
>
> **action** `string ("insert" | "update" | "delete")` *required*
>
> Type of change event to listen for: 'insert' (new rows), 'update' (modified rows), or 'delete' (removed rows)
>
> **database\_url** `string` *required*
>
> The database-specific URL to connect to (e.g., '[https://mydb-myorg.turso.io](https://mydb-myorg.turso.io)'). This is NOT the platform API URL (api.turso.tech). Get this from the 'hostname' field when listing databases via the Platform API.
>
> **database\_token** `string`
>
> Optional database-specific JWT token for authentication. If not provided, a token will be automatically generated using the Platform API. You can create one via POST /v1/organizations/\{org}/databases/\{db}/auth/tokens
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Validate API Token
>
> **Slug:** `TURSO_VALIDATE_API_TOKEN`
>
> Validate the configured Turso API token through the Platform API and retrieve its expiration information. Pipeline mode checks a database using a configurable SQL statement, which can modify data; it does not provide token expiration information.
>
> #### Input Parameters
>
> **mode** `string`
>
> Validation mode: 'platform' (recommended) validates via the Platform API at [https://api.turso.tech/v1/auth/validate](https://api.turso.tech/v1/auth/validate) and returns token expiration. 'pipeline' validates by executing a health-check SQL query against a database URL (requires a database-specific base\_url like https\://\<db>-\<user>.turso.io). 'auto' tries platform first, falling back to pipeline on failure.
>
> **health\_sql** `string`
>
> SQL statement to execute for health validation when mode is 'pipeline' or during 'auto' fallback. Only used when validating against a database instance.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
