Skip to main content
Glama

Query System Logs

servicenow_query_logs
Read-onlyIdempotent

Retrieve ServiceNow system log entries by level, source, or time window to identify errors, warnings, and debug messages for troubleshooting.

Instructions

Query the ServiceNow system log (syslog table) for errors, warnings, and debug messages.

Args:

  • query (string): Encoded query filter (e.g., 'level=3', 'sourceLIKEBusinessRule', 'messageLIKEError')

  • level (string): Minimum log level to include: 'debug'(0), 'info'(1), 'warning'(2), 'error'(3). Default: 'warning'

  • source (string): Filter by log source (e.g., 'BusinessRule', 'ScriptInclude', 'Workflow')

  • since_minutes (number): Only return logs from the last N minutes (default: 60)

  • limit / offset: Pagination

  • response_format: Output format

Log levels: 0=Debug, 1=Info, 2=Warning, 3=Error

Returns: Log entries with timestamp, level, source, and message

Examples:

  • Recent errors → level="error"

  • Business rule failures → source="BusinessRule", level="error"

  • Logs for a specific operation → query="messageLIKEMyScriptInclude"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoMinimum log level (default: warning)warning
limitNoMaximum number of results to return (1–100, default 20)
queryNoEncoded ServiceNow query string (e.g., 'state=1^priority=1^assigned_to=javascript:gs.getUserID()'). Leave empty to return all records.
offsetNoNumber of results to skip for pagination (default 0)
sourceNoFilter by log source (partial match)
since_minutesNoOnly logs from the last N minutes (default: 60)
response_formatNoOutput format: 'markdown' (default) for human-readable or 'json' for structured datamarkdown
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds value by detailing the return structure ('Log entries with timestamp, level, source, and message'), the log level numeric mapping (0=Debug, 1=Info, 2=Warning, 3=Error), and default behaviors (default level warning, since_minutes 60). This context goes beyond what annotations provide and clarifies the tool's behavior.

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?

The description is well-organized with clear sections (Purpose, Args, Log levels, Returns, Examples). It is slightly verbose due to the extra 'Log levels' section that partly duplicates the level parameter explanation, but the structure and examples earn their place. The core purpose is front-loaded in the first sentence, and the examples are highly useful for an AI agent.

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?

Given the absence of an output schema, the description appropriately explains return values ('Log entries with timestamp, level, source, and message'). It covers all 7 parameters implicitly through the Args list and examples, including pagination (limit/offset) and response_format. It does not discuss potential auth or rate limits, but for a read-only query tool with strong annotations and a clear description, it is sufficiently complete for an agent to use it 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?

Schema coverage is 100%, so the baseline is 3. The description adds domain-specific meaning by giving examples for the query parameter ('level=3', 'sourceLIKEBusinessRule', 'messageLIKEError') and expanding on source with common values ('BusinessRule', 'ScriptInclude', 'Workflow'). It also clarifies the level values as strings and their numeric equivalents, which the schema lists but without the mapping. This added context helps an agent construct correct parameters.

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 clearly states 'Query the ServiceNow system log (syslog table) for errors, warnings, and debug messages.' It names the specific resource (syslog table) and the verb 'Query', making it distinct from sibling query tools like servicenow_query_records which targets other tables. The purpose is immediately evident.

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?

The description provides concrete usage examples ('Recent errors → level="error"', 'Business rule failures → source="BusinessRule", level="error"', 'Logs for a specific operation → query="messageLIKEMyScriptInclude"') that illustrate when to use the tool. It does not explicitly mention alternatives or when NOT to use it, but the examples create clear context for typical use cases, which meets the 'clear context, no exclusions' level.

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/kylburns89/servicenow-mcp-server'

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