Skip to main content
Glama
collapseindex

CI-1T Prediction Stability Engine

fleet_session_delete

Delete a fleet session by ID to free server resources after monitoring is complete. Confirm deletion with the session ID.

Instructions

Delete a fleet session by ID. Response: { deleted: true, session_id }. Call when monitoring is complete to free server resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesFleet session ID to delete

Implementation Reference

  • src/index.ts:685-701 (registration)
    Registration of the fleet_session_delete tool using server.tool() with the name 'fleet_session_delete'.
    server.tool(
      "fleet_session_delete",
      "Delete a fleet session by ID. Response: { deleted: true, session_id }. Call when monitoring is complete to free server resources.",
      {
        session_id: z.string().describe("Fleet session ID to delete"),
      },
      async ({ session_id }) => {
        const guard = requireApiKey();
        if (guard) return guard;
        const result = await apiFetch("/api/fleet-session", {
          method: "POST",
          headers: apiKeyHeaders(),
          body: { action: "delete", session_id },
        });
        return formatResult(result);
      }
    );
  • Input schema: session_id parameter defined as z.string() for the fleet session ID to delete.
    session_id: z.string().describe("Fleet session ID to delete"),
  • Handler function that calls the API endpoint /api/fleet-session with action 'delete' and the provided session_id.
    async ({ session_id }) => {
      const guard = requireApiKey();
      if (guard) return guard;
      const result = await apiFetch("/api/fleet-session", {
        method: "POST",
        headers: apiKeyHeaders(),
        body: { action: "delete", session_id },
      });
      return formatResult(result);
    }
  • apiKeyHeaders helper used by the handler to attach authentication headers.
    /** Headers using X-API-Key auth (for all authenticated endpoints) */
    function apiKeyHeaders(extra?: Record<string, string>): Record<string, string> {
      const h: Record<string, string> = { "Content-Type": "application/json" };
      if (API_KEY) h["X-API-Key"] = API_KEY;
      return { ...h, ...extra };
    }
  • apiFetch helper used by the handler to make the HTTP POST request to the backend API.
    async function apiFetch(
      path: string,
      opts: { method?: string; headers?: Record<string, string>; body?: unknown } = {}
    ): Promise<ApiResult> {
      const url = `${BASE_URL}${path}`;
      try {
        const res = await fetch(url, {
          method: opts.method || "GET",
          headers: opts.headers || { "Content-Type": "application/json" },
          body: opts.body ? JSON.stringify(opts.body) : undefined,
        });
        const text = await res.text();
        let data: unknown;
        try {
          data = JSON.parse(text);
        } catch {
          data = { raw: text };
        }
        return { ok: res.ok, status: res.status, data };
      } catch (err: unknown) {
        const message = err instanceof Error ? err.message : String(err);
        return { ok: false, status: 0, data: { error: `Network error: ${message}` } };
      }
    }
Behavior4/5

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

Without annotations, the description carries the burden. It discloses the response shape and that the tool frees server resources, indicating a destructive operation. Missing details on error handling or idempotency.

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 filler. The essential information is front-loaded.

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 simple deletion tool with one parameter and no output schema, the description covers purpose, usage, and response. Could mention error cases but overall sufficient.

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%, and the parameter 'session_id' is described in the schema. The description does not add new parameter semantics beyond what the schema already provides.

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?

The description clearly states the action ('Delete'), the resource ('a fleet session'), and the identifier ('by ID'). It distinguishes from sibling tools like fleet_session_create and fleet_session_list.

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?

Explicitly advises when to call ('Call when monitoring is complete to free server resources'), providing context. However, it does not specify when not to use or describe alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/collapseindex/ci-1t-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server