Skip to main content
Glama

run_sql

Run read-only SQL queries against the vitals SQLite database to analyze recovery, strain, sleep, workout, and heart-rate data; check the schema first.

Instructions

Read-only SQL against the vitals db. Use get_schema first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the most important trait — read-only execution — but says nothing about result-size limits, timeouts, whether writes/DDL are rejected, or what happens on error.

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?

Two short sentences, zero filler, with the read-only constraint and the prerequisite front-loaded before any detail.

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 values needn't be described, and the read-only contract plus the get_schema prerequisite cover the essentials for a one-parameter tool. Only query-dialect and execution-limit context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single 'query' parameter has no description, so the schema adds nothing. The description partially compensates by implying the target database and that only read-oriented SQL is valid, but gives no syntax, dialect, or dialect-specific constraints.

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?

States a specific verb+resource ('SQL against the vitals db') and constrains the operation to read-only, which cleanly separates it from the predefined getters like get_daily and get_heart_rate. It doesn't explicitly name those siblings as alternatives, but the purpose is unambiguous.

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?

'Use get_schema first' gives a concrete prerequisite and names a sibling tool by name, which is real routing guidance. It stops short of saying when to prefer run_sql over the fixed query tools (get_daily, get_workouts), so no explicit when/when-not distinction.

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