Skip to main content
Glama

get_audit_log

Read-onlyIdempotent

List organization audit-log entries for mutating and authentication events, newest first, to review security and account activity. Results are limited to plan retention and require an org key.

Instructions

List audit-log entries for the calling org — mutating operations and auth-lifecycle events, newest first. Results are clamped to the plan's retention window. Requires an Organization key (chr_sk_*); Agent keys cannot read the org-wide audit log.

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_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of the window (ISO 8601)
fromNoStart of the window (ISO 8601). Silently clamped to the plan retention window if older.
limitNoMax results to return (default 50)
actionNoFilter by action name (e.g. event.create, agent_key.revoke). Legacy names are matched by their current names.
cursorNoOpaque pagination cursor from a previous response
actor_idNoFilter by actor id (an API key id, the org id for console sessions, or the connection id for oauth_app)
categoryNoFilter by action category (e.g. keys, calendars, billing, security)
resourceNoFilter by an entity id or id prefix the request touched (e.g. cal_abc123 or cal_)
actor_typeNoFilter by who acted: session (console), org_key, agent_key, oauth_app (an app connected by signing in) or system
request_idNoFilter by request id (the X-Request-Id of the original call)
status_classNoFilter by response status class: 2xx, 3xx, 4xx or 5xx
actor_key_prefixNoFilter by the API key prefix that performed the action

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.8.4
    • changedInput schema / properties / actor_id / description
      Previous value: -"Filter by actor id (an API key id, or the org id for console sessions)"New value: +"Filter by actor id (an API key id, the org id for console sessions, or the connection id for oauth_app)"
    • changedInput schema / properties / actor_type / description
      Previous value: -"Filter by who acted: session (console), org_key, agent_key or system"New value: +"Filter by who acted: session (console), org_key, agent_key, oauth_app (an app connected by signing in) or system"
    • changedInput schema / properties / actor_type / enum
      Previous value: -[
      -  "session",
      -  "org_key",
      -  "agent_key",
      -  "system"
      -]New value: +[
      +  "session",
      +  "org_key",
      +  "agent_key",
      +  "oauth_app",
      +  "system"
      +]
  2. Changed7 schema fields changedv1.6.2
    • changedInput schema / properties / action / description
      Previous value: -"Filter by action name (e.g. event.created)"New value: +"Filter by action name (e.g. event.create, agent_key.revoke). Legacy names are matched by their current names."
    • addedInput schema / properties / actor_id
      Added value: +{
      +  "description": "Filter by actor id (an API key id, or the org id for console sessions)",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / actor_type
      Added value: +{
      +  "description": "Filter by who acted: session (console), org_key, agent_key or system",
      +  "enum": [
      +    "session",
      +    "org_key",
      +    "agent_key",
      +    "system"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / category
      Added value: +{
      +  "description": "Filter by action category (e.g. keys, calendars, billing, security)",
      +  "enum": [
      +    "account",
      +    "keys",
      +    "agents",
      +    "calendars",
      +    "events",
      +    "scheduling",
      +    "webhooks",
      +    "human_calendars",
      +    "billing",
      +    "security"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / request_id
      Added value: +{
      +  "description": "Filter by request id (the X-Request-Id of the original call)",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / resource
      Added value: +{
      +  "description": "Filter by an entity id or id prefix the request touched (e.g. cal_abc123 or cal_)",
      +  "maxLength": 64,
      +  "pattern": "^[a-z]{2,5}_[A-Za-z0-9_-]*$",
      +  "type": "string"
      +}
    • addedInput schema / properties / status_class
      Added value: +{
      +  "description": "Filter by response status class: 2xx, 3xx, 4xx or 5xx",
      +  "enum": [
      +    "2xx",
      +    "3xx",
      +    "4xx",
      +    "5xx"
      +  ],
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv1.5.3
    • changedInput schema / properties / from / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    • changedInput schema / properties / to / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"New value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
  4. First observedv1.2.5

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds real behavior beyond that: results are clamped to the plan's retention window (and 'from' is silently clamped), ordering is newest-first, and read access requires an Organization key (chr_sk_*) rather than an Agent key. It omits rate limits and error behavior, which keeps it from a 5.

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?

Two compact sentences with zero redundancy: scope and content are front-loaded, then access constraints. Every clause carries non-redundant information not present in annotations or schema.

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 12-parameter read tool with no output schema, the description covers the essentials an agent needs (org scope, ordering, retention window, auth requirement). Pagination mechanics and the default page size are left to the schema's cursor and limit descriptions, which is acceptable since coverage there is complete.

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%, including defaults, enums, patterns and format constraints, so the schema carries parameter meaning. The description only echoes the retention clamping already documented on 'from' and adds no filter-selection guidance (e.g. how action, category and resource combine), so baseline 3 is appropriate.

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 (list audit-log entries), names the scope (the calling org), enumerates the event types covered (mutating operations and auth-lifecycle events), and specifies ordering (newest first). No sibling tool in the catalog lists the audit log, so an agent can identify this as the sole tool for this resource without ambiguity.

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?

Clear context: it says what the log covers and who may read it, and it rules out one caller class explicitly (Agent keys cannot read the org-wide audit log). It does not name an alternative for narrower or per-resource activity, but no obvious sibling covers that same ground, so the gap is small.

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