Skip to main content
Glama

get_session_insights

Analyze sessions to reveal persona usage, consultation frequency, decision trends, and health metrics for actionable insights.

Instructions

Get comprehensive analytics and insights for a session.

Provides data-driven insights into persona usage patterns, consultation frequency, decision-making trends, and session health metrics.

Args: session_id: Session identifier project_root: Absolute path to project root (for local sessions) time_range: Analysis window: - "all_time" (default): All consultations - "last_7_days": Last 7 days - "last_30_days": Last 30 days format: Output format ("markdown", "json", "text")

Returns: Formatted analytics report with: - Persona usage statistics (most/least used) - Context distribution (CRISIS, SECURITY, etc.) - Mode usage (orchestrated, quick, crisis, standards) - Decision metrics and velocity - Session health indicators

Examples: # Get all-time insights get_session_insights(session_id="my-project")

# Last 30 days in JSON
get_session_insights(
    session_id="my-project",
    time_range="last_30_days",
    format="json"
)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNomarkdown
session_idNodefault
time_rangeNoall_time
project_rootNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/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 explicitly details what the tool returns (including specific report sections) and clarifies parameter behavior (e.g., project_root is 'for local sessions', time_range options, format options). It does not explicitly state whether the operation is read-only or has side effects, but the 'Get' verb and analytic nature make it strongly inferred as non-mutating.

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 clear sections (overview, Args, Returns, Examples) and is appropriately sized for the complexity. It includes useful examples and return details without excessive verbosity. Slightly longer than necessary, but every sentence earns its place by providing actionable information.

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

Completeness5/5

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

Given the tool's complexity (4 parameters, rich analytics output) and the absence of annotations or an output schema, the description is exceptionally complete. It covers purpose, parameter semantics, return format, and usage examples. The output section clearly enumerates what the report will contain, making it easy for an agent to understand the tool's capabilities and limitations.

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%, but the description compensates fully by providing detailed semantics for every parameter: session_id ('Session identifier'), project_root ('Absolute path to project root'), time_range (with enumerated values and defaults), and format (with allowed values). This goes far beyond the bare schema and adds essential context for proper usage.

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

Purpose5/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: 'Get comprehensive analytics and insights for a session.' It uses a specific verb ('Get') and resource ('session insights'), and enumerates the types of insights (persona usage, decision trends, health metrics). This distinguishes it from sibling tools like get_session_summary, which likely provides a basic summary rather than deep analytics.

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

Usage Guidelines3/5

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

The description implies usage through parameter explanations and examples (e.g., 'Get all-time insights', 'Last 30 days in JSON'), but does not explicitly state when to choose this tool over alternatives like get_session_summary or export_session_summary. There are no exclusions or alternative recommendations, so guidance is implied rather than explicit.

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/amarodeabreu/sensei-mcp'

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