NowAIKit
Get started
Use cases Pricing Docs Contact Get started

Reporting & Analytics Guide

This guide covers the 13 reporting and analytics tools. Read tools require no special flags. Scheduled job write tools require WRITE_ENABLED=true.

Tool Overview

ToolDescriptionAPI UsedPermission
list_reportsList saved reportsTable API (sys_report)Read
get_reportGet report definitionTable APIRead
run_aggregate_queryGROUP BY query with COUNT/SUMStats API (/api/now/stats/{table})Read
trend_queryMonthly trend dataStats API (date bucketing)Read
get_performance_analyticsPA widget dataPA API (/api/now/pa/widget/{sys_id})Read
export_report_dataStructured data exportTable APIRead
get_sys_logSystem log entriesTable API (sys_log)Read
list_scheduled_jobsScheduled jobs listTable API (sys_trigger)Read
get_scheduled_jobGet a scheduled job recordTable API (sysauto)Read
create_scheduled_jobCreate a new scheduled scriptTable API (sysauto_script)Write
update_scheduled_jobUpdate schedule or scriptTable API (sysauto)Write
trigger_scheduled_jobForce immediate executionTable API (sysauto) PATCHWrite
list_job_run_historyExecution history logTable API (sysauto_trigger_log)Read

Report Generation (PDF & PPTX)

NowAIKit can generate branded PDF documents and PPTX slide decks from any capability analysis. Reports include severity charts, findings tables, priority recommendations, and clickable links to your ServiceNow instance.

Clickable Entity Linking

Every entity in the report is automatically linked to your instance:

Entity TypeExampleLinks To
Record numbersINC0010042, CHG0040012, PRB0000089Record detail page
System propertiesglide.ui.session_timeout, glide.security.use_csrf_tokensys_properties record
Scoped propertiessn_cmdb.health.enabled, sn_hr_core.configsys_properties record
Plugin IDscom.snc.cmdb, com.glide.emailv_plugin record
Table namessys_audit, cmdb_ci_server, sc_req_itemsys_db_object definition

The generate_report Tool

MCP Tool
generate_report:
  content: <markdown from any capability>
  format: pdf           # or pptx
  title: "Instance Health Scan"
  capability: scan-health # optional — used in filename

# Returns: { file_path, size_bytes, format }

What's in a Report

  • Branded cover page — instance URL, scan date, capability name, NowAIKit logo
  • Executive summary — overall score and key findings
  • Severity distribution chart — pie chart with Critical/High/Medium/Low breakdown
  • Findings by category — bar chart grouping findings by domain
  • Detailed findings table — severity, description, recommendation, affected artifacts
  • Priority recommendations — ranked action items with estimated impact
  • Clickable links — every record number, sys_property, plugin, and table name links to your instance
  • Professional footer — page numbers, generation timestamp

Multi-Capability Reports

Combine multiple capabilities into a single comprehensive report. Pass a sections array instead of content:

MCP Tool
generate_report:
  format: pdf
  title: "Comprehensive Instance Audit"
  capability: combined-audit
  sections:
    - title: "Instance Health Scan"
      capability: scan-health
      content: <scan-health markdown>
    - title: "Security Posture Audit"
      capability: scan-security
      content: <scan-security markdown>
    - title: "Code Review Analysis"
      capability: review-code
      content: <review-code markdown>

# Pick any combination of capabilities — 1, 3, or all 26.
# Each section becomes a chapter in the final document.

Sample Reports

Download sample PDFs generated from a demo instance to see the output quality:

Full Audit — All 6 Capabilities (286 KB)

Common Use Cases

Incident Trend by Priority (Last 6 Months)

Example
trend_query:
  table: incident
  date_field: opened_at
  group_by: priority
  periods: 6

# Returns monthly counts grouped by priority level.

SLA Compliance Rate

Example
run_aggregate_query:
  table: task_sla
  group_by: has_breached
  aggregate: COUNT

# Returns count of breached vs. compliant SLAs.

Top Teams by Open Incidents

Example
run_aggregate_query:
  table: incident
  group_by: assignment_group
  query: state!=6
  aggregate: COUNT

Performance Analytics Widget

Example
get_performance_analytics:
  widget_sys_id: <PA widget sys_id>
  time_range: last_30_days

# Uses the ServiceNow Performance Analytics API:
# GET /api/now/pa/widget/{sys_id}

Scheduled Job Workflows

Create and Schedule a Script

Workflow
# 1. Create a new daily script job
create_scheduled_job
  name="Nightly Cleanup"
  script="gs.info('running');"
  run_type="daily"
  run_time="02:00:00"

# 2. Verify the job was created
get_scheduled_job sys_id="<sys_id>"

# 3. Trigger immediately to test
trigger_scheduled_job sys_id="<sys_id>"

# 4. Check execution history
list_job_run_history job_sys_id="<sys_id>"

Update a Scheduled Job

Workflow
# 1. List all active scheduled jobs
list_scheduled_jobs active=true

# 2. Update the script or schedule
update_scheduled_job sys_id="<sys_id>"
  fields={script: "// updated script", run_type: "weekly"}

Latest Reporting APIs

APIEndpointNotes
Stats (Aggregate)GET /api/now/stats/{table}GROUP BY, SUM, COUNT, AVG
Performance AnalyticsGET /api/now/pa/widget/{sys_id}PA scorecard data
ReportingGET /api/now/reportingSaved report search (latest release)
Table (for sys_report)GET /api/now/table/sys_reportReport definitions