tidbcloud-http

Execute raw HTTP SQL queries against TiDB Serverless without the official SDK.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/alex-quan-001/nutshell-skills --skill tidbcloud-http
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidbcloud-http
Source: https://github.com/alex-quan-001/nutshell-skills/tree/main/skills/platform/tidbcloud-http
Command: npx skills add https://github.com/alex-quan-001/nutshell-skills --skill tidbcloud-http

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, python3, curl, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the limitation of requiring the official @tidbcloud/serverless SDK to query TiDB Serverless, enabling direct raw HTTP access for users who need to bypass the driver or build custom integration workflows with TiDB Cloud.

Core Features & Use Cases

  • Direct HTTP Access: Send SQL queries directly to TiDB Serverless's /v1beta/sql endpoint without relying on the official JS SDK or driver.
  • Flexible Query Modes: Support for stateless one-off queries, persistent stateful sessions for multi-query workflows, and interactive transactions with configurable isolation levels.
  • Automated Handling: Built-in session token management with automatic retry on invalid sessions, in-memory decoding of binary field types (BLOB, BIT, etc.) without extra queries, and a 10,000 row limit to prevent overload.
  • Use Case: A DevOps engineer building a custom alerting tool can pull real-time slow query metrics directly from TiDB Serverless via HTTP without integrating the full TiDB Cloud SDK as a project dependency.

Quick Start

Ask the AI to run a stateless SQL query against your TiDB Serverless instance by providing your DATABASE_URL and the target SQL statement to execute via direct HTTP.

Frequently Asked Questions about tidbcloud-http

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query TiDB Serverless via raw HTTP without using the official SDK?

You can query TiDB Serverless via raw HTTP by sending SQL statements directly to the /v1beta/sql endpoint. This Skill bypasses the official @tidbcloud/serverless SDK, handling credential management via DATABASE_URL and supporting stateless, stateful, and transactional workflows.

What is the difference between stateless and stateful SQL query sessions in TiDB Serverless?

Stateless sessions execute one-off SQL queries independently, while stateful sessions maintain persistent tokens for multi-query workflows. The Skill provides automated session token management with automatic retry on invalid sessions to ensure reliable HTTP connections.

Can I execute interactive transactions with configurable isolation levels directly against TiDB Cloud?

Yes, you can execute interactive transactions with configurable isolation levels via direct HTTP requests. This Skill supports transactional query workflows for TiDB Cloud Starter and Essential plan instances without requiring SDK integration.

Do I need to install the @tidbcloud/serverless SDK to run SQL queries on TiDB Cloud?

No, you do not need the official @tidbcloud/serverless SDK. This Skill enables direct HTTP access using dependencies like curl, python3, and jq, automatically decoding binary field types like BLOB and BIT in memory without extra queries.

Are there row limits or data overload protections when querying TiDB Serverless through HTTP?

Yes, querying TiDB Serverless through HTTP enforces a 10,000 row limit to prevent system overload. This constraint applies to all direct HTTP SQL queries, ensuring stable performance for stateless and stateful data retrieval workflows.

How does direct HTTP access handle binary data fields like BLOB in TiDB Serverless?

Direct HTTP access handles binary data fields like BLOB and BIT by automatically decoding them in memory. This eliminates the need for extra SQL queries to process binary field types when retrieving results from TiDB Serverless.