Skip to main content
Glama

MCP Turso

Version Node.js TypeScript License: MIT

English | Português

Português

Sobre o Projeto

MCP Turso é a primeira solução completa para integrar bancos de dados Turso Cloud com o Model Context Protocol (MCP) no VSCode. Este projeto permite que o GitHub Copilot interaja diretamente com seus bancos Turso através de ferramentas MCP, facilitando operações CRUD e consultas SQL.

Por que este projeto existe?

  • Primeira solução MCP para Turso: Não existia nenhuma implementação disponível para VSCODE

  • Integração nativa com VSCode: Funciona perfeitamente com o GitHub Copilot

  • Fácil configuração: Setup simples para Windows

  • Ferramentas completas: Suporte a todas as operações básicas de banco de dados

Related MCP server: mcp-turso-cloud

Arquitetura MCP

Como o MCP Funciona

O Model Context Protocol (MCP) é um protocolo aberto que permite aos Large Language Models (LLMs) se conectarem a ferramentas e dados externos de forma padronizada.

Componentes Principais:

  • Cliente MCP: Aplicação que usa o protocolo (ex: GitHub Copilot, Claude Desktop)

  • Servidor MCP: Programa que expõe ferramentas e recursos (este projeto)

  • Comunicação: Via stdio (stdin/stdout) usando JSON-RPC 2.0

Fluxo de Funcionamento:

  1. Cliente MCP inicia o servidor

  2. Servidor registra suas ferramentas via ListTools

  3. Cliente pode chamar ferramentas via CallTool

  4. Servidor executa a operação e retorna resultado

Segurança:

  • Queries SELECT são validadas automaticamente

  • Operações de escrita usam prepared statements

  • Comunicação local via stdio (não expõe portas de rede)

Estrutura do Projeto

mcp-turso/
├── src/
│   └── index.ts          # Servidor MCP principal
├── dist/                 # Código compilado (gerado)
├── .env                  # Variáveis de ambiente (não versionado)
├── package.json          # Dependências e scripts
├── tsconfig.json         # Configuração TypeScript
└── README.md             # Esta documentação

Pré-requisitos

  • Node.js 18+ (compatível com as dependências)

  • Uma conta Turso Cloud com banco de dados ativo

  • VSCode com GitHub Copilot instalado

Instalação

Passo 1: Criar o projeto

# Criar pasta do projeto
mkdir mcp-turso
cd mcp-turso

# Inicializar projeto Node.js
npm init -y

Passo 2: Instalar dependências

npm install @modelcontextprotocol/sdk @libsql/client dotenv
npm install -D typescript @types/node tsx

Passo 3: Configurar TypeScript

Crie o arquivo tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ES2022",
    "moduleResolution": "bundler",
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}

Passo 4: Criar o código do servidor

Crie a pasta src e o arquivo src/index.ts com o código fornecido no repositório.

Passo 5: Configurar package.json

Edite o package.json para incluir:

{
  "name": "mcp-turso",
  "version": "1.0.0",
  "type": "module",
  "bin": {
    "mcp-turso": "./dist/index.js"
  },
  "scripts": {
    "build": "tsc",
    "dev": "tsx src/index.ts",
    "start": "node dist/index.js"
  },
  "dependencies": {
    "@libsql/client": "^0.14.0",
    "@modelcontextprotocol/sdk": "^1.0.4",
    "dotenv": "^16.4.5"
  },
  "devDependencies": {
    "@types/node": "^22.10.2",
    "tsx": "^4.19.2",
    "typescript": "^5.7.2"
  }
}

Passo 6: Compilar o projeto

npm run build

Isso cria a pasta dist/ com o código JavaScript compilado.

Configuração

Variáveis de Ambiente

Crie um arquivo .env na raiz do projeto:

TURSO_DATABASE_URL=libsql://seu-banco.turso.io
TURSO_AUTH_TOKEN=seu-token-aqui

Para obter o token:

turso auth token

Configuração no VSCode

Passo 1: Criar arquivo MCP

Na raiz do seu projeto (não do mcp-turso), crie .vscode/mcp.json:

{
  "mcpServers": {
    "turso-": {
      "command": "node",
      "args": ["C:/caminho/completo/mcp-turso/dist/index.js"],
      "env": {
        "TURSO_DATABASE_URL": "libsql://seu-banco.turso.io",
        "TURSO_AUTH_TOKEN": "seu-token-aqui"
      }
    }
  }
}

Importante: Substitua C:/caminho/completo/ pelo caminho real onde você criou o projeto mcp-turso.

Passo 2: Reiniciar VSCode

Feche completamente o VSCode e reabra para carregar a configuração MCP.

Uso no GitHub Copilot

Abra o Copilot Chat (Ctrl + Shift + I) e teste os comandos:

Liste todas as tabelas do meu banco de times
Mostre a estrutura da tabela jogadores
Conte quantos jogadores estão confirmados
Insira um novo jogador: nome "Carlos", whatsapp "11987654321"
Adicione uma coluna telefone do tipo TEXT na tabela jogadores
Crie um índice único no email dos usuários
Adicione uma foreign key entre jogadores e times

Ferramentas Disponíveis

Ferramenta

Descrição

Exemplo

list_tables

Lista todas as tabelas

{}

describe_table

Mostra estrutura de uma tabela

{"table": "jogadores"}

execute_select

Executa SELECT (somente leitura)

{"query": "SELECT * FROM jogadores"}

insert_data

Insere dados

{"table": "jogadores", "data": {"nome": "João"}}

update_data

Atualiza dados

{"table": "jogadores", "data": {"status": "confirmado"}, "where": "id = 1"}

delete_data

Deleta dados

{"table": "jogadores", "where": "id = 1"}

count_rows

Conta registros

{"table": "jogadores", "where": "status = 'ativo'"}

add_column

Adiciona coluna a tabela

{"table": "jogadores", "column": "telefone", "type": "TEXT"}

execute_ddl

Executa comandos DDL

{"sql": "ALTER TABLE jogadores ADD COLUMN email TEXT"}

create_index

Cria índice

{"name": "idx_jogadores_nome", "table": "jogadores", "column": "nome"}

add_constraint

Adiciona constraint

{"table": "jogadores", "constraint_name": "fk_time", "constraint_type": "FOREIGN KEY", "columns": ["time_id"], "referenced_table": "times", "referenced_columns": ["id"]}

begin_transaction

Inicia transação

{}

commit_transaction

Confirma transação

{}

rollback_transaction

Cancela transação

{}

API Reference

Esquemas Detalhados das Ferramentas

list_tables

Descrição: Lista todas as tabelas do banco de dados Parâmetros: Nenhum Retorno: Lista de nomes de tabelas

describe_table

Descrição: Mostra a estrutura completa de uma tabela Parâmetros:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela a ser descrita"
    }
  },
  "required": ["table"]
}

Retorno: Schema da tabela com colunas, tipos e constraints

execute_select

Descrição: Executa uma query SELECT (somente leitura) Parâmetros:

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Query SQL SELECT válida"
    }
  },
  "required": ["query"]
}

Validação: Query deve começar com "SELECT" (case insensitive) Retorno: Resultado da query em formato JSON

insert_data

Descrição: Insere um novo registro na tabela Parâmetros:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela"
    },
    "data": {
      "type": "object",
      "description": "Objeto com dados a inserir",
      "additionalProperties": true
    }
  },
  "required": ["table", "data"]
}

Retorno: ID do registro inserido

update_data

Descrição: Atualiza registros existentes Parâmetros:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela"
    },
    "data": {
      "type": "object",
      "description": "Dados a atualizar",
      "additionalProperties": true
    },
    "where": {
      "type": "string",
      "description": "Condição WHERE para identificar registros"
    }
  },
  "required": ["table", "data", "where"]
}

Retorno: Número de registros afetados

delete_data

Descrição: Remove registros da tabela Parâmetros:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela"
    },
    "where": {
      "type": "string",
      "description": "Condição WHERE para identificar registros"
    }
  },
  "required": ["table", "where"]
}

Retorno: Número de registros removidos

count_rows

Descrição: Conta registros em uma tabela Parâmetros:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela"
    },
    "where": {
      "type": "string",
      "description": "Condição WHERE opcional"
    }
  },
  "required": ["table"]
}

Retorno: Número total de registros

add_column

Descrição: Adiciona uma nova coluna a uma tabela existente Parâmetros:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela"
    },
    "column": {
      "type": "string",
      "description": "Nome da nova coluna"
    },
    "type": {
      "type": "string",
      "description": "Tipo de dados da coluna (ex: 'TEXT', 'INTEGER', 'REAL', 'BLOB')"
    },
    "nullable": {
      "type": "boolean",
      "description": "Se a coluna pode ser NULL (padrão: true)",
      "default": true
    },
    "default_value": {
      "type": "string",
      "description": "Valor padrão da coluna (opcional)"
    }
  },
  "required": ["table", "column", "type"]
}

Retorno: Confirmação da adição da coluna

Desenvolvimento

Para desenvolvimento local:

npm run dev  # Executa com tsx (hot reload)

Troubleshooting

Erro "command not found"

  • Use caminho absoluto em args no .vscode/mcp.json

  • Exemplo: C:/Users/Lucas Silva/projetos/mcp-turso/dist/index.js

Erro de permissão

  • No primeiro uso, o Copilot vai pedir permissão

  • Clique em "Allow" ou "Continue"

Ferramentas não aparecem

  • Verifique se npm run build foi executado

  • Reinicie o VSCode completamente

  • Confirme se o caminho no .vscode/mcp.json está correto

  • Verifique logs em Output → MCP

Erro de conexão com Turso

  • Confirme se TURSO_DATABASE_URL e TURSO_AUTH_TOKEN estão corretos

  • Execute turso auth token para gerar um novo token se necessário

Scripts Disponíveis

  • npm run build: Compila TypeScript

  • npm run dev: Executa em modo desenvolvimento

  • npm start: Executa versão compilada

Roadmap

Próximas Funcionalidades

  • Suporte a transações SQL

  • Queries complexas com JOIN

  • Backup e restore de bancos

  • Interface web opcional para administração

  • Suporte a múltiplos bancos Turso

  • Integração com outras ferramentas MCP

Melhorias Planejadas

  • Validação de schema mais rigorosa

  • Suporte a tipos de dados avançados

  • Cache de queries frequentes

  • Logs estruturados

  • Métricas de performance

Recursos Adicionais

Documentação MCP

Turso

Contribuição

  1. Fork o projeto

  2. Crie uma branch: git checkout -b feature/nome

  3. Commit suas mudanças

  4. Abra um Pull Request

Licença

MIT


English

About the Project

MCP Turso is the first complete solution to integrate Turso Cloud databases with Model Context Protocol (MCP) in VSCode. This project allows GitHub Copilot to interact directly with your Turso databases through MCP tools, facilitating CRUD operations and SQL queries.

Why this project exists?

  • First MCP solution for Turso: No implementation was available

  • Native VSCode integration: Works perfectly with GitHub Copilot

  • Easy Windows setup: Simple configuration for Windows

  • Complete tools: Support for all basic database operations

MCP Architecture

How MCP Works

Model Context Protocol (MCP) is an open protocol that allows Large Language Models (LLMs) to connect to external tools and data in a standardized way.

Main Components:

  • MCP Client: Application that uses the protocol (e.g., GitHub Copilot, Claude Desktop)

  • MCP Server: Program that exposes tools and resources (this project)

  • Communication: Via stdio (stdin/stdout) using JSON-RPC 2.0

Operation Flow:

  1. MCP Client starts the server

  2. Server registers its tools via ListTools

  3. Client can call tools via CallTool

  4. Server executes the operation and returns result

Security:

  • SELECT queries are automatically validated

  • Write operations use prepared statements

  • Local communication via stdio (no network ports exposed)

Project Structure

mcp-turso/
├── src/
│   └── index.ts          # Main MCP server
├── dist/                 # Compiled code (generated)
├── .env                  # Environment variables (not versioned)
├── package.json          # Dependencies and scripts
├── tsconfig.json         # TypeScript configuration
└── README.md             # This documentation

Prerequisites

  • Node.js 18+ (compatible with dependencies)

  • A Turso Cloud account with active database

  • VSCode with GitHub Copilot installed

Installation

Step 1: Create the project

# Create project folder
mkdir mcp-turso
cd mcp-turso

# Initialize Node.js project
npm init -y

Step 2: Install dependencies

npm install @modelcontextprotocol/sdk @libsql/client dotenv
npm install -D typescript @types/node tsx

Step 3: Configure TypeScript

Create tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ES2022",
    "moduleResolution": "bundler",
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules"]
}

Step 4: Create server code

Create src folder and src/index.ts with the code provided in the repository.

Step 5: Configure package.json

Edit package.json to include:

{
  "name": "mcp-turso",
  "version": "1.0.0",
  "type": "module",
  "bin": {
    "mcp-turso": "./dist/index.js"
  },
  "scripts": {
    "build": "tsc",
    "dev": "tsx src/index.ts",
    "start": "node dist/index.js"
  },
  "dependencies": {
    "@libsql/client": "^0.14.0",
    "@modelcontextprotocol/sdk": "^1.0.4",
    "dotenv": "^16.4.5"
  },
  "devDependencies": {
    "@types/node": "^22.10.2",
    "tsx": "^4.19.2",
    "typescript": "^5.7.2"
  }
}

Step 6: Build the project

npm run build

This creates the dist/ folder with compiled JavaScript code.

Configuration

Environment Variables

Create a .env file in the project root:

TURSO_DATABASE_URL=libsql://your-database.turso.io
TURSO_AUTH_TOKEN=your-token-here

To get the token:

turso auth token

VSCode Configuration

Step 1: Create MCP file

In the root of your project (not mcp-turso), create .vscode/mcp.json:

{
  "mcpServers": {
    "turso": {
      "command": "node",
      "args": ["C:/full/path/mcp-turso/dist/index.js"],
      "env": {
        "TURSO_DATABASE_URL": "libsql://your-database.turso.io",
        "TURSO_AUTH_TOKEN": "your-token-here"
      }
    }
  }
}

Important: Replace C:/full/path/ with the actual path where you created the mcp-turso project.

Step 2: Restart VSCode

Close VSCode completely and reopen to load the MCP configuration.

Usage in GitHub Copilot

Open Copilot Chat (Ctrl + Shift + I) and test commands:

List all tables in my times database
Show the structure of the players table
Count how many players are confirmed
Insert a new player: name "Carlos", whatsapp "11987654321"
Add a phone column of type TEXT to the players table
Create a unique index on user emails
Add a foreign key between players and teams

Available Tools

Tool

Description

Example

list_tables

Lists all tables

{}

describe_table

Shows table structure

{"table": "players"}

execute_select

Executes SELECT (read-only)

{"query": "SELECT * FROM players"}

insert_data

Inserts data

{"table": "players", "data": {"name": "John"}}

update_data

Updates data

{"table": "players", "data": {"status": "confirmed"}, "where": "id = 1"}

delete_data

Deletes data

{"table": "players", "where": "id = 1"}

count_rows

Counts records

{"table": "players", "where": "status = 'active'"}

add_column

Adds column to table

{"table": "players", "column": "phone", "type": "TEXT"}

execute_ddl

Executes DDL commands

{"sql": "ALTER TABLE players ADD COLUMN email TEXT"}

create_index

Creates index

{"name": "idx_players_name", "table": "players", "column": "name"}

add_constraint

Adds constraint

{"table": "players", "constraint_name": "fk_team", "constraint_type": "FOREIGN KEY", "columns": ["team_id"], "referenced_table": "teams", "referenced_columns": ["id"]}

begin_transaction

Begins transaction

{}

commit_transaction

Commits transaction

{}

rollback_transaction

Rollbacks transaction

{}

API Reference

Detailed Tool Schemas

list_tables

Description: Lists all database tables Parameters: None Return: List of table names

describe_table

Description: Shows complete table structure Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Name of the table to describe"
    }
  },
  "required": ["table"]
}

Return: Table schema with columns, types and constraints

execute_select

Description: Executes a SELECT query (read-only) Parameters:

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Valid SQL SELECT query"
    }
  },
  "required": ["query"]
}

Validation: Query must start with "SELECT" (case insensitive) Return: Query result in JSON format

insert_data

Description: Inserts a new record into the table Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "data": {
      "type": "object",
      "description": "Object with data to insert",
      "additionalProperties": true
    }
  },
  "required": ["table", "data"]
}

Return: ID of the inserted record

update_data

Description: Updates existing records Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "data": {
      "type": "object",
      "description": "Data to update",
      "additionalProperties": true
    },
    "where": {
      "type": "string",
      "description": "WHERE condition to identify records"
    }
  },
  "required": ["table", "data", "where"]
}

Return: Number of affected records

delete_data

Description: Removes records from the table Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "where": {
      "type": "string",
      "description": "WHERE condition to identify records"
    }
  },
  "required": ["table", "where"]
}

Return: Number of removed records

count_rows

Description: Counts records in a table Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "where": {
      "type": "string",
      "description": "Optional WHERE condition"
    }
  },
  "required": ["table"]
}

Return: Total number of records

add_column

Description: Adds a new column to an existing table Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "column": {
      "type": "string",
      "description": "Name of the new column"
    },
    "type": {
      "type": "string",
      "description": "Data type of the column (e.g., 'TEXT', 'INTEGER', 'REAL', 'BLOB')"
    },
    "nullable": {
      "type": "boolean",
      "description": "Whether the column can be NULL (default: true)",
      "default": true
    },
    "default_value": {
      "type": "string",
      "description": "Default value for the column (optional)"
    }
  },
  "required": ["table", "column", "type"]
}

Return: Confirmation of column addition

execute_ddl

Description: Executes safe DDL (Data Definition Language) commands Parameters:

{
  "type": "object",
  "properties": {
    "sql": {
      "type": "string",
      "description": "Valid DDL SQL command (ALTER TABLE, CREATE INDEX, etc.)"
    }
  },
  "required": ["sql"]
}

Validation: Blocks DROP, TRUNCATE, DELETE commands. Allows only ALTER TABLE, CREATE INDEX, ADD CONSTRAINT Return: Confirmation of command execution

create_index

Description: Creates an index on a specific column Parameters:

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Index name"
    },
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "column": {
      "type": "string",
      "description": "Column name"
    },
    "unique": {
      "type": "boolean",
      "description": "Whether it should be a unique index",
      "default": false
    }
  },
  "required": ["name", "table", "column"]
}

Return: Confirmation of index creation

add_constraint

Description: Adds constraints (foreign key, check, unique) to tables Parameters:

{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "constraint_name": {
      "type": "string",
      "description": "Constraint name"
    },
    "constraint_type": {
      "type": "string",
      "description": "Type: 'FOREIGN KEY', 'CHECK', 'UNIQUE'",
      "enum": ["FOREIGN KEY", "CHECK", "UNIQUE"]
    },
    "columns": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Columns involved"
    },
    "referenced_table": {
      "type": "string",
      "description": "Referenced table (for FK)"
    },
    "referenced_columns": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Referenced columns (for FK)"
    },
    "check_expression": {
      "type": "string",
      "description": "CHECK expression (for CHECK)"
    }
  },
  "required": ["table", "constraint_name", "constraint_type", "columns"]
}

Return: Confirmation of constraint addition

begin_transaction

Description: Begins a new transaction Parameters: None Return: Confirmation of transaction start

commit_transaction

Description: Commits all operations in the current transaction Parameters: None Return: Confirmation of commit

rollback_transaction

Description: Cancels all operations in the current transaction Parameters: None Return: Confirmation of rollback

Development

},
"column": {
  "type": "string",
  "description": "Nome da coluna"
},
"unique": {
  "type": "boolean",
  "description": "Se deve ser índice único",
  "default": false
}

}, "required": ["name", "table", "column"] }

**Return**: Confirmação da criação do índice

#### `add_constraint`
**Descrição**: Adiciona constraints (foreign key, check, unique) a tabelas
**Parâmetros**:
```json
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Nome da tabela"
    },
    "constraint_name": {
      "type": "string",
      "description": "Nome da constraint"
    },
    "constraint_type": {
      "type": "string",
      "description": "Tipo: 'FOREIGN KEY', 'CHECK', 'UNIQUE'",
      "enum": ["FOREIGN KEY", "CHECK", "UNIQUE"]
    },
    "columns": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Colunas envolvidas"
    },
    "referenced_table": {
      "type": "string",
      "description": "Tabela referenciada (para FK)"
    },
    "referenced_columns": {
      "type": "array",
      "items": {"type": "string"},
      "description": "Colunas referenciadas (para FK)"
    },
    "check_expression": {
      "type": "string",
      "description": "Expressão CHECK (para CHECK)"
    }
  },
  "required": ["table", "constraint_name", "constraint_type", "columns"]
}

Return: Confirmação da adição da constraint

begin_transaction

Descrição: Inicia uma nova transação Parâmetros: Nenhum Return: Confirmação do início da transação

commit_transaction

Descrição: Confirma todas as operações da transação atual Parâmetros: Nenhum Return: Confirmação do commit

rollback_transaction

Descrição: Cancela todas as operações da transação atual Parâmetros: Nenhum Return: Confirmação do rollback

Development

For local development:

npm run dev  # Runs with tsx (hot reload)

Troubleshooting

"command not found" error

  • Use absolute path in args in .vscode/mcp.json

  • Example: C:/Users/Lucas Silva/projects/mcp-turso/dist/index.js

Permission error

  • On first use, Copilot will ask for permission

  • Click "Allow" or "Continue"

Tools don't appear

  • Make sure npm run build was executed

  • Restart VSCode completely

  • Confirm the path in .vscode/mcp.json is correct

  • Check logs in Output → MCP

Turso connection error

  • Confirm TURSO_DATABASE_URL and TURSO_AUTH_TOKEN are correct

  • Run turso auth token to generate a new token if needed

Available Scripts

  • npm run build: Compiles TypeScript

  • npm run dev: Runs in development mode

  • npm start: Runs compiled version

Roadmap

Upcoming Features

  • SQL transactions support

  • Complex queries with JOIN

  • Database backup and restore

  • Optional web interface for administration

  • Support for multiple Turso databases

  • Integration with other MCP tools

Planned Improvements

  • More rigorous schema validation

  • Support for advanced data types

  • Cache for frequent queries

  • Structured logging

  • Performance metrics

Additional Resources

MCP Documentation

Turso

Contributing

  1. Fork the project

  2. Create a branch: git checkout -b feature/name

  3. Commit your changes

  4. Open a Pull Request

License

MIT

Available Tools

14 tools
add_columnC

Adiciona uma nova coluna a uma tabela existente

ParametersJSON Schema
NameRequiredDescriptionDefault
typeYesTipo de dados da coluna (ex: 'TEXT', 'INTEGER', 'REAL', 'BLOB')
tableYesNome da tabela
columnYesNome da nova coluna
nullableNoSe a coluna pode ser NULL (padrão: true)
default_valueNoValor padrão da coluna (opcional)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It reveals only that a column is added — a permanent schema mutation — but says nothing about irreversibility, required privileges, behavior if the column already exists, table locking, or interaction with the sibling transaction tools (begin_transaction/commit_transaction/rollback_transaction).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single efficient sentence with zero filler, front-loaded with the action verb. It is appropriately sized for the information it conveys, though the brevity is partly a product of under-specification rather than dense content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a schema-mutating tool with no annotations and no output schema, this description is thin. It covers basic purpose but leaves the agent without usage routing, behavioral expectations, or error-handling context. Given the existence of powerful siblings like execute_ddl and transaction tools, more context would meaningfully help an agent select and invoke this tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all five parameters (type, table, column, nullable, default_value) already carry meaningful descriptions in the schema, so the baseline of 3 applies. The description adds marginal context by implying the column must be 'nova' (new), but provides no syntax, format, or constraint detail beyond what the schema documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Adiciona' / adds) and resource ('uma nova coluna a uma tabela existente' / a new column to an existing table). This clearly distinguishes it from siblings like add_constraint and create_index by the object being added, though it does not explicitly name or contrast alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given for when to use add_column versus its siblings. Notably, execute_ddl could also add a column via ALTER TABLE, and add_constraint is a closely related schema-mutation tool, yet the description provides no decision criteria, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_constraintC

Adiciona uma constraint (foreign key, check, unique) a uma tabela

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesNome da tabela
columnsYesColunas envolvidas na constraint
constraint_nameYesNome da constraint
constraint_typeYesTipo da constraint: 'FOREIGN KEY', 'CHECK', 'UNIQUE'
check_expressionNoExpressão CHECK (para CHECK constraints)
referenced_tableNoTabela referenciada (para FOREIGN KEY)
referenced_columnsNoColunas referenciadas (para FOREIGN KEY)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it only restates the action. It does not disclose that this is a mutating schema-altering DDL operation, whether it can fail when existing data violates the constraint, whether validation is immediate, or what happens to the table's data. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that states verb, resource, and scope with no filler. It is efficiently structured and immediately readable, though it could have used the space to add behavioral or conditional context without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a 7-parameter tool with conditional parameter dependencies and no annotations or output schema, so the description needs to compensate. It omits the conditional logic linking constraint_type to the optional parameters, error behavior on data violations, and the mutating nature of the operation. An agent cannot fully determine how to invoke it for each constraint type from this definition alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents every parameter; the baseline of 3 applies. The description adds little beyond restating the constraint types already present in the enum, and it does not clarify the conditional relationships between constraint_type and the optional parameters (check_expression for CHECK, referenced_table/referenced_columns for FOREIGN KEY).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Adiciona' = adds), a specific resource (a constraint on a table), and enumerates the supported types (foreign key, check, unique), which distinguishes it from siblings like add_column and create_index. However, it doesn't explicitly differentiate from the generic execute_ddl sibling, which could also add constraints via raw SQL, so it falls short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives. It never mentions execute_ddl as the fallback for custom DDL, nor does it state prerequisites (e.g., referenced table must already exist for foreign keys) or when a typed constraint tool is preferable to raw SQL.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

begin_transactionC

Inicia uma transação

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only restates that a transaction starts and gives no information about side effects, connection/session scoping, whether nested transactions are allowed, what happens to subsequent operations, or what a successful start returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short but under-specified; it does not earn its place because it only repeats the meaning of the tool name. It is not a matter of concise excellence but of missing essential behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a database transaction tool, the description is insufficient: it omits the need to commit or rollback, the scope of the transaction, whether it affects subsequent operations, and error behavior when a transaction is already active. With no annotations and no output schema, the description should provide substantially more operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters and the input schema is empty, so there are no parameter semantics to document. The baseline of 4 applies because parameter documentation is simply unnecessary here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Inicia uma transação' is essentially a direct translation of the tool name, so it is tautological rather than informative. It names the verb and resource but provides no detail that distinguishes it from transaction-related siblings or explains what starting a transaction entails in this system.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to call begin_transaction, what conditions should be true beforehand, or that it should be paired with commit_transaction or rollback_transaction. The sibling tool list implies a transaction lifecycle, but the description does not make this usage context explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

commit_transactionA

Confirma (commit) a transação atual

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full behavioral burden. It states the core commit action but does not disclose that committing is typically irreversible, that it ends the transaction, or what happens if there is no active transaction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with the key verb front-loaded. There is no filler, repetition of structured data, or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, no-output-schema tool, the description is minimally adequate. However, it lacks transaction lifecycle context and edge-case behavior, such as requiring an active transaction or the distinction from rollback_transaction, which an agent would benefit from knowing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the input schema requires no additional parameter explanation. The baseline of 4 applies because the description cannot meaningfully add parameter semantics where none exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb, 'Confirma (commit)', and a clear resource, 'a transação atual', which distinguishes it from siblings like rollback_transaction and begin_transaction. An agent can immediately understand the operation and its scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'transação atual' implies there is an active transaction to commit, which gives indirect usage context. However, it does not explicitly state when to use commit versus rollback, nor that commit should follow a begin_transaction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

count_rowsB

Conta o número de registros em uma tabela

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesNome da tabela
whereNoCondição WHERE opcional (ex: 'status = active')

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It honestly states the read-only counting operation, but fails to disclose the return format (e.g., a single integer), the effect of the optional where parameter, error behavior for nonexistent tables, or potential performance implications of counting all rows in a large table.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence with zero waste. The core operation is stated immediately and there is no filler or redundant phrasing. For a tool of this simplicity, the length is appropriate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is relatively simple — two parameters, both documented in the schema, and no output schema. However, the description omits any mention of the WHERE filter, which materially changes the result, and does not clarify whether the return value is a bare integer or a single-row result set. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 even though the description adds no parameter-level detail. The description mentions 'tabela' (table), which aligns with the table parameter, but it silently ignores the where parameter that the schema documents with an example. It neither adds nor contradicts schema information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear operation ('Conta o número de registros') and a specific resource ('em uma tabela'), making it obvious this tool returns a row count. It does not explicitly differentiate from siblings like execute_select, but the counting semantics are distinct enough that a capable agent can tell what it does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as execute_select or describe_table, and no mention of the optional WHERE condition or when it should be used. The usage context is only implied by the verb 'count' — an agent gets no help deciding between this and a generic query tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_indexC

Cria um índice em uma tabela

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesNome do índice
tableYesNome da tabela
columnYesNome da coluna para indexar
uniqueNoSe o índice deve ser único (padrão: false)

TDQS

C2.6/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of behavioral disclosure. It only says 'creates an index in a table' and gives no information about side effects, potential locking, failure conditions, irreversibility, or permission requirements. This is a mutating DDL operation with zero behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no wasted words, but it is also under-specified and lacks the substance needed to support agent decision-making. It is concise in length, but the brevity borders on under-specification rather than efficient communication.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a mutation tool with no annotations, no output schema, and no behavioral transparency, the description is incomplete. It does not mention prerequisites (e.g., table/column must exist), index uniqueness behavior, or potential impact on database performance, leaving significant gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all four parameters already documented by name and purpose. The description adds no additional meaning beyond the schema, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Cria' (creates) and the resource 'índice em uma tabela' (index in a table), which is a specific, unambiguous operation. It does not distinguish itself from siblings like execute_ddl, but the resource and operation are sufficiently explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use create_index versus alternative tools such as execute_ddl or add_constraint. No prerequisites, exclusions, or selection criteria are provided; the description simply states the action without situating it among the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_dataC

Deleta dados de uma tabela

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesNome da tabela
whereYesCondição WHERE (ex: 'id = 1')

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing destructive behavior, but it only restates that data is deleted. It does not warn that deletion is irreversible or explain that rows matching the WHERE condition are permanently removed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no wasted words, making it easy to parse. Its brevity is reasonable, though it sacrifices behavioral detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is too thin. It should at least note the destructive/irreversible nature and possibly the transaction-related siblings (begin_transaction/rollback_transaction) available for safe usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the table and where parameters are already documented. The description adds no parameter-specific meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear action ('Deleta dados') on a specific resource ('uma tabela'), so an agent can distinguish it from insert/update/select siblings. It is slightly generic, repeating the tool name, but the resource target adds enough meaning.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use delete_data versus update_data, insert_data, or execute_select. The description does not mention relevant contexts such as removing matching rows or whether to wrap the operation in a transaction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_tableA

Mostra a estrutura (schema) de uma tabela específica

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesNome da tabela a ser descrita

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states that the tool shows the schema; it does not clarify what parts of the schema are returned (columns, types, constraints, indexes), whether it is strictly read-only, or how it handles nonexistent tables. This is a minimal disclosure with notable gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no filler words. It front-loads the action and resource, and every word contributes to the meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple introspection tool with one parameter and no output schema, the description is mostly complete. It tells the agent what the tool does and what input it needs. A small gap is that it does not describe the exact shape of the returned schema, but 'estrutura (schema)' conveys the essential output concept.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the single parameter 'table' is already documented as 'Nome da tabela a ser descrita'. The description adds no additional semantic meaning beyond the schema, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: showing the structure/schema of a specific table. It names both the action ('Mostra a estrutura') and the resource ('uma tabela específica'), which distinguishes it from siblings like list_tables that operate at a different scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: whenever you need the schema of a particular table. However, it does not explicitly mention alternatives or exclusions, such as using list_tables to enumerate tables first or execute_select to inspect data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_ddlC

Executa comandos DDL (Data Definition Language) como ALTER TABLE, CREATE INDEX, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesComando DDL SQL a ser executado

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of behavioral disclosure. It only states that DDL commands are executed and does not mention side effects like irreversibility, non-transactional behavior, privilege requirements, or error semantics. For a mutation-capable tool, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with concrete examples and no filler. Every word contributes to identifying the tool's purpose. It is appropriately sized for a tool with one parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, this description is thin. It omits return behavior, error handling, and the relationship to overlapping siblings like create_index or add_column. An agent is left without enough context to confidently choose between this generic DDL executor and the more specific DDL tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: the sql parameter is documented as 'Comando DDL SQL a ser executado'. The tool description adds no additional meaning beyond what the schema already provides, such as syntax, formatting, or constraints. The baseline of 3 is appropriate when the schema carries the parameter documentation burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action (execute) on a specific resource (DDL commands) with concrete examples like ALTER TABLE and CREATE INDEX. It is not a tautology and conveys the core purpose. However, it does not differentiate from sibling DDL-specific tools such as add_column or create_index, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use execute_ddl versus the more specific DDL siblings like create_index, add_constraint, or add_column. There is no mention of preferred usage, exclusions, or alternatives. An agent must infer the appropriate use case purely from the name and the generic DDL description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_selectA

Executa uma query SELECT (somente leitura)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesQuery SQL SELECT a ser executada

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does state the key trait 'somente leitura', which signals no side effects on data. However, it does not mention return format, potential restrictions on query complexity, error behavior, or whether multiple statements are allowed, leaving the agent with only partial behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise, and front-loaded sentence. It communicates the core purpose and the read-only constraint with no filler or redundant words. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one well-documented parameter, the description is largely sufficient: it states the action and the read-only nature. Some gaps remain, such as lack of guidance on output format and differentiation from count_rows and describe_table, but these are minor for such a straightforward tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents the single 'query' parameter with 100% coverage, describing it as a 'Query SQL SELECT a ser executada'. The tool description essentially repeats this by saying it executes SELECT queries. No additional parameter meaning is added beyond what the schema provides, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: executing a SELECT query, with an explicit 'somente leitura' (read-only) qualifier. This distinguishes it effectively from sibling write operations like insert_data, update_data, and delete_data. The resource ('query SELECT') and the specific verb ('Executa') leave no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: it is for SELECT queries only, and the read-only qualifier suggests it is not for writes. However, it does not explicitly name alternative tools or provide exclusion criteria. Especially among read-only siblings like list_tables, describe_table, and count_rows, there is no guidance on when to prefer this tool over those.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

insert_dataC

Insere dados em uma tabela

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYesObjeto com os dados a inserir (ex: {nome: 'João', idade: 25})
tableYesNome da tabela

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, but it only says data is inserted. It does not mention side effects, transaction behavior, failure modes, or whether data is appended versus overwritten, which is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no filler or redundant information. It is concise and front-loaded, though slightly under-specified in terms of behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low parameter count, 100% schema coverage, and simple action, the description is minimally viable for an agent to understand what the tool does. However, the absence of any behavioral or return-value context, especially with no output schema or annotations, leaves clear gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters adequately, including an example for the data object. The description adds no meaning beyond the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Insere dados em uma tabela' clearly states the action (insert) and the resource (data into a table), so an agent can understand the core purpose. It does not explicitly differentiate from sibling tools like update_data or delete_data, but the verb 'insert' is semantically distinct enough.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as update_data or delete_data, and no mention of transaction requirements or constraints. The description only restates the basic action, leaving usage decisions entirely to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesA

Lista todas as tabelas do banco de dados Turso

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden. The word 'Lista' implies a read-only operation and 'todas' indicates exhaustive coverage, which is useful. However, it does not disclose output shape, whether system tables or views are included, ordering, or failure modes. For a simple list tool this is a moderate gap, not a severe one.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence with no filler. It front-loads the verb and states the target resource completely. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, low-complexity read tool the description is mostly complete: it names the operation and the database. It would benefit from noting the return format or scope details, but an agent can safely invoke this tool with no arguments based on the description alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema is empty, so there is nothing for the description to add about parameters. Baseline 4 applies for zero-parameter tools. The reference to the Turso database adds context but is not parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific operation ('Lista') and the resource ('todas as tabelas do banco de dados Turso'). This unambiguously identifies the tool as a list operation over the full table set in the Turso database, distinguishing it from sibling tools like describe_table or execute_select.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives, or when not to use it. The description only states what the tool does, leaving the agent to infer when listing all tables is the right choice among the many sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rollback_transactionA

Cancela (rollback) a transação atual

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavior disclosure, but it only restates the rollback action. It does not mention that the rollback is irreversible, that an active transaction must exist, or what happens if there is no transaction to roll back.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short clause that is immediately understandable and front-loads the core action. There is no redundant text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter transaction control tool the description conveys the main action, but it omits behavior around transaction state, such as the requirement of an active transaction, irreversibility, and contrast with commit. Sibling names provide some context, yet no output schema or annotations exist to fill the gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema covers 100% of them with an empty properties object, so there is nothing for the description to add. Baseline 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('cancela/rollback') and resource ('a transação atual'), making the operation unmistakable. It is semantically distinct from sibling commit_transaction, so an agent can identify it as the undo counterpart without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'transação atual' implies it should be called on an open transaction, but the description gives no explicit when-to-use guidance, such as calling it after an error or instead of commit. No alternatives or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_dataC

Atualiza dados em uma tabela

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYesDados a atualizar
tableYesNome da tabela
whereYesCondição WHERE (ex: 'id = 1')

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says 'update data,' without explaining that matching rows are modified, how the WHERE condition affects the update scope, whether the change is permanent or requires a transaction, or what the tool returns. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no filler or redundant wording. It is front-loaded and efficient, though the generic wording limits how much value the conciseness provides.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It omits how rows are selected by WHERE, what the data object should contain, whether changes are committed automatically, and what the response will be. More operational context is needed for an agent to use it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers all three parameters with descriptions (table, data, where), and schema coverage is 100%, so the baseline is 3. The description adds no additional parameter meaning; in particular, the structure of the nested data object is left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb and resource: 'Atualiza dados em uma tabela' (Updates data in a table). It is not tautological and is clearly distinct from insert or delete operations, but it gives no detail about the scope of the update or how it differs from sibling tools beyond the basic meaning of 'update'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to use this tool versus alternatives such as insert_data, delete_data, or execute_select. The intended use is only implied by the verb 'update'; no conditions, exclusions, or sibling comparisons are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 14 tool updatesv1.0.0
    • First observedadd_column
    • First observedadd_constraint
    • First observedbegin_transaction
    • First observedcommit_transaction
    • First observedcount_rows
    • First observedcreate_index
    • First observeddelete_data
    • First observeddescribe_table
    • First observedexecute_ddl
    • First observedexecute_select
    • First observedinsert_data
    • First observedlist_tables
    • First observedrollback_transaction
    • First observedupdate_data

TDQS

B3.4/5.0

Scored across 14 tools

Disambiguation4/5

Each tool targets a specific database operation, making most purposes clear. The only mild ambiguity is that add_constraint, add_column, and create_index overlap conceptually with generic execute_ddl, but their dedicated descriptions resolve the intent.

Naming Consistency5/5

All tools use a consistent snake_case verb_noun pattern such as list_tables, insert_data, begin_transaction, and create_index. This creates a predictable and easily navigable API surface.

Tool Count5/5

14 tools is well within the ideal range for a database-focused MCP server. Each tool has a clear role, covering introspection, data manipulation, DDL, and transaction control without unnecessary redundancy.

Completeness5/5

The surface covers the core database lifecycle: schema inspection, CRUD, counting, constraints, indexes, column additions, generic DDL, and transaction management. The inclusion of execute_ddl fills any long-tail DDL gaps, so agents are unlikely to hit dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A Model Context Protocol server that provides Claude access to Turso-hosted LibSQL databases, enabling database table listing, schema retrieval, and SELECT query execution.
    4
    84 npm
    6
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    🗂️ A Model Context Protocol (MCP) server that provides integration with Turso databases for LLMs. This server implements a two-level authentication system to handle both organization-level and database-level operations, making it easy to manage and query Turso databases directly from LLMs.
    9
    74 npm
    18
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Provides AI-IDEs with real-time access to PostgreSQL and Supabase database schemas through the Model Context Protocol, enabling smarter code generation in tools like Cursor, Windsurf, and VS Code + Cline.
    9
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides tools for interacting with PlanetScale databases via the Model Context Protocol, enabling database operations through natural language or API calls.
    261 npm
    5
    Apache 2.0