Skip to main content
Glama
JimmyAlter

guarded-sql-mcp

by JimmyAlter

Stale devices

stale_devices
Read-onlyIdempotent

Identify non-retired devices that have not checked in for a set number of days or never checked in, oldest first. Filter by site and limit rows.

Instructions

List non-retired devices that have not checked in for at least the given number of days (or never), oldest first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoDays without check-in (1-365, default 30).
siteNoSite code as returned by list_sites, e.g. "north-branch".
limitNoMaximum rows to return (1-100, default 25).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
hasMoreYesMore rows matched than were returned.
rowCountYesRows in this response.
truncatedYesLong values were cut or rows dropped to fit the response size limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "hasMore": {
      +      "description": "More rows matched than were returned.",
      +      "type": "boolean"
      +    },
      +    "rowCount": {
      +      "description": "Rows in this response.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "rows": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "hostname": {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "last_seen_at": {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "os": {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "site": {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean",
      +              "null"
      +            ]
      +          },
      +          "status": {
      +            "type": [
      +              "string",
      +              "number",
      +              "boolean",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "truncated": {
      +      "description": "Long values were cut or rows dropped to fit the response size limit.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "rowCount",
      +    "hasMore",
      +    "truncated",
      +    "rows"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds genuine behavioral context beyond that: the 'non-retired' exclusion rule, the 'never checked in' edge case, and the 'oldest first' ordering — details an agent would otherwise have to guess.

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 with the filter, the exclusion, and the sort order, and no filler. Every clause carries information an agent needs.

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 need no explanation, and annotations cover the safety profile. The description supplies the domain semantics (staleness window, retired exclusion, ordering); only explicit sibling routing is missing for a 5.

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 description coverage is 100%, so the schema already documents days, site and limit, including ranges and defaults. The description only echoes the 'days' semantics ('given number of days (or never)') and adds nothing for site or limit, so the baseline 3 applies.

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?

States a specific verb ('List') and a precisely scoped resource ('non-retired devices that have not checked in for at least the given number of days (or never)'), including sort order. The scope is clearly distinct from siblings like search_devices, but the description never names or contrasts with them, so an agent must infer the boundary.

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 filter conditions imply when to use it (auditing stale/inactive hardware), and 'non-retired' quietly tells the agent retired devices are out of scope. However, there is no explicit statement of when to prefer this over search_devices or any other alternative, nor any prerequisite guidance.

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