Skip to main content
Glama
bpamiri

SQL Server MCP

by bpamiri

read_rows

Retrieve specific rows from SQL Server tables using primary keys or custom filters to access targeted data.

Instructions

Read rows from a table by primary key or filter.

Provide one of: id (single row), ids (multiple rows), or filter (WHERE clause).

Args:
    table: Table name (can include schema: 'dbo.Users' or 'Users')
    id: Single primary key value (for composite keys, use filter)
    ids: List of primary key values
    filter: WHERE clause without 'WHERE' keyword (e.g., "status = 'active'")
    columns: List of columns to return (default: all columns)
    max_rows: Maximum rows to return

Returns:
    Dictionary with:
    - table: Full table name
    - rows: List of row dictionaries
    - count: Number of rows returned

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
idNo
idsNo
filterNo
columnsNo
max_rowsNo

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 the full burden. It discloses key behavioral traits: it's a read operation (implied by 'Read rows'), returns data in a dictionary format, and includes constraints like 'default: all columns' and 'Maximum rows to return'. However, it lacks details on permissions, rate limits, error handling, or pagination, leaving gaps for a tool with multiple parameters.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a clear usage note, then detailed parameter explanations in a structured format. 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 (6 parameters, read operation) and lack of annotations, the description is largely complete: it covers purpose, usage, parameters, and return values. However, with an output schema present, the description redundantly explains the return structure, and it misses some behavioral context like error cases or performance limits, slightly reducing completeness.

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 schema description coverage is 0%, so the description must compensate fully. It adds significant meaning beyond the schema: explains that 'table' can include schema, clarifies usage of 'id', 'ids', and 'filter' as mutually exclusive options, provides syntax examples (e.g., "status = 'active'"), and notes defaults and constraints. This comprehensively documents all 6 parameters.

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 specific action ('Read rows from a table') and resource ('table'), distinguishing it from siblings like 'execute_query' (general queries) or 'describe_table' (metadata). It specifies retrieval by primary key or filter, making the purpose explicit and differentiated.

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 on when to use this tool ('by primary key or filter') and offers guidance on parameter usage ('Provide one of: id, ids, or filter'). However, it does not explicitly state when to use alternatives like 'execute_query' for complex queries or 'describe_table' for schema info, missing full sibling differentiation.

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