Skip to main content
Glama

resolve_current_agent_session

Resolve 'this session' to the correct captured Suvadu session before searching or summarizing work, using explicit IDs, native agent data, or cwd context and returning candidates when ambiguous.

Instructions

Resolve 'this/current session' conservatively to a captured Suvadu session. Call this first whenever the user says 'this session', 'what I was just doing' or 'summarize our work' — search_commands and recent_commands have no idea which session is yours and will return other projects' work. Uses an explicit ID first, then agent-provided native session environment (Codex and Claude Code only; OpenCode and Cursor have no such environment variable, so they fall straight through to the cwd fallback), then an unambiguous recent session in the current directory. Returns candidates instead of guessing when ambiguous. The in-progress turn may not be captured until Stop/SessionEnd. Times are epoch milliseconds UTC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working directory hint
agentNoOptional agent: openai-codex/codex, claude-code/claude, opencode, or cursor
native_idNoOptional native agent session ID
session_idNoOptional explicit Suvadu session ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the resolution precedence (explicit ID → native session environment → unambiguous recent session in cwd), which agents support the native env path (Codex/Claude Code only; OpenCode/Cursor fall through), that ambiguity yields candidates rather than a guess, and that the in-progress turn may be uncaptured until Stop/SessionEnd. It also states timestamps are epoch milliseconds UTC.

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?

Front-loaded with the core action and the primary usage rule, then layered with fallback and caveat detail. Every sentence contributes, though the long parenthetical about OpenCode/Cursor and the epoch-milliseconds note make the middle dense; it is information-dense rather than padded.

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 4-optional-parameter resolver with no output schema, the description covers selection, precedence, ambiguity handling, and time units. It only gestures at the return value ('returns candidates'), so the exact shape of a resolved session versus a candidate list remains partially implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds genuine meaning by ordering the parameters into a precedence chain (session_id first, then native agent environment, then cwd fallback) and by tying the agent parameter to concrete agent names. It stops short of describing each parameter's format or failure behavior individually.

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?

States a specific verb and resource ('Resolve this/current session ... to a captured Suvadu session') with an explicit conservatism qualifier. It names the siblings it must not be confused with (search_commands, recent_commands) and explains why they are unsuitable, so an agent can select it without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('Call this first whenever the user says "this session", "what I was just doing" or "summarize our work"') and names the alternatives that fail at that job. The when-not case is spelled out: search_commands and recent_commands return other projects' work.

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