Skip to main content
Glama
snilld-ai

OpenAI Assistant MCP Server

by snilld-ai

list-assistants

Retrieve available OpenAI assistants to manage and select AI models for specific tasks within the MCP server environment.

Instructions

List OpenAI assistants

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler for 'list-assistants': calls LLMConnector.list_assistants() and formats the list of assistants as text.
    elif name == "list-assistants": response = await connector.list_assistants() assistants_str = "\\n".join([f"- ID: {a.id}, Name: {a.name}, Model: {a.model}" for a in response]) if not assistants_str: assistants_str = "No assistants found." return [types.TextContent(type="text", text=f"Assistants:\\n{assistants_str}")]
  • Core helper method in LLMConnector that retrieves the list of OpenAI assistants using the AsyncOpenAI client.
    async def list_assistants(self): try: response = await self.client.beta.assistants.list() return response.data except Exception as e: logger.error(f"Failed to list assistants: {str(e)}") raise
  • Registers the 'list-assistants' tool in the MCP server list_tools() handler, including its schema.
    types.Tool( name="list-assistants", description="List OpenAI assistants", inputSchema={ "type": "object", "properties": {} } ),
  • Input schema for the 'list-assistants' tool: empty object (no parameters required).
    inputSchema={ "type": "object", "properties": {} }

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