Skip to main content
Glama
bymcs

MS SQL Server MCP Server

by bymcs

Read Table Rows

mssql_read_table_rows
Read-onlyIdempotent

Read rows from a SQL Server table with column selection, WHERE filtering, ORDER BY, and pagination. Pass parameters safely via @paramName placeholders.

Instructions

Returns rows from a table with optional column projection, WHERE filtering, ORDER BY, and pagination. Read-only. Table and schema names are validated as safe identifiers. WHERE clause values MUST be passed via 'parameters' using @paramName placeholders. Pagination: limit (1-200, default 20) and offset. Example: tableName='Orders', schemaName='dbo', columns=['OrderId','Total'], limit=50

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows (1-200)
offsetNoRows to skip
columnsNoColumns to return (default: all)
orderByNoORDER BY expression. Example: 'CreatedAt DESC, Id ASC'
tableNameYesTable name
parametersNoValues for WHERE clause @paramName placeholders
schemaNameNoSchema name (default: dbo)dbo
whereClauseNoWHERE predicate without WHERE keyword. Use @paramName for all values. Example: 'Status = @status AND Amount > @minAmount'
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable tablejson
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint), the description adds critical behavioral details: table/schema names are validated as safe identifiers and WHERE clause values MUST be passed via parameters. It also specifies pagination limits. This significantly enhances the agent's understanding and safe invocation.

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 compact and front-loaded with the core action, followed by safety requirements and a practical example. Every sentence contributes meaningful information with no fluff.

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?

For a tool with 9 parameters and no output schema, the description covers the essential operational aspects: read-only nature, identifier validation, parameterization, pagination, and an example. It doesn't explain response_format or return structure, but the schema covers those; it's sufficient for an agent to invoke correctly.

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?

Schema description coverage is 100%, so baseline is 3. The description adds value by explaining the relationship between whereClause and parameters via '@paramName' placeholders and provides a concrete example using tableName, schemaName, columns, and limit. This clarifies usage beyond the raw schema.

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 returns rows from a table with optional projection, filtering, ordering, and pagination, which is a specific verb+resource. However, it does not explicitly differentiate itself from sibling tools like mssql_get_table_data or mssql_run_sql_query, so it falls short of the full 5.

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 provides clear context: it's a read-only operation, requires parameterized WHERE values, and explains pagination behavior. It does not explicitly state when not to use it or mention alternative tools, so it lacks exclusions but still gives solid usage 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/bymcs/mssql-mcp'

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