Skip to main content
Glama

Query the MCP call audit log

query_audit_log
Read-only

Summarises the local audit log for MCP tool calls, highlighting credential exchanges and injected instructions within a chosen look-back window.

Instructions

Summarises the local audit log written by the plugin's hooks: MCP tool calls per server and tool, and every call where a credential was sent, a credential came back, or the output contained injected instructions. The log stores hashes and sizes only, never arguments or outputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
since_hoursNoLook-back window in hours.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), so the description's real value-add is the data-handling disclosure: the log stores only hashes and sizes, never arguments or outputs. That tells the agent what evidence it can and cannot retrieve, which is meaningful context beyond the annotations. It stops short of describing output format or result volume.

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?

A single dense sentence that front-loads what the tool summarises and then appends the privacy constraint. No filler, though the 2160-hour cap interaction is left implicit.

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?

With no output schema, the description does the work of explaining what the response contains (per-server/tool counts plus credential and injection flags) and what the underlying log does not retain. That is close to complete for a read-only, one-parameter query tool; only ordering/aggregation detail is missing.

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% for the single since_hours parameter with its default, maximum and exclusiveMinimum, so the schema carries the semantics. The description adds nothing about the time window or defaults, making 3 the correct baseline.

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 gives a specific verb (summarises) and resource (the local audit log written by the plugin's hooks), then enumerates exactly what the summary contains: per-server/per-tool call counts and flagged calls. That distinguishes it from config-oriented siblings like audit_mcp_config or audit_server_tools, though it never names an alternative explicitly.

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?

There is no statement of when to reach for this tool versus the other audit/security siblings, no prerequisites, and no exclusions. An agent can infer it is for reviewing historical call activity, but must guess the routing itself.

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