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
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": "delete_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session identifier to delete |
Implementation Reference
- src/mcp/tools.ts:55-82 (handler)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}` }; } }, - src/mcp/server.ts:76-88 (schema)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'], }, },