Skip to main content
Glama

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
NameRequiredDescriptionDefault
conversation_idYesUnique identifier for the conversation

Implementation Reference

  • 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'],
      },
    },
  • Switch case dispatcher that routes end_conversation tool calls to the endConversation handler method.
    case 'end_conversation':
      return await this.endConversation(request.params.arguments);

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/rakeshdavid/Tavus-MCP'

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