Skip to main content
Glama
MSSQL MCP Server

MSSQL MCP Server

by Elad-Health

get_failed_jobs

Retrieve SQL Agent jobs that failed in their last execution or within a specified recent time window to diagnose and troubleshoot job failures.

Instructions

Get jobs that failed in their last execution or recent history

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_failed_jobs"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNoLook back this many hours for failures
serverNoSQL Server instance (e.g., "server\instance" or "server,port"). Uses default if not specified.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden and does very little: "get" implies a read, but it never confirms read-only behavior, states whether failures are per-step or per-job, or says what happens when history is truncated or retained only briefly. Permissions, agent-service dependency, and result shape are all undisclosed for a monitoring tool with zero annotation coverage.

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?

A single front-loaded sentence with no filler, but it is arguably too terse for a failure-diagnosis tool and spends its words on an ambiguity ("last execution or recent history") rather than on actionable scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-optional-parameter read with full schema coverage and no output schema, the description is minimally sufficient to call the tool correctly. It is not sufficient to interpret results or to choose this tool over get_job_history, which is the main completeness gap.

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?

Schema coverage is 100%, with the hours default of 24 and the server instance format already documented in the schema, so the baseline is 3. The description's "recent history" phrasing hints that hours bounds the lookback but adds no format or edge-case meaning beyond the 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?

Specific verb plus resource ("Get jobs that failed") with a qualifier on failure recency, so the agent knows this returns failed-agent-job records rather than all jobs. It stops short of distinguishing itself from siblings like get_job_history or list_jobs, and the phrase "last execution or recent history" is ambiguous about which criterion applies.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no indication of when to prefer get_job_history or list_jobs, and no statement of prerequisites beyond an optional server argument. The agent must guess whether this tool covers failure diagnosis or all job-history needs.

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