end_conversation
Terminate an active conversation by providing its unique identifier to close the session and free up resources.
Instructions
End an active conversation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conversation_id | Yes | Unique identifier for the conversation |
Implementation Reference
- src/index.ts:925-934 (handler)Handler function that executes the end_conversation tool. Takes a conversation_id argument and makes a POST request to /conversations/{conversation_id}/end endpoint, returning the response data as JSON.
private async endConversation(args: any) { const { conversation_id } = args; const response = await this.axiosInstance.post(`/conversations/${conversation_id}/end`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } - src/index.ts:415-427 (registration)Registration of the end_conversation tool with its name, description, and input schema defining the required conversation_id parameter.
name: 'end_conversation', description: 'End an active conversation', inputSchema: { type: 'object', properties: { conversation_id: { type: 'string', description: 'Unique identifier for the conversation', }, }, required: ['conversation_id'], }, }, - src/index.ts:722-723 (helper)Switch case dispatcher that routes end_conversation tool calls to the endConversation handler method.
case 'end_conversation': return await this.endConversation(request.params.arguments);