Skip to main content
Glama

get_session_log

Read-only

Retrieve the full audit log for an agent session to review every command, safety check, and blocked attempt and replay exactly what the agent issued.

Instructions

Return the full audit log for an agent session.

        Every tool call made by an agent is recorded with a session ID — a UUID
        generated when the MCP server starts.  Use this tool to replay exactly
        what an agent issued during a session: every command, every safety check
        that fired, every blocked attempt.

        Args:
            session_id: Session UUID to query.  Omit to use the current session.
            limit: Maximum records to return (default 100, max 500).
        

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_session_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum records to return (default 100, max 500). Default: 100.
session_idNoSession UUID to query. Omit to use the current session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.1
    • changedInput schema / properties / limit / description
      Previous value: -"Default: 100."New value: +"Maximum records to return (default 100, max 500). Default: 100."
    • addedInput schema / properties / session_id / description
      Added value: +"Session UUID to query.  Omit to use the current session."
  2. Changed3 schema fields changedv1.5.0
    • removedInput schema / properties / limit / default
      Removed value: -100
    • addedInput schema / properties / limit / description
      Added value: +"Default: 100."
    • removedInput schema / properties / session_id / default
      Removed value: -null
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already establish that this is a read-only, non-destructive, non-federated operation, so the safety story is covered. The description adds genuinely useful content about what is recorded (commands, safety checks that fired, blocked attempts) and the provenance of the session ID. It omits ordering, truncation behavior when more records exist than the limit, and what happens when an unknown or expired session_id is supplied.

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 key statement is front-loaded in one sentence and the replay scenario follows naturally. The trailing 'Args' section duplicates the input schema verbatim, which is mild padding, but the text is otherwise tight and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read-only tool with annotations and a fully described schema, most of what an agent needs is present. The remaining gaps are result-shape hints (ordering, pagination beyond the limit) and disambiguation from the other audit-log and reflog tools in the sibling set.

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 coverage is 100% and both parameters already carry descriptions with defaults and the max cap. The 'Args' block in the description restates the same facts ('omit to use the current session', default 100, max 500) without adding ordering, filtering, or format semantics, so it earns only the 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 opening sentence gives a specific verb and resource: 'Return the full audit log for an agent session.' The follow-up clarifies that every tool call, safety check, and blocked attempt is captured, which sharpens the concept well. It does not distinguish this tool from nearby audit-trail siblings such as export_audit_log or get_reflog_entry, so an agent cannot route between them from the description alone.

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?

'Use this tool to replay exactly what an agent issued during a session' supplies a concrete use case, and the note that session IDs are UUIDs generated at server start tells the agent how to obtain the key. No exclusions or alternative tools are named, so the guidance is clear but incomplete.

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

Deploy Server

Other Tools