Skip to main content
Glama

Database query

db_query
Read-onlyIdempotent

Run a single read-only SELECT or WITH statement against the internal SQLite reports fixture and return JSON rows; reject all non-SELECT queries.

Instructions

Run a single read-only SELECT statement against the internal SQLite fixture database. Schema: table reports (id, title, topic, author, published_at, summary); topic values are English keywords such as security, protocols, reliability, observability, retrieval. Returns JSON rows. Only SELECT/WITH statements are accepted — everything else is rejected.

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": {
      "query": "<query>"
    },
    "name": "db_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesA single SELECT statement, e.g. SELECT title, author FROM reports

Output Schema

NameRequiredDescriptionDefault
dataYes
statusNook

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Although annotations already cover read-only, idempotent, non-destructive, and closed-world behavior, the description adds substantial behavioral context beyond them: the exact schema, allowed statement types, rejection of non-SELECT/WITH queries, and JSON-row return format.

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 three short sentences, front-loads the core operation, and every sentence contributes useful information: purpose, schema, and query restrictions. There is no filler.

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

Completeness5/5

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

For a single-parameter read-only query tool with an output schema, the description covers the operation, database schema, accepted syntax, rejection behavior, and return shape. Nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds meaningful domain semantics: the `reports` table columns, example topic values, and the restriction that only SELECT/WITH is accepted. That materially helps the agent construct the `query` parameter beyond what the schema alone provides.

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 and resource: run a single read-only SELECT against the internal SQLite fixture database. It is clearly a database-query tool, but it does not explicitly differentiate itself from siblings such as read_file or web_search, so it falls short of a 5 by the stated rubric.

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?

It gives clear usage context: only SELECT/WITH statements are accepted, everything else is rejected, and the database is a fixture. It does not explicitly say when to prefer this over sibling tools or name alternatives, so it is clear but lacks explicit routing guidance.

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

Deploy Server

Other Tools