Skip to main content
Glama

Query database

query_database

Run SQL queries against an app's SQLite database to retrieve data as JSON or apply changes, returning detailed change info.

Instructions

Run SQL against the app's built-in SQLite database (/data.sqlite). SELECT returns rows as JSON; DDL/DML returns change info. The fullstack template's server uses this same file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYes
sqlYes
Behavior3/5

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

With no annotations, the description must disclose behavior. It does reveal that SELECT returns JSON and DDL/DML returns change info, and it notes the file is shared with the server, implying side effects. However, it does not mention error handling, transactionality, potential destructive impact, or any rate limits, leaving some behavioral gaps.

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 two sentences with no waste. The primary purpose is front-loaded, the return behavior is stated succinctly, and the server-sharing note is useful context. Every sentence earns its place.

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

Completeness3/5

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

Given two required parameters, no annotations, and no output schema, the description covers the core purpose and return types, and provides the file path. Missing context includes how errors are reported, whether SQL is executed in a transaction, and any read/write limitations. The server-sharing note is helpful but overall it leaves some operational details unspecified.

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 description coverage is 0%, so the description must clarify parameters. It explains 'app' through the path (<app>/data.sqlite) and implies 'sql' is the query string. It doesn't explicitly define each parameter's format or constraints, but provides enough context to infer meaning. This is average compensation for the lack of schema descriptions.

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 states a specific verb ('Run SQL') and a specific resource ('the app's built-in SQLite database'), and clarifies the file path. It distinguishes itself from siblings by being the only database-related tool, and the behavior of SELECT vs DDL/DML adds clear scope.

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 implicitly indicates when to use it (for any SQL operation on the app's database) and contrasts its effect (SELECT vs DDL/DML). It doesn't mention alternatives, but since no direct alternative exists, the context is clear. The statement about the server using the same file hints at when to be cautious, though not explicitly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SandeepbhuiyaRTNW/slipway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server