Skip to main content
Glama
basis1: Excel engine for AI agents (formulas, recalculation, audit)

basis1: Excel engine for AI agents (formulas, recalculation, audit)

Official

Close session

close_session
DestructiveIdempotent

End a workbook session and discard its workbook to free a slot; save or export unsaved edits first, as they and its checkpoints cannot be restored.

Instructions

End a session and discard its workbook: the session_id stops working and the session can't be reopened. Edits not saved with save_to_library (or downloaded with export_workbook) are lost, and its commit_session checkpoints go with it, so restore_session can't bring it back. Call it when you're done with a workbook, or to free a slot when create_session fails with max_sessions. Returns {closed: true}, plus unsaved: true and a hint when the workbook was edited since it was opened or last saved to the Library. An unknown, expired or already closed session_id fails with session_not_found, which lists the sessions still open. Sessions also close on their own after 30 minutes without a call.

Input Schema

NameRequiredDescriptionDefault
session_idYesID of the session to close, from create_session or list_sessions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • changedInput schema / properties / session_id / description
      Previous value: -"Session ID to close"New value: +"ID of the session to close, from create_session or list_sessions"
  2. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes further: it specifies exactly what is destroyed (unsaved edits, commit_session checkpoints), that restore_session cannot recover it, the return payload including the unsaved flag and hint, the session_not_found error with its listing behavior, and the 30-minute idle auto-close. This is unusually complete behavioral disclosure.

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 primary effect, then consequences, then usage triggers, then return/error behavior. Every sentence carries distinct information, though the error-and-timeout details in the final sentences make it denser than strictly necessary.

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?

No output schema exists, yet the description supplies the return shape ({closed: true}, unsaved, hint) and the failure mode. For a one-parameter destructive tool, nothing an agent needs to call it correctly or interpret the result is missing.

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?

With a single parameter at 100% schema coverage, the schema already documents session_id's origin. The description adds lifecycle meaning beyond the schema: the ID becomes invalid after the call, and unknown/expired/already-closed IDs produce session_not_found, which tells the agent how to interpret failure.

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 ('End a session and discard its workbook') and immediately distinguishes the operation from restore_session by saying the session 'can't be reopened'. The effect on session_id ('stops working') makes the scope unambiguous versus siblings like commit_session or save_to_library.

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 explicit when-to-use triggers: when done with a workbook, or to free a slot after create_session returns max_sessions. It also names the prerequisite alternatives (save_to_library, export_workbook) that must run first if data is to be kept, so the agent knows both the trigger and the exclusion.

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