Skip to main content
Glama

dakera_session_end

Close an agent session at run end, even on error, and optionally save a summary so session state and outcomes are recorded.

Instructions

Close a session with an optional summary. Call at run end, even on error. A session the server already ended (idle) keeps its state; your summary is then not saved.

Input Schema

NameRequiredDescriptionDefault
summaryNoOptional session summary
session_idYesSession ID to end

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.12
  2. Removedv0.10.11
  3. Addedv0.10.8

TDQS

A4.1/5.0
Behavior4/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 disclose real behavior: an already-ended (idle) session is not destroyed by this call and the supplied summary is silently discarded. That conditional, no-op-on-idle semantics is exactly what an agent needs before calling. It omits whether summary persistence is permanent or whether callers need auth.

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?

Three short sentences, front-loaded with the action, then the trigger, then the edge-case caveat. Nothing is repeated from the name or schema and nothing extraneous is included.

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 two-parameter tool with full schema coverage, no output schema, and no nested objects, this is nearly sufficient: action, timing, and idle-session behavior are all present. Only the success-path outcome and any permission requirements are left unstated.

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 coverage is 100%, so the baseline is 3, but the description adds genuine semantics the schema cannot: the summary's persistence is conditional on the session still being live. That is meaningful meaning beyond "Optional session summary".

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?

"Close a session with an optional summary" names a specific verb and resource, and the pairing with dakera_session_start is inferable from the session lifecycle. It stops short of naming the sibling explicitly, so an agent must rely on the name prefix to pair start/end.

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?

"Call at run end, even on error" gives a clear trigger condition, including the error path that agents commonly mishandle. It also covers the degenerate case where the server already ended the session, though it names no alternative tool or prerequisite.

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