Skip to main content
Glama

Read Data from SQL Server

read_data
Read-onlyIdempotent

Execute a read-only SQL SELECT query on a specified SQL Server and database. Retrieve data safely without modification.

Instructions

Execute a read-only SQL SELECT query against a named SQL Server instance. Only SELECT and WITH (CTE) queries are allowed. Use list_servers first to discover available server names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverNameYesName of the SQL Server to query (use list_servers to see available names)
queryYesSQL SELECT query to execute. Only SELECT and WITH (CTE) queries are permitted.
databaseNameYesName of the database to query (use list_databases to see available databases)
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, indicating safety. The description reinforces that only read-only queries are allowed, adding clarity beyond annotations. It does not contradict annotations, and the restriction on query types enhances transparency.

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 extremely concise: two sentences that front-load the purpose and then provide usage guidance. Every sentence adds value without redundancy.

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?

Given the read-only nature and absence of output schema, the description adequately covers the main concerns: what query types are allowed and how to identify the server. However, it could mention the return format (result set) or error behavior to be fully complete.

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?

Input schema covers all parameters with descriptions, achieving 100% coverage. The description adds that serverName should be discovered via list_servers and repeats the query type restriction, but does not provide significant new meaning beyond what schema already offers.

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 tool executes a read-only SQL SELECT query against a named SQL Server instance, specifying allowed query types (SELECT and WITH). It distinguishes itself from siblings by focusing on arbitrary query execution, while siblings like describe_table or list_databases serve specific schema or listing roles.

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

Usage Guidelines4/5

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

The description advises using list_servers first to discover server names, providing a prerequisite. It restricts queries to SELECT and WITH (CTE), preventing write operations. However, it lacks explicit guidance on when to prefer this tool over siblings like describe_table 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/mbentham/SqlAugur'

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