Skip to main content
Glama

research_create

Initiate a research task by providing instructions and selecting a model. Optionally specify a JSON schema to structure the output.

Instructions

Create a new research request using Exa.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instructionsYesThe research instructions describing what to research.
modelNoThe model to use ('exa-research-fast', 'exa-research', 'exa-research-pro').
output_schemaNoJSON schema for structured output format.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `research_create` tool handler function. Decorated with @mcp.tool(), it accepts `instructions`, optional `model` (ResearchModel), and optional `output_schema` (JSONSchemaInput). It builds a request dict and calls the remote MCP tool 'exa_research_create' via `_call_mcp_tool()`, running the async call synchronously with `asyncio.get_event_loop().run_until_complete()`.
    @mcp.tool()
    def research_create(
        instructions: str,
        model: ResearchModel | None = None,
        output_schema: JSONSchemaInput | None = None,
    ) -> dict[str, Any]:
        """Create a new research request using Exa.
    
        Args:
            instructions: The research instructions describing what to research.
            model: The model to use ('exa-research-fast', 'exa-research', 'exa-research-pro').
            output_schema: JSON schema for structured output format.
    
        Returns:
            Dict containing the research task ID and initial status.
    
        Example:
            >>> research_create(instructions="What is the latest valuation of SpaceX?")
            {"research_id": "abc-123", "status": "running"}
        """
        import asyncio
    
        if not instructions:
            raise ValueError("Instructions cannot be empty")
    
        arguments: dict[str, Any] = {"instructions": instructions}
        if model is not None:
            arguments["model"] = model
        if output_schema is not None:
            arguments["output_schema"] = output_schema
    
        try:
            result = asyncio.get_event_loop().run_until_complete(
                _call_mcp_tool("exa_research_create", arguments)
            )
            return result
        except Exception as e:
            return {"error": str(e)}
  • Type alias `ResearchModel` defining the allowed model values for research_create: 'exa-research-fast', 'exa-research', 'exa-research-pro'.
    ResearchModel = Literal["exa-research-fast", "exa-research", "exa-research-pro"]
  • Type alias `JSONSchemaInput` for the structured output schema parameter (a dict of string to Any).
    JSONSchemaInput = dict[str, Any]
  • The `@mcp.tool()` decorator registers `research_create` as an MCP tool via the FastMCP framework.
    @mcp.tool()
  • The `_call_mcp_tool` helper function that executes the actual JSON-RPC call to the Exa MCP server. It sends a 'tools/call' request with the tool name and arguments to the remote endpoint.
    async def _call_mcp_tool(tool_name: str, arguments: dict[str, Any]) -> dict[str, Any]:
        """Call a tool on the public Exa MCP server."""
        request = {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "tools/call",
            "params": {
                "name": tool_name,
                "arguments": arguments,
            },
        }
    
        async with httpx.AsyncClient(timeout=60.0) as client:
            response = await client.post(
                f"{BASE_URL}/mcp",
                json=request,
                headers={
                    "accept": "application/json, text/event-stream",
                    "content-type": "application/json",
                },
            )
            response.raise_for_status()
            response_text = response.text
    
            lines = response_text.split("\n")
            for line in lines:
                if line.startswith("data: "):
                    data = line[6:]
                    result = {"jsonrpc": "2.0", "id": 1, "result": {}}
                    try:
                        parsed = eval(data)
                    except Exception:
                        pass
                    else:
                        if "result" in parsed and parsed["result"].get("content"):
                            return {
                                "results": parsed["result"]["content"][0].get("text", "")
                            }
    
            return {"results": ""}
Behavior2/5

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

The description lacks behavioral details beyond the basic creation action. With no annotations, it should disclose whether the request is asynchronous, how to check status, or if it requires polling. It fails to mention any side effects, authentication needs, or rate limits.

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 a single, well-structured sentence with no unnecessary words. While it is concise, it could be improved by adding a brief sentence about usage context without sacrificing clarity.

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?

Despite having an output schema, the description does not explain what the tool returns (e.g., request ID or status). It also fails to mention that the request is created asynchronously and must be polled or retrieved via sibling tools. This leaves the agent without key information for correct invocation.

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?

The input schema provides descriptions for all 3 parameters (100% coverage), so the description adds no additional meaning. Baseline of 3 is appropriate as the schema already explains the parameters sufficiently.

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

Purpose5/5

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

The description clearly states 'Create a new research request using Exa,' which specifies the verb, resource, and platform. It distinguishes this tool from siblings like research_get, research_list, and research_poll_until_finished, which handle different operations on research objects.

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

Usage Guidelines3/5

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

The description implicitly indicates when to use the tool (to create a research request), but it does not provide explicit guidance on when not to use it or suggest alternatives. No exclusions or context about prerequisites are mentioned.

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/daedalus/mcp-exa'

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