Skip to main content
Glama
andybrandt

MCP Simple OpenAI Assistant

by andybrandt

Create OpenAI Assistant

create_assistant

Create a custom OpenAI assistant by specifying its name, instructions, and model to handle specific topics or tasks.

Instructions

Create a new OpenAI assistant to talk to about your desired topic.

You can provide instructions that this assistant will follow and specify which of OpenAI's models it will use. NOTE: It is recommended to check existing assistants with list_assistants before creating a new one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
instructionsYes
modelNogpt-4o

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'create_assistant'. Decorated with @app.tool(). Delegates to AssistantManager.create_assistant and formats the response.
    @app.tool(
        annotations={
            "title": "Create OpenAI Assistant",
            "readOnlyHint": False
        }
    )
    async def create_assistant(name: str, instructions: str, model: str = "gpt-4o") -> str:
        """
        Create a new OpenAI assistant to talk to about your desired topic.
    
        You can provide instructions that this assistant will follow and specify which of OpenAI's models it will use.
        NOTE: It is recommended to check existing assistants with list_assistants before creating a new one.
        """
        if not manager:
            raise ToolError("AssistantManager not initialized.")
        try:
            result = await manager.create_assistant(name, instructions, model)
            return f"Created assistant '{result.name}' with ID: {result.id}"
        except Exception as e:
            raise ToolError(f"Failed to create assistant: {e}")
  • Core implementation that calls OpenAI API to create the assistant. Called by the MCP tool handler.
    async def create_assistant(
        self,
        name: str,
        instructions: str,
        model: str = "gpt-4o"
    ) -> Assistant:
        """Create a new OpenAI assistant."""
        return self.client.beta.assistants.create(
            name=name,
            instructions=instructions,
            model=model
        )
Behavior3/5

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

Annotations indicate readOnlyHint=false, which aligns with the 'Create' action, so no contradiction. The description adds useful context: it creates a new assistant with configurable instructions and model, and recommends checking existing ones first. However, it doesn't disclose behavioral traits like rate limits, authentication needs, or what happens on duplicate names, which would be valuable beyond the annotations.

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

Conciseness4/5

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

The description is appropriately sized with three sentences: purpose, capabilities, and usage recommendation. It's front-loaded with the main action and wastes no words. However, the second sentence could be slightly more concise by combining the instruction and model points.

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 moderate complexity (3 parameters, 2 required), annotations covering read-only status, and an output schema (which handles return values), the description is fairly complete. It covers purpose, key parameters, and usage context. However, it could improve by addressing potential errors or behavioral nuances, making it slightly incomplete for full agent guidance.

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 0%, so the description carries full burden. It mentions 'instructions' and 'model' but doesn't explain the 'name' parameter or provide details like format constraints or default values (e.g., model defaults to 'gpt-4o' per schema). The description adds some meaning but doesn't fully compensate for the low schema coverage, leaving gaps in 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 tool's purpose: 'Create a new OpenAI assistant' with the ability to specify instructions and model. It distinguishes from siblings like list_assistants and update_assistant by focusing on creation rather than listing or updating. However, it doesn't explicitly contrast with create_new_assistant_thread, which might cause some confusion.

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 guidance: 'It is recommended to check existing assistants with list_assistants before creating a new one.' This helps avoid duplicates and suggests when to use this tool versus list_assistants. However, it doesn't explicitly mention when NOT to use it (e.g., vs. update_assistant) or provide alternatives for similar actions.

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