Skip to main content
Glama

sn_syslog

Read-onlyIdempotent

Query ServiceNow system logs by severity, source, and time, with pagination or tailing to inspect recent events and diagnose issues.

Instructions

Query ServiceNow system logs (syslog table) with severity, source, and time-based filters. Results ordered newest first, with pagination metadata (record_count, total, has_more, next_offset). To tail: tail=true, then after_cursor=cursor for newer entries, oldest first.

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": {
      "profile": "<profile>"
    },
    "name": "sn_syslog"
  }
}

Input Schema

NameRequiredDescriptionDefault
tailNoStart a tail: newest entries plus a cursor
levelNoFilter by severity level: a name (error, warning, info, debug) or the numeric value syslog stores (-1=debug, 0=info, 1=warning, 2=error)
limitNoMax records (default 25, max 1000)
sinceNoShow logs from last N minutes (default 60, max 525600)
fieldsNoFields to return (default: sys_id,level,source,message,sys_created_on)
offsetNoPagination offset (max 10000)
sourceNoFilter by source field (LIKE match)
messageNoFilter message contains text (LIKE match)
profileYesConfigured ServiceNow profile name (required; no default fallback).
after_cursorNoCursor from the last call. Same level/source/message; since ignored

Output Schema

NameRequiredDescriptionDefault
dataYes
profileYesConfigured ServiceNow profile name (required; no default fallback).
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.3.0
    • addedInput schema / properties / after_cursor
      Added value: +{
      +  "description": "Cursor from the last call. Same level/source/message; since ignored",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / tail
      Added value: +{
      +  "description": "Start a tail: newest entries plus a cursor",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / cursor
      Added value: +{
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedOutput schema / properties / metadata / properties / cache
      Added value: +{
      +  "enum": [
      +    "hit",
      +    "miss",
      +    "bypass",
      +    "mixed"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / metadata / properties / timing
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "total_ms": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "upstream_ms": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "watermark_ms": {
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "total_ms",
      +    "upstream_ms",
      +    "watermark_ms"
      +  ],
      +  "type": "object"
      +}
  2. Changed18 schema fields changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / level / description
      Previous value: -"Filter by severity level"New value: +"Filter by severity level: a name (error, warning, info, debug) or the numeric value syslog stores (-1=debug, 0=info, 1=warning, 2=error)"
    • changedInput schema / properties / level / enum
      Previous value: -[
      -  "error",
      -  "warning",
      -  "info",
      -  "debug"
      -]New value: +[
      +  "0",
      +  "1",
      +  "2",
      +  "error",
      +  "warning",
      +  "info",
      +  "debug",
      +  "-1"
      +]
    • addedInput schema / properties / limit / default
      Added value: +25
    • changedInput schema / properties / limit / description
      Previous value: -"Max records (default 25)"New value: +"Max records (default 25, max 1000)"
    • addedInput schema / properties / limit / maximum
      Added value: +1000
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Pagination offset (max 10000)",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / profile
      Added value: +{
      +  "description": "Configured ServiceNow profile name (required; no default fallback).",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / query
      Removed value: -{
      -  "description": "Raw encoded query (overrides individual filters)",
      -  "type": "string"
      -}
    • addedInput schema / properties / since / default
      Added value: +60
    • changedInput schema / properties / since / description
      Previous value: -"Show logs from last N minutes (default 60)"New value: +"Show logs from last N minutes (default 60, max 525600)"
    • addedInput schema / properties / since / maximum
      Added value: +525600
    • addedInput schema / properties / since / minimum
      Added value: +1
    • changedInput schema / properties / since / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / required
      Previous value: -[]New value: +[
      +  "profile"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "dropped_records": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "has_more": {
      +          "type": "boolean"
      +        },
      +        "hint": {
      +          "type": "string"
      +        },
      +        "next_offset": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "record_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "results": {
      +          "items": {},
      +          "type": "array"
      +        },
      +        "total": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "truncated": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "record_count",
      +        "has_more",
      +        "results"
      +      ],
      +      "type": "object"
      +    },
      +    "metadata": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "kind": {
      +          "enum": [
      +            "single",
      +            "collection",
      +            "operation"
      +          ],
      +          "type": "string"
      +        },
      +        "limits": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "max_bytes": {
      +              "maximum": 14680064,
      +              "minimum": 1000,
      +              "type": "integer"
      +            },
      +            "max_records": {
      +              "exclusiveMinimum": 0,
      +              "maximum": 9007199254740991,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "max_records",
      +            "max_bytes"
      +          ],
      +          "type": "object"
      +        },
      +        "pagination": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "mode": {
      +                  "const": "none",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "mode"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "has_more": {
      +                  "type": "boolean"
      +                },
      +                "limit": {
      +                  "exclusiveMinimum": 0,
      +                  "maximum": 9007199254740991,
      +                  "type": "integer"
      +                },
      +                "mode": {
      +                  "const": "offset",
      +                  "type": "string"
      +                },
      +                "next_offset": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "offset": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "order_by": {
      +                  "items": {
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  "maxItems": 8,
      +                  "minItems": 1,
      +                  "type": "array"
      +                },
      +                "recovery": {
      +                  "const": "adjust_request_and_retry_same_offset",
      +                  "type": "string"
      +                },
      +                "returned": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "mode",
      +                "limit",
      +                "offset",
      +                "returned",
      +                "has_more",
      +                "order_by"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "record_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "truncation": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "dropped_records": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "reason": {
      +              "enum": [
      +                "record_limit",
      +                "byte_limit"
      +              ],
      +              "type": "string"
      +            },
      +            "truncated": {
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "truncated"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "record_count",
      +        "limits",
      +        "pagination",
      +        "truncation"
      +      ],
      +      "type": "object"
      +    },
      +    "profile": {
      +      "description": "Configured ServiceNow profile name (required; no default fallback).",
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "metadata",
      +    "profile"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely useful behavior: results are newest first by default but oldest first when tailing, and 'since' is ignored once after_cursor is supplied. It does not mention permissions, rate limits, or truncation, so this is solid but not rich.

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?

Three short sentences, front-loaded with the core purpose and filter dimensions, followed by the tail recipe. The pagination-metadata enumeration (record_count, total, has_more, next_offset) is redundant given an output schema exists, but the rest earns its space.

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?

For a 10-parameter query tool with a rich annotation set and an output schema, the description covers what structured fields cannot: the ordering difference between normal and tail modes and how tail plus after_cursor compose. Only the omission of any contrast with sibling query tools keeps it below 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 every parameter is already documented, including that after_cursor ignores 'since'. The description mostly restates filter axes and the tail/cursor pairing rather than adding syntax or edge cases beyond the schema. 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 and resource ('Query ServiceNow system logs (syslog table)') plus the three filter axes (severity, source, time). That is enough to separate it from the generic table-query sibling, though no sibling is named explicitly, so the differentiation is inferred rather than declared.

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?

Gives a concrete procedural when-to-use for the non-obvious mode: 'To tail: tail=true, then after_cursor=cursor for newer entries, oldest first.' That resolves the ambiguous choice between offset pagination and cursor tailing. It does not state when to prefer this over sn_query or any exclusion, so it falls short of a 5.

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