Skip to main content
Glama

Close SQLite query

db_query_close
Read-only

Closes a retained SQLite query session and releases its database handle. Use it to free resources after finishing queries and prevent lingering connections.

Instructions

Close a retained SQLite query session and database handle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNo
sessionIdYes
deviceNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful scope by saying both the session and the database handle are released, but omits idempotency, error behavior for an unknown/expired sessionId, and whether other sessions are affected. Note the mild tension between 'Close' (a state change) and readOnlyHint=true, though this is resource cleanup rather than data mutation, so it is not a true contradiction.

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?

A single front-loaded sentence with no filler. Every word carries information about the operation and its targets.

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

Completeness2/5

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

For a lifecycle/cleanup tool with no output schema and zero parameter documentation, the description is too thin: it never explains the session lifecycle, the role of the optional device parameters, or failure modes. An agent can guess the call but not call it confidently in edge cases.

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

Parameters2/5

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

Schema description coverage is 0% across three parameters. The word 'session' loosely implies sessionId, but deviceId and deviceName are entirely undocumented in both schema and description, and nothing explains how the three relate or which must be supplied. The description does not compensate for the coverage gap.

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 (Close) and resource (retained SQLite query session and database handle), which is clearly distinguishable from the db_query_start/db_query_next/db_query_sessions siblings in the same family. It stops short of naming the sibling that creates the session it closes, so differentiation is implied rather than explicit.

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

Usage Guidelines2/5

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

No when-to-use guidance: it does not say to call this after db_query_next is exhausted, whether closing is mandatory for cleanup, or what happens if the session is still active. The agent must infer the lifecycle role from the name alone.

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