Skip to main content
Glama

keydata.shop: Polymarket and exchange order flow

Run read-only SQL

run_sql
Read-onlyIdempotent

Run one read-only DuckDB SELECT over the tables of list_tables (cex, polymarket, chainlink and the per-source views such as binance_btc or polymarket_btc_5m). Filter on ts and aggregate in SQL: at most max_rows rows come back (up to the server's cap), and the query is stopped at the timeout. DuckDB functions such as time_bucket, arg_max, quantile_cont, corr, regr_slope and window functions are available; file and network access are not.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "run_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
max_rowsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral facts: rows are capped at max_rows up to a server cap, the query is terminated at the timeout, and file/network access is unavailable. The actual timeout value and server cap remain unstated, keeping this from a 5.

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?

Dense and front-loaded: the verb, data scope, and row/limit behavior come first, with the function inventory and sandbox restrictions after. Every clause carries information, though the parenthetical list of views and the function-name catalog make the sentence long.

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?

An output schema exists, so return-value explanation is unnecessary, and the description covers data scope, limits, timeouts, and available functions. Missing only concrete numbers (timeout duration, server cap) and any example query shape, which would help an agent write a valid SELECT on the first try.

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?

Schema description coverage is 0%, so the description must carry the load. It explains what max_rows does (row ceiling subject to a server cap) and characterizes sql as a single read-only SELECT with the table names and functions available. It does not clarify max_rows' default of 200 or whether the sql string accepts multiple statements.

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?

States a specific verb and resource ("Run one read-only DuckDB SELECT") and scopes the resource set precisely: the tables from list_tables, naming cex, polymarket, chainlink and per-source views like binance_btc. That distinguishes it from siblings such as sample_rows or compare_venues without the agent needing to open a schema.

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 gives operational guidance ("Filter on ts and aggregate in SQL", use DuckDB functions like time_bucket and arg_max), which implies this is the tool for custom aggregation. However, it never states when to prefer this over siblings like sample_rows, exchange_bars, or compare_venues, and gives no explicit when-not-to-use condition.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.