Skip to main content
Glama

query_db

Run a read-only SQL query against the BRS SQLite database.

Tables: decoder_decision_records, engine_verdict_records, regime_event_records, vao_records, funding_records, etc.

Use this to check signal history, regime state, or system health without spawning sqlite3 CLI commands.

Args: query: SQL SELECT statement to execute

Returns: JSON array of result rows

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It states 'read-only' and 'Returns: JSON array of result rows', covering non-destructiveness and return format. However, it does not disclose potential limitations like execution time, result size, or query complexity restrictions, leaving moderate transparency.

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 well-structured and succinct, with a clear opening definition, table list, usage sentence, Args block, and Returns line. Every part is informative and there is no filler.

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 tool with one parameter and an output schema, the description covers the core essentials: purpose, tables, usage, parameter semantics, and return format. It lacks an explicit note about preferring get_* endpoints for standard metrics, but overall it is sufficiently complete for this simple tool.

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 input schema offers no parameter description (0% coverage). The description compensates with an Args section clarifying 'query: SQL SELECT statement to execute', which adds meaning by specifying the parameter must be a SELECT query and providing database context. This goes beyond the bare schema.

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 'Run a read-only SQL query against the BRS SQLite database' with a specific verb and resource. It lists tables and example uses, effectively distinguishing it from sibling get_* tools by presenting it as a raw SQL interface.

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

Usage Guidelines4/5

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

The description includes 'Use this to check signal history, regime state, or system health without spawning sqlite3 CLI commands,' providing clear context and a contrast to the CLI alternative. However, it does not explicitly mention when to prefer the specialized get_* tools, so it lacks exclusions.

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.

TDQS

A4/5.0
Disambiguation4/5

Tools like get_convergence, get_directional_bias, and get_dashboard are related but clearly scoped: convergence checks sensor agreement, directional_bias gives the trade call, dashboard bundles everything. Mempool fees vs stats are distinct (rates vs pending tx). Some overlap exists between convergence/regime_current, but descriptions disambiguate well.

Naming Consistency5/5

All tools follow a consistent get_verb_noun pattern (get_block_tip, get_funding_divergence, get_system_health). The only exception is query_db, which uses 'query' instead of 'get', but it still follows the verb_noun structure and same snake_case style. No mixed conventions.

Tool Count4/5

15 tools is at the high end of the ideal range, but each serves a distinct function in a complex domain: sensor convergence, regime, funding, gamma, mempool, system health, audit. The Pro/free tier adds some apparent duplication (get_convergence vs get_directional_bias), but they address different questions.

Completeness5/5

The tool set covers the full workflow: convergence check, directional call, regime context, specialized indicators (funding, gamma, stablecoin flows, fee histogram), mempool data, system health, audit trail, and a queryable database. No obvious dead ends; public signal history and counters support verification.

Resources