Skip to main content
Glama

Query Audit Events

query_audit_events
Read-onlyIdempotent

Query the Control Plane audit trail for mutations on one or more resources of the same kind. Omit name and names to fetch every event for that kind in the org. Supply names to audit multiple resources in one call (events are merged and sorted newest-first). Supports filtering by subject, audit context, and time range. Platform events live in the built-in cpln context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd time — ISO 8601 OR a relative duration meaning that long ago (units m/h/d/w/mo/y; months are "mo"). Only valid with `from`.
gvcNoGVC name. Required when `kind` is GVC-scoped (workload, identity, dbcluster, volumeset) AND `name`/`names` is provided.
orgYesOrganization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants.
fromNoStart time — ISO 8601 (e.g. "2025-10-23T07:00:00Z") OR a relative duration meaning that long ago (units m/h/d/w/mo/y; months are "mo", e.g. "3mo"). Overrides `since`.
kindYesResource kind to query audit events for — singular, exact spelling (e.g., "workload", "secret", "policy", "identity", "auditctx", "gvc"). With a custom `context`, kind instead matches the arbitrary `resource.type` your workload wrote (e.g., "order").
nameNoSingle resource name. Mutually exclusive with `names`. Omit both to query every resource of that kind in the org.
limitNoMaximum events to return in the merged result (default: 50, max: 1000).
namesNoMultiple resource names to audit in one call. Merges events from all named resources, sorted newest-first. Max 25 names. Mutually exclusive with `name`.
sinceNoRelative lookback window from now (default: "7d"). Examples: "1h", "24h", "7d", "30d". Mutually exclusive with from/to.
contextNoAudit context name (default: "cpln"). Use a custom context name to query workload-written events.
subjectNoFilter by subject: user email (contains "@"), full link (starts with "/"), or bare service-account name (auto-resolved to /org/{org}/serviceaccount/{name}).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the call succeeded.
dataNoThe full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary.
summaryYesOne-line summary of the result.
nextStepsNoRecommended follow-up actions for this task, in order.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds useful behavioral context beyond annotations: events are "merged and sorted newest-first" when multiple names are supplied, and platform events live in the built-in `cpln` context. This exceeds the baseline but stops short of describing pagination or edge cases.

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 three sentences, each earning its place: purpose, usage variants, filtering/context note. No redundancy or fluff. It is front-loaded with the core purpose in the first sentence.

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?

The description covers the key high-level behaviors: audit trail, mutations, same-kind scope, all/single/multiple mode, filtering capabilities, and the default cpln context. With a rich schema and an output schema present, it does not need to explain parameter syntax. Minor gap: it does not mention when custom contexts are relevant for workload-written events, which is left to 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%, so the baseline is 3. The description does reference `name` and `names` and their omit/supply behavior, but this information is already present in the schema descriptions. No additional parameter meaning is added, so the score remains at the baseline.

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 opens with a specific verb and resource: "Query the Control Plane audit trail for mutations on one or more resources of the same kind." This clearly distinguishes the tool from sibling tools like query_metrics, query_traces, and get_resource, which target different data. The scope (mutations, same kind) is explicit.

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 gives actionable guidance: "Omit `name` and `names` to fetch every event... Supply `names` to audit multiple resources in one call." It also mentions filtering by subject, context, and time range. However, it does not explicitly name alternative tools or state when not to use this tool, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation5/5

Every tool targets a distinct resource/action pair (e.g., get_resource vs get_resource_schema, list_deployments vs list_workload_replicas) and descriptions clearly differentiate purposes. No two tools appear to do the same thing.

Naming Consistency5/5

All tools follow a verb_noun snake_case pattern (create_gvc, update_workload, list_resources, query_metrics) with consistent verbs. The few imperative verbs (browse, build, mount) still maintain the same verb-first structure.

Tool Count1/5

With 55 tools, this server far exceeds the typical well-scoped 3-15 tool range. While each tool appears purposeful, the sheer number creates selection overhead and falls into the extreme 50+ category on the rubric.

Completeness4/5

The surface covers nearly the full Control Plane lifecycle: CRUD for GVC, workload, identity, policy, volumeset, and domain, plus observability, templates, image builds, and Terraform. Minor gaps include referenced but missing configure_workload_* tools and no secret creation/deletion (by design).