Skip to main content
Glama
c0h1b4
by c0h1b4

Execute SQL Query

execute_query

Execute custom SQL SELECT queries on Microsoft SQL Server databases with automatic row limiting for data retrieval and analysis.

Instructions

Execute a custom SQL SELECT query with automatic limit (top 20 rows)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionStringNoSQL Server connection string (uses default if not provided)
connectionNameNoNamed connection to use (e.g., 'production', 'staging')
queryYesSQL SELECT query to execute
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds value by specifying 'automatic limit (top 20 rows)', which is a key constraint not in the schema. However, it lacks details on permissions, error handling, or response format, leaving gaps for a tool that executes custom queries.

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 a single, efficient sentence that front-loads the core functionality. Every word earns its place, with no redundancy or waste, making it easy to parse quickly.

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 the complexity of executing custom SQL queries, no annotations, and no output schema, the description is incomplete. It covers the basic action and a limit but misses critical details like security implications, result formatting, or error scenarios. It's minimally adequate but has clear gaps for this type of tool.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any meaning beyond what's in the schema, such as clarifying parameter interactions or usage examples. Baseline 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the tool's purpose: 'Execute a custom SQL SELECT query with automatic limit (top 20 rows)'. It specifies the verb ('Execute'), resource ('SQL SELECT query'), and key behavior ('automatic limit'). However, it doesn't explicitly differentiate from sibling tools like 'sample_data' or 'describe_table', which might also retrieve data but with different approaches.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'sample_data' for limited data retrieval without custom queries or 'describe_table' for metadata. There's no context on prerequisites, such as needing a connection, or exclusions like avoiding non-SELECT queries.

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/c0h1b4/mssql-mcp-server'

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