Skip to main content
Glama
dofunc
by dofunc

close

Close a specific session or all server sessions while keeping session history intact. Use it to end work cleanly after agents finish their tasks.

Instructions

Close a session, or all sessions of this server when session is omitted. Session history is kept.

Input Schema

NameRequiredDescriptionDefault
sessionNoSession id returned by open

Output Schema

NameRequiredDescriptionDefault
closedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses two consequences: omitting the session closes *all* sessions on this server, and session history is preserved. Still, it does not clarify whether closure is reversible, what happens to running work, or any permission requirements, leaving meaningful gaps for a potentially broad state-changing operation.

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 a single, front-loaded sentence with no wasted language. It states the core action, the omitted-parameter behavior, and the key side effect (history retained) efficiently.

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 one-parameter tool with an output schema and full schema description coverage, the description covers the essential call semantics and a key side effect. It could be richer about permissions or the effect on active work, but it is largely complete for correct invocation.

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 baseline would be 3. The description adds meaningful semantics beyond the schema by explaining that omitting the optional 'session' parameter closes every session on the server, whereas the schema only documents the parameter as a session id returned by 'open.'

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 clearly states a specific verb and resource: 'Close a session, or all sessions of this server when session is omitted.' This is unambiguous. It indirectly distinguishes itself from 'delete' by noting 'Session history is kept,' but does not explicitly name sibling alternatives such as 'cancel' or 'delete.'

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?

Usage is implied through the omission behavior: providing no session closes all sessions, while providing one closes that session. However, the description gives no explicit guidance on when to use this tool versus alternatives like 'cancel,' 'delete,' or 'open,' nor does it state exclusions or prerequisites.

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