Skip to main content
Glama

delete_session

Remove a session and free up associated resources in SpyNet's mock server environment to maintain clean testing conditions.

Instructions

Delete a session and clean up resources

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession identifier to delete

Implementation Reference

  • The handler implementation for the `delete_session` tool.
    delete_session: async (args: any) => {
      try {
        const { sessionId } = args;
    
        if (!sessionId) {
          return {
            success: false,
            error: 'Missing required field: sessionId'
          };
        }
    
        const deleted = sessionManager.deleteSession(sessionId);
    
        if (!deleted) {
          return {
            success: false,
            error: `Session not found: ${sessionId}`
          };
        }
    
        return { success: true };
      } catch (error: any) {
        return {
          success: false,
          error: `Failed to delete session: ${error.message}`
        };
      }
    },
  • Registration and input schema definition for the `delete_session` tool.
      name: 'delete_session',
      description: 'Delete a session and clean up resources',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: {
            type: 'string',
            description: 'Session identifier to delete',
          },
        },
        required: ['sessionId'],
      },
    },
Behavior3/5

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

Mentions 'clean up resources' indicating side effects beyond simple deletion. However, with no annotations provided, lacks disclosure on reversibility, idempotency, or what specific resources are cleaned up.

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?

Single 7-word sentence, front-loaded with verb. Zero redundancy or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a single-parameter deletion tool, but given lack of annotations and output schema, could clarify error handling (e.g., if sessionId doesn't exist) or confirmation requirements.

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 has 100% coverage with 'Session identifier to delete'. Description adds no parameter details, but baseline 3 applies since schema fully documents the single parameter.

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?

Clear verb 'Delete' and resource 'session'. Includes extra scope 'clean up resources'. Does not explicitly distinguish from sibling 'clear_endpoints' which also removes data, though 'delete' vs 'clear' implies different granularities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use versus alternatives (e.g., when to delete a session vs clearing endpoints), prerequisites, or consequences of deletion.

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/aj-bartocci/SpyNet'

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