Skip to main content
Glama

SQL Server MCP by InsightfulPipe

mssql Data

query_data
Read-only

Query mssql data (Step 3 (FINAL) of workflow).

REQUIRED: Complete these steps first using query_contexts:

  1. request='accounts' - Get workspace_id, brand_id, connection_slug AND available_actions

  2. request='actions_details' with actions=['xxxxxx', 'xxxxxx', 'xxxxxx'] - Get detailed body structure for specific action(s) using actions from available_actions

IMPORTANT: Always call step 2 to see the exact body structure before querying.

query_data accepts read-only SQL only: a single SELECT (or EXPLAIN) statement. Write statements (INSERT/UPDATE/DELETE/DDL) are rejected here - send them through execute_action.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "query_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description's added value is the enforcement detail: only a single SELECT or EXPLAIN is accepted, and INSERT/UPDATE/DELETE/DDL are rejected here. It doesn't mention row limits, timeouts, or result truncation, which matters for a free-form SQL tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-line purpose, then the required steps, then the constraint — a sensible order. The numbered workflow block is slightly long for a tool description and partly duplicates what query_contexts should carry, but no sentence is filler.

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?

With an output schema present, return values needn't be described, and the read-only/write-routing boundary plus the discovery steps cover the main failure modes. What's missing is operational behavior on large or long-running queries, which is a meaningful gap for an open-world SQL 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?

There is one free-form `body` object with additionalProperties:true and zero schema description coverage, so the schema explains nothing. The description partially compensates by implying the payload is a read-only SQL statement and directing the agent to query_contexts 'actions_details' for the exact body shape, but it never names the field that carries the SQL.

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?

"Query mssql data" states a specific verb and resource, and the final line explicitly draws the boundary from the sibling execute_action (writes go there, reads come here). The scope is clear enough to choose between the two without opening either schema, though "mssql data" itself doesn't say what entities are reachable.

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

Usage Guidelines5/5

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

It gives an explicit ordered precondition chain (query_contexts 'accounts' then 'actions_details'), mandates step 2 before any query, and states when *not* to use it — write statements must go through execute_action. That is exactly the when/when-not/alternatives triad.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.