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

list-assistants

Retrieve available OpenAI assistants to manage and select AI agents for specific tasks through the MCP server.

Instructions

List OpenAI assistants

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'list-assistants' tool including its name, description, and input schema (empty properties).
    types.Tool( name="list-assistants", description="List OpenAI assistants", inputSchema={ "type": "object", "properties": {} } ),
  • Handler dispatch for 'list-assistants' tool: calls LLMConnector.list_assistants(), formats the list of assistants into a string, and returns as TextContent.
    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 implementation of listing assistants: asynchronously calls OpenAI's beta.assistants.list() API and returns the data.
    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

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