Skip to main content
Glama

gograph_session_audit

Read-onlyIdempotent

Audit completed agent sessions to grade Plan/Review rule compliance, composability/efficiency, and tool success rates, returning session details and recommendations.

Instructions

Review and grade agent compliance (Plan rule, Review rule, Composability/Efficiency) and tool success rates. Session IDs are strictly validated and only regular repository-confined logs are read. No additional prerequisite once the MCP server is running. WHEN TO USE: After ending a session to obtain compliance metrics and recommendations. RETURNS: Audited session details and grade.

Input Schema

NameRequiredDescriptionDefault
jsonNoSet to true to return structured JSON format instead of human-readable ASCII layout.
rootNoAbsolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.
intentionNoTechnical rationale, required for analytical calls selecting an active session.
session_idNoOptional session ID to audit. If not supplied, audits the most recent session in the repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.18
    • addedInput schema / properties / intention
      Added value: +{
      +  "description": "Technical rationale, required for analytical calls selecting an active session.",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.",
      +  "type": "string"
      +}
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuine context beyond that: session IDs are strictly validated, only regular repository-confined logs are read, and no prerequisites exist beyond the running server. The path-confinement and validation notes are exactly the kind of behavioral disclosure that matters here. It does not describe pagination or size limits on the audit output.

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 purpose is front-loaded in the first sentence, followed by a security note, a WHEN TO USE section, and a RETURNS section — a clean, scannable structure. A few sentences are near-redundant with the schema (session ID validation, repository confinement), costing a bit of tightness but not clarity.

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?

For a no-output-schema, all-optional-parameter read tool, the description supplies the trigger, the prerequisites, the return shape in prose, and the security boundary. An agent could call it correctly from this alone. Only minor gaps remain, such as whether a graded session persists or is recomputed on each call.

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%, so all four parameters already carry descriptions, including the root/checkout confinement rule and the intention rationale requirement. The description only echoes this with 'Session IDs are strictly validated,' adding little parameter-level meaning beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 names a specific verb (review/grade) and a specific resource (agent compliance against Plan, Review, and Composability/Efficiency rules, plus tool success rates). This is clearly distinct from data-graph siblings like gograph_review or gograph_plan. It stops short of naming the closest sibling (gograph_session_end) explicitly, but the 'after ending a session' framing does much of that work.

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?

'WHEN TO USE: After ending a session to obtain compliance metrics and recommendations' gives a concrete trigger point in the workflow. It also removes a common blocker with 'No additional prerequisite once the MCP server is running.' There is no explicit when-not guidance or named alternative for auditing a session without ending it, which keeps this below a 5.

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