ethora-app-delete-chat
Delete a user-created chat on Ethora by specifying the appId and chatJid. Simplifies chat management within the Ethora MCP Server platform.
Instructions
Delete a chat for the logged-in user who has created the app.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | appId for app | |
| chatJid | Yes | title for chat |
Implementation Reference
- src/tools.ts:262-287 (registration)Full registration of the 'ethora-app-delete-chat' MCP tool, including input schema, description, and inline handler function that calls the appDeleteChat API helper and formats the response.function appDeleteChatTool(server: McpServer) { server.registerTool( 'ethora-app-delete-chat', { description: 'Delete a chat for the logged-in user who has created the app.', inputSchema: { appId: z.string().describe("appId for app"), chatJid: z.string().describe("title for chat"), } }, async function ({ appId, chatJid }) { try { let result = await appDeleteChat(appId, chatJid) let toolRes: CallToolResult = { content: [{ type: "text", text: JSON.stringify(result.data) }] } return toolRes } catch (error) { let toolRes: CallToolResult = { content: [{ type: "text", text: "error: network error" }] } return toolRes } } ) }
- src/apiClientDappros.ts:167-172 (helper)API client helper function 'appDeleteChat' that performs the HTTP DELETE request to delete a chat using the configured axios instance.export function appDeleteChat(appId: string, chatJid: string) { return httpClientDappros.delete( `/apps/delete-app-chat/${appId}`, { data: { chatJid: chatJid } } ) }