Skip to main content
Glama
sonisoft-cnanda

now-sdk-ext-mcp

Get Flow Execution Logs

get_flow_logs
Read-only

Retrieve flow execution logs for a context ID to debug errors, warnings, and cancellation reasons. Provides step-level output for troubleshooting ServiceNow flow runs.

Instructions

Retrieve flow execution log entries from sys_flow_log for a given context.

Log entries include error messages, step-level debug output, and cancellation reasons. Use this alongside get_flow_execution_details to get the full picture of what happened during an execution.

Note: Log entries may be empty for simple successful executions, or if the flow's reporting level is set to NONE. Errors and warnings are always logged regardless of the reporting level setting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of log entries to return. Default: 100.
instanceNoThe ServiceNow instance auth alias to use. This is the alias configured via `now-sdk auth --add` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable.
context_idYesThe flow context sys_id returned by test_flow, execute_flow, execute_subflow, or execute_action.
order_directionNoOrder direction: "asc" (default, oldest first) or "desc" (newest first).
Behavior4/5

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

Beyond the readOnlyHint annotation, the description adds valuable behavioral details: it explains that log entries include errors, debug output, and cancellation reasons, and that logs may be empty depending on execution success or reporting level. It also asserts that errors/warnings are always logged regardless of reporting level, which is important context not captured by annotations.

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 concise and front-loaded: the first sentence states the core action, the second details content, and the third gives a critical caveat. Every sentence earns its place without repetition or fluff.

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?

Although there is no output schema, the description clarifies what the tool returns (log entries with specific content) and when it may be empty. It also references the companion tool for a fuller picture. This is sufficient for a relatively simple read-only tool, with minor omissions like pagination behavior being covered by the limit parameter in the schema.

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%, with each parameter already having a meaningful description (e.g., context_id identifies the flow execution, limit sets max entries, order_direction sorts). The description does not add extra parameter semantics, so it stays at the baseline for full schema coverage.

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 the tool's function: 'Retrieve flow execution log entries from sys_flow_log for a given context.' It specifies the source table and the input (context), and distinguishes itself from the sibling get_flow_execution_details by being the log retrieval counterpart.

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

Usage Guidelines5/5

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

The description explicitly recommends using this tool 'alongside get_flow_execution_details to get the full picture,' providing a clear alternative/complement. It also gives situational context by noting log entries may be empty for simple successes or when reporting level is NONE, and that errors/warnings are always logged.

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/sonisoft-cnanda/now-sdk-ext-mcp'

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