Skip to main content
Glama
snilld-ai

OpenAI Assistant MCP Server

by snilld-ai

create-assistant

Create a new OpenAI assistant with custom instructions, model selection, and file attachments to automate tasks and provide AI-powered responses.

Instructions

Create a new OpenAI assistant

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the assistant
instructionsYesThe assistant's instructions
modelYesThe model to usegpt-4-turbo
temperatureNoThe sampling temperature
file_idsNoA list of file IDs to attach to the assistant
enable_file_searchNoEnable file search tool

Implementation Reference

  • MCP tool handler dispatch for 'create-assistant', prepares arguments and calls LLMConnector.create_assistant
    elif name == "create-assistant":
        tools = []
        if arguments.get("enable_file_search", True):
            tools.append({"type": "file_search"})
    
        response = await connector.create_assistant(
            name=arguments["name"],
            instructions=arguments["instructions"],
            model=arguments["model"],
            temperature=arguments.get("temperature", 0.7),
            file_ids=arguments.get("file_ids"),
            tools=tools
        )
        return [types.TextContent(type="text", text=f"Assistant created:\\n{response}")]
  • Core implementation of assistant creation using OpenAI Assistants API
    async def create_assistant(self, name: str, instructions: str, model: str, tools: list = None, file_ids: list = None, temperature: float = 0.7):
        try:
            assistant = await self.client.beta.assistants.create(
                name=name,
                instructions=instructions,
                model=model,
                tools=tools or [{"type": "code_interpreter"}], # Default tool
                tool_resources={'file_search': {'vector_store_ids': file_ids}} if file_ids else None,
                temperature=temperature
            )
            return assistant
        except Exception as e:
            logger.error(f"Failed to create assistant: {str(e)}")
            raise
  • Input schema and description for the create-assistant tool, registered in list_tools()
    types.Tool(
        name="create-assistant",
        description="Create a new OpenAI assistant",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {"type": "string", "description": "The name of the assistant"},
                "instructions": {"type": "string", "description": "The assistant's instructions"},
                "model": {"type": "string", "default": "gpt-4-turbo", "description": "The model to use"},
                "temperature": {"type": "number", "default": 0.7, "description": "The sampling temperature"},
                "file_ids": {"type": "array", "items": {"type": "string"}, "description": "A list of file IDs to attach to the assistant"},
                "enable_file_search": {"type": "boolean", "default": True, "description": "Enable file search tool"}
            },
            "required": ["name", "instructions", "model"]
        }
    ),
  • Registration of the create-assistant tool via @server.list_tools()
    types.Tool(
        name="create-assistant",
        description="Create a new OpenAI assistant",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {"type": "string", "description": "The name of the assistant"},
                "instructions": {"type": "string", "description": "The assistant's instructions"},
                "model": {"type": "string", "default": "gpt-4-turbo", "description": "The model to use"},
                "temperature": {"type": "number", "default": 0.7, "description": "The sampling temperature"},
                "file_ids": {"type": "array", "items": {"type": "string"}, "description": "A list of file IDs to attach to the assistant"},
                "enable_file_search": {"type": "boolean", "default": True, "description": "Enable file search tool"}
            },
            "required": ["name", "instructions", "model"]
        }
    ),
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool creates an assistant but doesn't mention any behavioral traits: no information about permissions required, whether creation is reversible (via 'delete-assistant'), rate limits, cost implications, or what the response looks like. For a creation tool with zero annotation coverage, this is a significant gap in transparency.

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 that states the core purpose without any fluff. It's appropriately sized for a creation tool and front-loaded with the essential action. Every word earns its place, 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 of creating an OpenAI assistant (with 6 parameters, 3 required) and no annotations or output schema, the description is incomplete. It doesn't address key contextual aspects like what happens after creation (e.g., returns an assistant ID), dependencies on other tools (e.g., 'upload-file' for file_ids), or error conditions. The agent lacks sufficient information to use this tool effectively in isolation.

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 all 6 parameters thoroughly with descriptions and defaults. The description adds no parameter-specific information beyond what's in the schema, such as explaining relationships between parameters (e.g., how 'file_ids' interacts with 'enable_file_search'). This meets the baseline of 3 when schema coverage is high.

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 action ('Create') and resource ('a new OpenAI assistant'), making the purpose immediately understandable. It distinguishes from siblings like 'update-assistant' or 'list-assistants' by specifying creation rather than modification or retrieval. However, it doesn't explicitly differentiate from 'upload-file' which also creates resources, though of a different type.

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 file IDs from 'upload-file' first), when not to use it (e.g., for updating existing assistants), or explicit alternatives like 'update-assistant' for modifications. The agent must infer usage from the tool name alone.

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