Skip to main content
Glama

close_session

close_session

Optional: sessions end by themselves when idle. Give your final answer to the user FIRST, then close; closing ends the session and you will see no further output.

Input Schema

NameRequiredDescriptionDefault
secretYessession secret from create_session
session_idYessession id from create_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (which only declare not-read-only, not-idempotent, not-destructive), the description discloses the crucial consequence: the session ends and no further output is visible, including whether an answer already sent survives. It does not cover error behavior or what happens on a second call, which is why it is not a 5.

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?

Two short sentences, front-loaded with the most decision-relevant word ('Optional') and then the sequencing rule. Nothing is padded or repeated.

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 terminal, two-parameter tool with no output schema, the description covers optionality, required ordering, and the consequence of closing — enough to call it correctly. Minor gaps remain around failure modes (invalid or expired secret) and repeat invocation.

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

Parameters3/5

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

Schema coverage is 100% — both session_id and secret are documented as coming from create_session — so the schema already carries parameter meaning. The description adds no additional parameter semantics, which is the expected baseline here.

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 plainly states that calling this tool ends the session, and that no further output will follow — a specific verb-effect pair an agent can act on. It does not explicitly name sibling tools, but the terminal nature distinguishes it from create_session/extend_session/get_session by implication.

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?

It gives real selection guidance: the call is optional because idle sessions self-terminate, and it should only be invoked after the final answer has been delivered. It stops short of explicit 'do not call in situation X' exclusions or naming a sibling, but the when-to-use condition is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources