Skip to main content
Glama

code_session_delete

DestructiveIdempotent

Deletes saved JSON state for an idle code execution session using its session ID, so stale session data is removed before reuse or cleanup.

Instructions

Clear explicitly saved JSON state for an idle execution session.

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": "code_session_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds real value beyond them by narrowing the blast radius: only explicitly saved JSON state is cleared, not the session or unsaved state, and only for idle sessions. It does not say what happens if the session is active or whether the state is recoverable.

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?

One front-loaded sentence with no filler, and the qualifiers 'explicitly saved' and 'idle' are packed efficiently. It is arguably too terse, since 'clear' and 'explicitly saved JSON state' require some inference about what is actually removed.

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 single-parameter destructive tool whose annotations already declare destructiveness and idempotency, the description covers the main open question: what exactly gets removed. The remaining gap is the lack of any sessionId guidance and no statement about the outcome when preconditions fail.

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% for the single sessionId parameter, and the description does not compensate by explaining its meaning, format, or where to obtain it. The only added semantic is the 'idle session' constraint, which implicitly qualifies which sessionId values are valid.

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 gives a concrete verb and object: it clears explicitly saved JSON state, scoped to an idle execution session. That is more specific than the bare name code_session_delete, since it clarifies the target is saved state rather than the session itself, though it does not explicitly contrast with siblings like code_job_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?

Preconditions are implied rather than stated: the session must be idle and the JSON state must have been explicitly saved. There is no explicit when-to-use or when-not-to-use guidance, and no named alternative such as code_session_resume or code_job_delete.

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