Skip to main content
Glama
mhalle

Datasette MCP

by mhalle

execute_sql

Execute SQL queries on a Datasette database to retrieve and analyze data. Supports pagination, time limits, and custom output shapes.

Instructions

Execute SQL query against a Datasette instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceYesName of the Datasette instance (from config)
databaseYesDatabase name
sqlYesSQL query to execute
shapeNoJSON shape - "arrays", "objects", or "array" (uses Datasette default if not specified)
json_columnsNoList of columns to parse as JSON
traceNoInclude query performance trace
timelimitNoQuery timeout in milliseconds
sizeNoMaximum number of results per page (uses Datasette default if not specified)
next_tokenNoPagination token from previous response to get next page

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits. However, it omits critical details such as whether the query is read-only or can mutate data, permission requirements, or error behavior, leaving the agent unaware of potential side effects.

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

Conciseness2/5

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

The description is extremely concise (8 words) but at the cost of crucial information. It lacks any structure to convey important context, making it under-specified rather than efficiently concise.

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?

Given the tool's complexity (9 parameters, SQL execution), the absence of annotations, and the fact that an output schema exists but is not referenced, the description fails to provide adequate context about return format, pagination, or behavior, leaving significant gaps.

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 the baseline is 3. The description adds no additional meaning beyond the schema's parameter descriptions, but does not detract either.

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 clearly states the verb 'Execute' and the resource 'SQL query against a Datasette instance', accurately capturing the tool's function. It effectively distinguishes from siblings like describe_database and search_table which have different purposes.

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 guidance is provided on when to use this tool versus alternatives like search_table. There is no mention of safety considerations (e.g., whether SQL can modify data) or prerequisites, leaving the AI agent without decision-making context.

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/mhalle/datasette-mcp'

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