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"]
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as read-only nature (implied but not explicit), error handling (e.g., for invalid IDs), response format, or any rate limits or authentication needs. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose without fluff. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a retrieval operation with no output schema) and lack of annotations, the description is incomplete. It doesn't explain what information is returned (e.g., assistant details, configuration), error scenarios, or how it fits into workflows with siblings like 'update-assistant'. This leaves significant gaps for agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single parameter 'assistant_id' fully. The description adds no additional meaning beyond what's in the schema (e.g., format examples, source of IDs, or constraints), meeting the baseline but not enhancing parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('retrieve') and resource ('OpenAI assistant by ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list-assistants' or 'update-assistant' beyond the basic action, missing explicit comparison that would earn a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing assistant ID), contrast with 'list-assistants' for discovery, or specify use cases like fetching details for modification. This leaves the agent with minimal context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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