Skip to main content
Glama
snilld-ai

OpenAI Assistant MCP Server

by snilld-ai

delete-assistant

Remove an OpenAI assistant by providing its ID to manage your assistant inventory and maintain organization.

Instructions

Delete an OpenAI assistant

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistant_idYesThe ID of the assistant to delete

Implementation Reference

  • The core handler function in LLMConnector that deletes the OpenAI assistant using the AsyncOpenAI client.
    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
  • Registers the 'delete-assistant' tool in the list_tools handler, including its description and input schema.
    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"] } ),
  • Dispatches the tool call to the LLMConnector's delete_assistant method and formats the response.
    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'}")]

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