Skip to main content
Glama
shadow-dba

mssql-dba-mcp

by shadow-dba

Get Failed SQL Agent Jobs

mssql_agent_failed_jobs
Read-onlyIdempotent

Lists SQL Agent jobs that failed in the last 7 days, including failure date, time, and error message, to help troubleshoot and resolve job failures.

Instructions

SQL Agent failed jobs: jobs that failed in the last 7 days, with date, time and error message. Not available on Azure SQL Database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered; the description adds useful context by disclosing the fixed 7-day lookback window and the Azure SQL Database platform limitation. It does not mention result limits, pagination, or truncation behavior.

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?

A single front-loaded sentence that carries scope, return content, and a caveat with no filler. Every clause earns its place.

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 no output schema, the description appropriately names the returned fields and the time window, and warns about the Azure SQL DB exclusion. It stops short of covering edge cases such as empty results or row limits, but is sufficient for an agent to invoke the tool 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?

Zero parameters and an empty schema, so the baseline is 4. There is nothing parameter-related for the description to compensate for; the lookback window is fixed rather than parameterized, which the description makes clear.

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?

States a specific resource (SQL Agent failed jobs), the scope (failed in the last 7 days), and the returned fields (date, time, error message). It is clearly distinguishable from sibling mssql_agent_jobs, which lists all jobs, and from mssql_agent_alerts.

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

Usage Guidelines3/5

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

The 7-day window and the 'Not available on Azure SQL Database' platform exclusion imply when this tool applies, but no alternative is named and no explicit 'use this when X' statement is given. Usage guidance is implied rather than stated.

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