Skip to main content
Glama

get_acl_audit

Retrieve ACL audit logs to investigate connection failures and audit access patterns by filtering username, reason, or time range.

Instructions

Get persisted ACL audit log entries from storage. Filter by username, reason (auth, command, key, channel), or time range. Use this to investigate why a connection is failing or audit access patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameNoFilter by username
reasonNoFilter by reason (auth, command, key, channel)
startTimeNoStart time (Unix timestamp ms)
endTimeNoEnd time (Unix timestamp ms)
limitNoMax entries to return
instanceIdNoOptional instance ID override

Implementation Reference

  • The handler function for 'get_acl_audit' which fetches the ACL audit log data from the API based on provided query parameters.
    async ({ username, reason, startTime, endTime, limit, instanceId }) => {
      const id = resolveInstanceId(instanceId);
      const qs = buildQuery({ username, reason, startTime, endTime, limit });
      const data = await apiFetch(`/mcp/instance/${id}/audit${qs}`);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • The registration of the 'get_acl_audit' tool using server.tool, including the definition of its schema/arguments.
    server.tool(
      'get_acl_audit',
      'Get persisted ACL audit log entries from storage. Filter by username, reason (auth, command, key, channel), or time range. Use this to investigate why a connection is failing or audit access patterns.',
      {
        username: z.string().optional().describe('Filter by username'),
        reason: z.string().optional().describe('Filter by reason (auth, command, key, channel)'),
        startTime: z.number().optional().describe('Start time (Unix timestamp ms)'),
        endTime: z.number().optional().describe('End time (Unix timestamp ms)'),
        limit: z.number().optional().describe('Max entries to return'),
        instanceId: z.string().optional().describe('Optional instance ID override'),
      },

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/BetterDB-inc/monitor'

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