Skip to main content
Glama

get_agent_sessions

Retrieve an agent's session history to track past work and find related sessions. Filter by status to review active, completed, or terminated sessions.

Instructions

Get all sessions an agent has participated in. Track agent's work history.

AUTOMATIC TRIGGERS - Call this when:

  • User asks "what sessions have I been in?"

  • Looking for past work by a specific agent

  • Finding related sessions to continue work

PARAMETERS:

  • agent_id: Agent id and/or model name (matches ephemeral ids via agents.model)

  • requesting_agent_id: Must be same agent id/model identity (own history only)

  • status: Filter by session status - "active", "completed", "terminated" (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNo
agent_idYes
requesting_agent_idYes
Behavior4/5

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

No annotations are provided, so the description must carry the behavioral burden. It does so by disclosing important constraints: requesting_agent_id 'Must be same agent id/model identity (own history only)' and agent_id 'matches ephemeral ids via agents.model.' It does not describe return structure or side effects, but as a read-only query this is a minor gap rather than a serious omission.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a one-sentence summary, a bulleted trigger list, and a compact parameter section. Every section adds decision value, and there is no filler or repetition beyond the acceptable 'Track agent's work history' purpose statement.

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?

The description covers what the tool does, when to call it, and all parameter semantics, including the own-history restriction. However, there is no output schema and the description does not touch on return format or how the response supports 'continuing work,' so it is not fully complete for an agent needing to interpret results.

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?

The schema has 0% description coverage, making the PARAMETERS section essential. The description explains all three parameters meaningfully: agent_id format and ephemeral ID matching, requesting_agent_id ownership restriction, and status filter values ('active', 'completed', 'terminated'). This fully compensates for the bare schema.

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 states a specific action and resource: 'Get all sessions an agent has participated in' and adds purpose 'Track agent's work history.' This is clear, but it does not explicitly differentiate from sibling tools like list_sessions or search_sessions; the agent must infer the distinction from 'participated in' and the triggers.

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?

The 'AUTOMATIC TRIGGERS - Call this when' section lists concrete scenarios: 'what sessions have I been in?', 'Looking for past work by a specific agent', and 'Finding related sessions to continue work.' This provides clear when-to-use guidance but offers no exclusions or comparisons to alternative session-related tools.

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/Vedant9500/OpenLMlib'

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