Skip to main content
Glama

Close execution session

execution_session_close
Idempotent

Use this when approved local work is complete or the user asks to stop using the current session. Closes only a session owned by the authenticated grant and does not terminate unrelated processes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sessionId": "<sessionId>"
    },
    "name": "execution_session_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / sessionId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, closed-world. The description adds genuinely new context beyond them: an authorization constraint (only sessions owned by the authenticated grant) and a blast-radius guarantee (unrelated processes survive). It does not say what happens to in-flight commands inside the session, which is the remaining behavioral gap.

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 sentences, no redundancy, with the usage trigger front-loaded and the safety scoping second. Every clause earns its place.

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, annotated, non-read-only tool with no output schema, the description covers purpose, trigger, authorization scope, and blast radius. It could be complete with one clause on the fate of running work in the session and on sourcing sessionId.

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

Parameters2/5

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

Schema description coverage is 0% and the single parameter sessionId is never mentioned in the description. The phrase "owned by the authenticated grant" only loosely hints at how to obtain the id; there is no statement that it is the uuid returned by session open. With one undocumented required parameter, the description fails to compensate.

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?

States a specific verb and resource ("Closes ... a session") and immediately bounds the scope to sessions "owned by the authenticated grant." An agent can tell this is a session-teardown operation rather than a process/operation cancel, though it never names a sibling explicitly.

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?

Gives a concrete trigger: "when approved local work is complete or the user asks to stop using the current session." That is clear when-to-use guidance. It stops short of explicit when-not conditions or naming an alternative for other teardown needs.

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.