---
title: "Getting Errors Running SQL Against the Tigzig Cricket Database? The Most Common Failure Is the URL, Not Your SQL."
slug: db-mcp-url-encoding-errors-aug2026
date_published: 2026-08-17T15:00:00.000Z
original_url: https://www.tigzig.com/post/db-mcp-url-encoding-errors-aug2026
source: fresh
processed_at: 2026-08-17T15:00:00.000Z
---

# Getting Errors Running SQL Against the Tigzig Cricket Database? The Most Common Failure Is the URL, Not Your SQL.

Are you running SQL against the Tigzig cricket database? Getting errors? The most common failure has nothing to do with your SQL, it is the URL it travelled in.

You can send a query to us two ways. Inside the URL, which is a GET, or inside a JSON body, which is a POST. If you use the URL, the whole query has to be percent encoded first, and that is the step where it goes wrong. A plus sign inside a URL already means a space, so `SUM(runs_off_bat + extras)` reaches us with the plus gone. Line breaks can get eaten, so two words end up stuck together. Some clients stop encoding partway and the query arrives cut off. The SQL on your screen is correct, and by the time it gets here it is a different query.

For these URL problems, the error response you get names the cause where it can .... and for the rest it quotes your SQL back exactly as we received it so you can see what changed.

Why am I keeping GET? It is the only thing a plain browser can do, agent driven browsers and no code HTTP nodes use it, and those calls work perfectly well too.

I added those to the docs ...the most common cases and what to send instead. Doc links below, comments have some quick points.

- For humans: [db-mcp.tigzig.com/v1/redoc](https://db-mcp.tigzig.com/v1/redoc)
- For your AI: [db-mcp.tigzig.com/v1/openapi.json](https://db-mcp.tigzig.com/v1/openapi.json)

Data from: [Cricsheet](https://cricsheet.org), published under the [Open Data Commons Attribution License 1.0 (ODC-BY)](https://opendatacommons.org/licenses/by/1-0/).

## A few quick points

- Just to note that ODI sits on Postgres, T20 on DuckDB. The two engines are different SQL dialects, so a query that works on one can fail on the other.
- There is a 1000 row cap.. for more than that you get the first 1000 and `truncated: true`. Always read that field.
- Schema discovery, `SHOW TABLES` and `DESCRIBE` both work.
- If you set no limit at all, one is added for you. Everything else behaves normally: `ORDER BY`, `OFFSET`, CTEs and aggregates are unaffected, so `LIMIT ... OFFSET ...` pagination works.
- Set your own limit. It is faster, and a false on `truncated` is your proof nothing was cut.

## What it looks like when it goes wrong

- `SUM(runs_off_bat + extras)` arriving as `SUM(runs_off_bat extras)`. The plus became a space. Send it as `%2B`.
- `AS runs FROM t20_ball_by_ball` arriving as `AS runsFROM t20_ball_by_ball`. A line break got eaten.
- `SELECT gender, COUNT(*) FROM ...` arriving as `SELECT gender, COUNT`. The encoder gave up at the bracket.

If you would rather not think about any of this, send a POST with a JSON body and there is no encoding step to get wrong. Check updated docs below.

- For humans: [db-mcp.tigzig.com/v1/redoc](https://db-mcp.tigzig.com/v1/redoc)
- For your AI: [db-mcp.tigzig.com/v1/openapi.json](https://db-mcp.tigzig.com/v1/openapi.json)

<!-- blog-sidebar-related -->
## Related

Tools: [DATS-4 Database AI Suite](https://www.tigzig.com/analyzer), [BRIQ](https://www.tigzig.com/briq), [QRep - Security Reports](https://www.tigzig.com/qrep)

Explore: [API and MCP catalog](https://www.tigzig.com/apis), [Database AI apps](https://www.tigzig.com/database-landing), [Claude for Analytics hub](https://www.tigzig.com/claude-for-analytics)

More posts: [Run Your Own SQL on My Cricket Database. T20 and ODI Ball by Ball Since 2002, Free, No Signup and No Key.](https://www.tigzig.com/post/db-mcp-cricket-sql-queries-aug2026), [A Database Server With API and MCP You Can Point an AI Agent At, With Ball-by-Ball Cricket Behind It.](https://www.tigzig.com/post/db-mcp-cricket-ball-by-ball-api-aug2026), [Demystifying TIGZIG API Errors: A Practical Guide for MFPRO, TREMOR, and VIGIL Users](https://www.tigzig.com/post/tigzig-api-errors-practical-guide-jul2026), [Four Days of an Open SQL Endpoint. What Real Cricket Queries Needed, and the SSRF Someone Found in the First Couple of Hours.](https://www.tigzig.com/post/db-mcp-four-days-ssrf-query-guards-aug2026)

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/post/db-mcp-url-encoding-errors-aug2026
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
