Skip to main content
Glama

get_audit_log

Retrieve audit log entries from PolicyGuard to monitor compliance, investigate policy violations, and track administrative actions with customizable filters.

Instructions

Retrieve audit log entries for compliance and investigation.

The audit log records all action validations, policy violations, and administrative actions performed through Guardian Agent.

Args: agent_id: Filter by specific agent ID (optional) action_type: Filter by action type like "tool_call", "resource_access" (optional) time_range: Time range to query - "1h", "24h", "7d", "30d" (default: "24h") status: Filter by status - "allowed", "denied", or "" for all (optional) limit: Maximum number of entries to return (default: 100)

Returns: JSON string with: - entries: Array of audit log entries - count: Number of entries returned - total: Total entries matching filter (before limit) - time_range: The time range used - filters_applied: Summary of filters used

Example: # Get all denied actions in the last hour get_audit_log(time_range="1h", status="denied")

# Get all actions by a specific agent
get_audit_log(agent_id="prod-agent-01", time_range="7d")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idNo
action_typeNo
time_rangeNo24h
statusNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what the tool retrieves (audit log entries with specific filters) and includes return format details, which is helpful. However, it lacks critical behavioral traits: it doesn't mention whether this is a read-only operation, if it requires specific permissions, rate limits, pagination behavior beyond the 'limit' parameter, or error conditions. The description adds value but leaves significant gaps.

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

Conciseness4/5

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

The description is well-structured with purpose statement, parameter documentation, return format, and examples. It's appropriately sized for a 5-parameter tool with output details. While efficient, the initial purpose sentence could be more front-loaded with key distinguishing information, and some sections (like the Returns block) are slightly verbose but still valuable.

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?

Given the tool's moderate complexity (5 parameters, no annotations, but has output schema), the description is reasonably complete. It fully documents parameters and return format, and the output schema reduces the need to explain return values in detail. However, it lacks behavioral context (permissions, safety, rate limits) and sibling differentiation, which are important gaps for a compliance/investigation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It does this excellently: it documents all 5 parameters with clear semantics, optional/default status, allowed values (e.g., time_range options, status values), and practical examples. The description adds substantial meaning beyond what the bare schema provides, making parameters fully understandable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Retrieve audit log entries for compliance and investigation.' It specifies the verb ('Retrieve') and resource ('audit log entries'), and mentions the system context ('Guardian Agent'). However, it doesn't explicitly differentiate from sibling tools like 'get_compliance_status' or 'report_incident', which might have overlapping compliance/investigation domains.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_compliance_status' or 'validate_action', nor does it specify prerequisites, exclusions, or typical use cases beyond generic 'compliance and investigation'. The examples show how to call it, but not when it's the appropriate choice.

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/PrateekKumar1709/policyguard'

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