Skip to main content
Glama

Query Audit

query_audit
Read-onlyIdempotent

Query audit events by action, time, or target, and inspect consolidation lifecycle records with the source filter.

Instructions

Advanced audit query. source='events' queries action/time/target audit events (for normal users prefer memory_activity); source='consolidation' inspects consolidation/lifecycle/reflection audit records (admin). Consolidates the legacy query_audit_events/query_consolidation_audit tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return.
scopeNoOptional scope that narrows memory access; leave blank for the token default.
sinceNoOnly include memories or activity on or after this ISO 8601 timestamp.
untilNoOnly include memories or activity on or before this ISO 8601 timestamp.
actionNoUsage action or audit-event action filter, depending on the tool.
bucketNoMemory bucket or namespace to read from or write to; use % only for tools that support wildcard reads.
offsetNoNumber of matching records to skip for pagination.
sourceNoOptional source filter for system statistics.events
target_idNoOptional audit target ID to filter audit events.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safety profile is covered. The description adds valuable context beyond annotations by explaining the meaning of the two source modes and that consolidation source is admin-only. It also mentions the consolidation of legacy tools, which implies a broader behavior scope. This is meaningful additional context that helps the agent understand the tool's behavior.

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 two sentences, front-loaded with 'Advanced audit query', and every clause earns its place. The first sentence packs the core purpose and both modes, while the second sentence notes the consolidation of legacy tools. There is zero redundancy or filler.

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?

The tool has 9 parameters but all are fully described in the schema, and an output schema exists, so return value details are not needed. The description covers the two usage modes, the admin requirement for consolidation, and the preferred alternative for normal users. This is complete for a complex query tool with rich structured metadata.

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?

The input schema has 100% parameter description coverage, so the baseline is 3. The description adds semantic value by explicitly explaining the 'source' parameter's allowed values ('events' and 'consolidation') and their meanings, which the schema does not (schema merely says 'Optional source filter for system statistics'). This goes beyond what the schema provides, making the description more helpful for correctly selecting source.

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 is an advanced audit query with two distinct source modes: 'events' for action/time/target audit events and 'consolidation' for lifecycle/reflection records. It differentiates itself from the sibling memory tools and even references a preferred alternative (memory_activity). The verb is precise ('queries', 'inspects') and the resource scope 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 Guidelines5/5

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

The description explicitly tells users when to use this tool: for audit events when source='events' and for consolidation/lifecycle audit records (admin-only). It also provides a clear exclusion: 'for normal users prefer memory_activity'. Additionally, it notes that this tool consolidates legacy query_audit_events/query_consolidation_audit tools, informing users migrating from those. This is explicit when/when-not guidance.

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/yonro/memory-os-cli'

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