Skip to main content
Glama
andybrandt

MCP Simple OpenAI Assistant

by andybrandt

Retrieve OpenAI Assistant

retrieve_assistant
Read-only

Retrieve detailed information about a specific OpenAI assistant using its unique ID. Access assistant configurations, capabilities, and settings for integration or management purposes.

Instructions

Get detailed information about a specific assistant. The ID required can be retrieved from the list_assistants tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assistant_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'retrieve_assistant'. Calls AssistantManager to fetch assistant details from OpenAI and returns formatted string output.
    @app.tool(
        annotations={
            "title": "Retrieve OpenAI Assistant",
            "readOnlyHint": True
        }
    )
    async def retrieve_assistant(assistant_id: str) -> str:
        """Get detailed information about a specific assistant. 
           The ID required can be retrieved from the list_assistants tool."""
        if not manager:
            raise ToolError("AssistantManager not initialized.")
        try:
            result = await manager.retrieve_assistant(assistant_id)
            return dedent(f"""
            Assistant Details:
            ID: {result.id}
            Name: {result.name}
            Model: {result.model}
            Instructions: {result.instructions}
            """)
        except Exception as e:
            raise ToolError(f"Failed to retrieve assistant {assistant_id}: {e}")
  • Core helper method in AssistantManager that directly calls the OpenAI API to retrieve the Assistant object by ID.
    async def retrieve_assistant(self, assistant_id: str) -> Assistant:
        """Get details about a specific assistant."""
        return self.client.beta.assistants.retrieve(assistant_id)
Behavior3/5

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

Annotations already declare readOnlyHint=true, indicating this is a safe read operation. The description adds value by specifying that it retrieves 'detailed information' and references list_assistants for ID sourcing, but doesn't disclose additional behavioral traits like error handling, rate limits, or response format details beyond what annotations cover.

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 two sentences, front-loaded with the core purpose and followed by a helpful usage note. Every sentence earns its place with no wasted words, making it appropriately sized and efficient.

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

Completeness4/5

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

Given the tool's low complexity (one parameter), annotations covering safety, and an output schema existing, the description is mostly complete. It explains the purpose and ID sourcing, but could benefit from mentioning what 'detailed information' includes or any prerequisites, though the output schema reduces the need for return value details.

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?

With schema description coverage at 0% and only one parameter (assistant_id), the description adds some meaning by explaining that the ID can be retrieved from list_assistants. However, it doesn't provide format details or constraints for the assistant_id, so it partially compensates but doesn't fully document the parameter beyond the schema's basic type.

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 tool's purpose with 'Get detailed information about a specific assistant,' which is a specific verb+resource combination. However, it doesn't explicitly differentiate from siblings like 'list_assistants' beyond implying this is for single-assistant retrieval versus listing multiple assistants.

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

Usage Guidelines4/5

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

The description provides clear context by stating 'The ID required can be retrieved from the list_assistants tool,' which guides when to use this tool (after obtaining an ID from list_assistants). It doesn't explicitly mention when not to use it or name alternatives, but the context is sufficient for basic usage.

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/andybrandt/mcp-simple-openai-assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server