Skip to main content
Glama
snilld-ai

OpenAI Assistant MCP Server

by snilld-ai

retrieve-assistant

Retrieve an OpenAI assistant by its unique ID to access its configuration, capabilities, and settings for integration or management purposes.

Instructions

Retrieve an OpenAI assistant by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistant_idYesThe ID of the assistant to retrieve

Implementation Reference

  • Core handler implementation that retrieves the OpenAI assistant using the AsyncOpenAI client API.
    async def retrieve_assistant(self, assistant_id: str): try: response = await self.client.beta.assistants.retrieve(assistant_id) return response except Exception as e: logger.error(f"Failed to retrieve assistant {assistant_id}: {str(e)}") raise
  • Tool dispatch handler in the main call_tool function that validates input and delegates to LLMConnector.retrieve_assistant.
    elif name == "retrieve-assistant": assistant_id = arguments.get("assistant_id") if not assistant_id: raise ValueError("assistant_id is required for retrieve-assistant") response = await connector.retrieve_assistant(assistant_id) return [types.TextContent(type="text", text=f"Assistant Details:\\n{response}")]
  • Tool registration including name, description, and input schema in the list_tools handler.
    types.Tool( name="retrieve-assistant", description="Retrieve an OpenAI assistant by ID", inputSchema={ "type": "object", "properties": { "assistant_id": {"type": "string", "description": "The ID of the assistant to retrieve"} }, "required": ["assistant_id"] } ),
  • Input schema definition for the retrieve-assistant tool, specifying required assistant_id.
    inputSchema={ "type": "object", "properties": { "assistant_id": {"type": "string", "description": "The ID of the assistant to retrieve"} }, "required": ["assistant_id"] }

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