Skip to main content
Glama
bpamiri

SQL Server MCP

by bpamiri

export_to_json

Execute SQL queries and save results as JSON files for data export and analysis from SQL Server databases.

Instructions

Export query results to a JSON file.

Args:
    query: SQL SELECT query to execute
    filename: Output filename (relative or absolute path)

Returns:
    Dictionary with:
    - status: 'success' or error
    - path: Absolute path to created file
    - row_count: Number of rows exported
    - file_size: Size of created file in bytes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
filenameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that the tool creates a file and returns status information, but lacks details on permissions needed, error handling, file overwriting behavior, or execution constraints. It adds some behavioral context but leaves gaps for a mutation tool.

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 well-structured with clear sections for Args and Returns, using bullet points for readability. Every sentence adds value without redundancy, making it efficient and easy to parse.

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 tool's complexity (file creation with 2 parameters) and no annotations, the description is mostly complete with purpose, parameters, and return values detailed. However, it lacks information on execution limits, error cases, or file system interactions, which could be important for safe usage.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% coverage. It explains that 'query' is an 'SQL SELECT query to execute' and 'filename' is an 'Output filename (relative or absolute path)', providing essential semantic context that the schema titles alone do not convey.

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's purpose with specific verb ('Export') and resource ('query results to a JSON file'), distinguishing it from sibling tools like 'export_to_csv' and 'execute_query' by specifying the output format and file creation aspect.

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 implies usage context by specifying 'SQL SELECT query' and 'Output filename', but does not explicitly state when to use this tool versus alternatives like 'export_to_csv' or 'execute_query'. It provides clear prerequisites but lacks explicit comparison guidance.

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/bpamiri/pymssql-mcp'

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