Skip to main content
Glama

ZeroWidth Napkin

Run SQL against a sheet

napkin_sheets_query
Read-only

Runs a SQLite SELECT over a sheet's tabs-as-tables (get the table/column names from napkin_sheets_schema first). Full SQLite dialect: WHERE, GROUP BY, ORDER BY, JOINs across tabs, aggregates. Results cap at 200 rows. This is THE way to answer questions about a sheet's data — never eyeball cells when a query can answer precisely.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single SELECT.
sheetIdYesSheet id from napkin_sheets_list.
workspaceNoWorkspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint=false, but the description adds real behavioral context beyond them: the 200-row result cap and the full SQLite dialect surface (WHERE, GROUP BY, ORDER BY, JOINs, aggregates). It stops short of describing result shape or what happens when the cap truncates.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and scope, followed by prerequisites, capability surface, and a limit. The final emphatic sentence is slightly editorial but does routing work, so it mostly earns its place.

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 query tool with no output schema, the definition covers input prerequisite, dialect capability, and the row cap. Column-level return shape and pagination/truncation behavior are unaddressed, but the referenced schema tool covers much of that gap.

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 100%, so all three parameters are already documented, including the workspace override rules and sheetId provenance. The description only reinforces that sql must be a SELECT, which the schema itself already states, so baseline 3 applies.

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?

States a specific verb (Runs a SQLite SELECT) and a specific resource abstraction (a sheet's tabs-as-tables), which is unambiguous and distinct from siblings like napkin_sheets_schema (discovery) and napkin_sheets_set_cells (mutation). An agent can select it without opening the schema.

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

Usage Guidelines5/5

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

Explicitly names the prerequisite tool ('get the table/column names from napkin_sheets_schema first') and an explicit when-to-use rule ('THE way to answer questions about a sheet's data — never eyeball cells'). Routing and exclusion are both handled.

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.

Resources