Skip to main content
Glama
snilld-ai
by snilld-ai

delete-assistant

Remove an OpenAI assistant by providing its ID to manage your assistant list and free up resources.

Instructions

Delete an OpenAI assistant

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistant_idYesThe ID of the assistant to delete

Implementation Reference

  • Registration of the 'delete-assistant' MCP tool, including its input schema requiring 'assistant_id'.
    types.Tool( name="delete-assistant", description="Delete an OpenAI assistant", inputSchema={ "type": "object", "properties": { "assistant_id": {"type": "string", "description": "The ID of the assistant to delete"} }, "required": ["assistant_id"] } ),
  • MCP server handler for 'delete-assistant' tool call; extracts assistant_id and delegates to LLMConnector.delete_assistant().
    elif name == "delete-assistant": assistant_id = arguments["assistant_id"] response = await connector.delete_assistant(assistant_id) return [types.TextContent(type="text", text=f"Assistant deleted: {response.id}, status: {'deleted' if response.deleted else 'not deleted'}")]
  • Core implementation of delete_assistant in LLMConnector class; calls OpenAI API to delete the assistant by ID.
    async def delete_assistant(self, assistant_id: str): try: response = await self.client.beta.assistants.delete(assistant_id) return response except Exception as e: logger.error(f"Failed to delete assistant {assistant_id}: {str(e)}") raise

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/snilld-ai/openai-assistant-mcp'

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