Skip to main content
Glama
teghoz

sql-mcp

by teghoz

get_job_history

Retrieve execution history for a SQL Server Agent job. Specify the exact job name and optionally limit results to the most recent entries.

Instructions

Get execution history for a SQL Server Agent job. Requires membership in SQLAgentUserRole (or higher) in the msdb database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoNumber of most-recent history entries to return (default: 50, max: 500)
job_nameYesExact job name
Behavior3/5

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

With no annotations, the description carries the full burden for disclosing behavior. It does disclose the permission requirement, which is valuable. However, it does not explain the return format or any side effects (e.g., whether it's read-only, what the entries contain), leaving some behavioral details unspecified.

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 just two sentences, front-loaded with the core action and followed by a necessary permission note. Every word earns its place with no redundancy.

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 simple two-parameter get tool with no output schema, the description is adequate but not rich. It states purpose and permission, but lacks any detail on what the history entries include or how to interpret the result. It also doesn't explicitly relate to sibling list_agent_jobs. Given no output schema, the description could do slightly more to be complete.

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?

The input schema provides 100% coverage of both parameters with descriptions ('Exact job name' and 'Number of most-recent history entries to return (default: 50, max: 500)'). The tool description adds no additional parameter meaning, so baseline 3 is appropriate.

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 uses a specific verb ('Get') and resource ('execution history for a SQL Server Agent job'), clearly distinguishing it from sibling tool list_agent_jobs which lists jobs themselves. No ambiguity about what this tool does.

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?

Provides a clear prerequisite ('Requires membership in SQLAgentUserRole (or higher) in the msdb database'), which is concrete usage context. However, it does not explicitly mention when to prefer this over list_agent_jobs or other alternatives, but the purpose makes this largely implicit.

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/teghoz/sql-mcp'

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