Skip to main content
Glama
io.github.ryanmat/logicmonitor

io.github.ryanmat/logicmonitor

by ryanmat

get_audit_logs

Read-onlyIdempotent

Read the LogicMonitor portal audit log to see who did what and when, filtering by user, time, action, configuration changes, logins, or API token activity.

Instructions

Read the portal audit log: call this for who did what and when. kind='all' returns one page of entries, newest first; kind='change' returns the configuration changes (create, update, delete or import, read from each entry's description) found in a pool of the newest entries, with scanned and has_more; kind='login' returns portal sign-ins, sign-outs and failed logins, one query per login wording (up to six calls), with status and method per row, success_only or failed_only, and total as a lower bound while has_more is true; kind='api_token' returns the rows naming an API token, given by access_id or token_id (read to its access ID), keeping only that exact access ID, with event (change, rejected, throttled), path and method per row. username is an exact name or a comma-separated list; action and resource_type (kinds all and change) are whole words the description holds (the portal applies one, the second is matched on the fetched page); start_time and end_time bound the entry time in epoch seconds. System and automation actors (System:*, LogicMonitor Internal, cloud auto-delete) are dropped after the fetch for kinds all and change unless exclude_system is false or a username is given; dropped counts them and paging follows the rows the portal returned. An argument another kind reads is refused. offset plus the rows read must stay within 10,000, and the filter within about 900 characters.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_audit_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoall: every entry; change: configuration changes; login: portal logins; api_token: rows naming an API tokenall
limitNoMax results
actionNoWhole words the description holds, e.g. Action=Delete
offsetNoPagination offset
end_timeNoOnly entries at or before this epoch second
token_idNoWith kind api_token: the token's id, read to its access ID
usernameNoExact username, or a comma-separated list
access_idNoWith kind api_token: the token's whole access ID
start_timeNoOnly entries at or after this epoch second
change_typeNoWith kind change: the change type to keep
failed_onlyNoWith kind login: failed logins only
success_onlyNoWith kind login: successful logins only
resource_typeNoWhole words the description holds, e.g. Type=Device
exclude_systemNoDrop system and automation actors (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv5.0.1
    • addedInput schema / properties / access_id
      Added value: +{
      +  "description": "With kind api_token: the token's whole access ID",
      +  "type": "string"
      +}
    • changedInput schema / properties / action / description
      Previous value: -"Filter by action type"New value: +"Whole words the description holds, e.g. Action=Delete"
    • addedInput schema / properties / change_type
      Added value: +{
      +  "description": "With kind change: the change type to keep",
      +  "enum": [
      +    "create",
      +    "update",
      +    "delete",
      +    "import"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / end_time / description
      Previous value: -"End time in epoch seconds (optional)"New value: +"Only entries at or before this epoch second"
    • addedInput schema / properties / exclude_system
      Added value: +{
      +  "default": true,
      +  "description": "Drop system and automation actors (default true)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / failed_only
      Added value: +{
      +  "default": false,
      +  "description": "With kind login: failed logins only",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / kind
      Added value: +{
      +  "default": "all",
      +  "description": "all: every entry; change: configuration changes; login: portal logins; api_token: rows naming an API token",
      +  "enum": [
      +    "all",
      +    "change",
      +    "login",
      +    "api_token"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / resource_type / description
      Previous value: -"Filter by resource type"New value: +"Whole words the description holds, e.g. Type=Device"
    • changedInput schema / properties / start_time / description
      Previous value: -"Start time in epoch seconds (optional)"New value: +"Only entries at or after this epoch second"
    • addedInput schema / properties / success_only
      Added value: +{
      +  "default": false,
      +  "description": "With kind login: successful logins only",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / token_id
      Added value: +{
      +  "description": "With kind api_token: the token's id, read to its access ID",
      +  "type": "integer"
      +}
    • changedInput schema / properties / username / description
      Previous value: -"Filter by username"New value: +"Exact username, or a comma-separated list"
  2. First observedv4.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (which only cover read-only/idempotent safety) by disclosing post-fetch filtering of System:*/LogicMonitor Internal/cloud auto-delete actors, that dropped rows are still counted and paging follows the portal's returned rows, the 10,000 offset ceiling, the ~900-character filter limit, and that login kind may require up to six calls. It also flags that total is only a lower bound while has_more is true — exactly the behavioral caveats an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every clause carries information, but the description is a single dense run-on stitched with semicolons rather than a front-loaded summary with per-kind structure. An agent must parse a long compound sentence to extract the routing rules, which costs more than it should.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter tool with four operating modes and no output schema, the description covers filtering, pagination limits, post-fetch actor exclusion, and even the per-row fields returned for login and api_token kinds. Nothing an agent needs in order to call it correctly appears to be missing.

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?

With 100% schema coverage the baseline is 3, and the description earns above that by adding real semantics: token_id is resolved to its access ID and only that exact ID is kept, username accepts a comma-separated list, times are epoch seconds, and crucially that for action/resource_type the portal applies one filter while the second is matched on the fetched page — a distinction invisible in the schema.

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?

States a specific verb and resource ('Read the portal audit log') and immediately frames the use case ('who did what and when'). The four kind modes are each described concretely enough that an agent can tell what data comes back without opening the schema.

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 clear per-kind selection guidance (change for configuration changes, login for sign-ins, api_token for token-naming rows) and states the constraint that an argument belonging to another kind is refused. It does not point at any sibling tool or say when a different tool would be preferable, which keeps it off a 5.

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

Deploy Server

Other Tools