Skip to main content
Glama

execute_sql_query

Run SQL queries on CSV data loaded into a temporary SQLite database. Supports SELECT, INSERT, UPDATE, DELETE, and more.

Instructions

Execute any SQL query on the loaded database.

Args: query: Any SQL query to execute (SELECT, INSERT, UPDATE, DELETE, CREATE, etc.) limit: Maximum number of rows to return for SELECT queries (default: 100)

Returns: Query results formatted as XML or execution status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description states it can execute any SQL (SELECT, INSERT, etc.) and returns XML or status. However, it does not explicitly warn about destructive operations (e.g., DELETE, DROP) or the need for caution, which is important given no annotations.

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 concise (8 lines) with a clear structure: summary line, Args section, Returns section. No unnecessary words.

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?

The description covers purpose and parameters but lacks warnings about destructive operations and does not elaborate on return formats beyond 'XML or execution status.' Given the tool's power, it could be more complete.

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

Parameters4/5

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

The description explains the query parameter as 'Any SQL query to execute' and the limit parameter as 'Maximum number of rows to return for SELECT queries (default: 100).' This adds significant meaning beyond the bare schema (0% coverage).

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 'Execute any SQL query on the loaded database,' clearly specifying the verb (execute) and resource (SQL query on the loaded database). This distinguishes it from sibling tools like get_database_schema and get_column_stats, which are read-only.

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?

The description does not provide guidance on when to use this tool versus alternatives. It lists query types but lacks explicit when-to-use or when-not-to-use context, such as preferring get_database_schema for schema exploration.

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/Lasitha-Jayawardana/mcp-csv-database'

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