o3-search
Perform advanced web searches using AI to find information, troubleshoot errors, and explore ideas. Supports natural language queries for accurate, context-aware results.
Instructions
An AI agent with advanced web search capabilities. Useful for finding the latest information, troubleshooting errors, and discussing ideas or design challenges. Supports natural language queries.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Ask questions, search for information, or consult about complex problems in English. |
Implementation Reference
- index.ts:47-82 (handler)Handler function that invokes OpenAI API with web search capabilities using the provided input query.async ({ input }) => { try { const response = await openai.responses.create({ model: config.model, input, tools: [ { type: "web_search_preview", search_context_size: config.searchContextSize, }, ], tool_choice: "auto", parallel_tool_calls: true, reasoning: { effort: config.reasoningEffort }, }); return { content: [ { type: "text", text: response.output_text || "No response text available.", }, ], }; } catch (error) { console.error("Error calling OpenAI API:", error); return { content: [ { type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error occurred"}`, }, ], }; } },
- index.ts:41-46 (schema)Zod schema defining the input as a string for natural language queries.input: z .string() .describe( "Ask questions, search for information, or consult about complex problems in English.", ), },
- index.ts:37-83 (registration)MCP server tool registration for 'o3-search' including description, input schema, and handler function.server.tool( "o3-search", `An AI agent with advanced web search capabilities. Useful for finding the latest information, troubleshooting errors, and discussing ideas or design challenges. Supports natural language queries.`, { input: z .string() .describe( "Ask questions, search for information, or consult about complex problems in English.", ), }, async ({ input }) => { try { const response = await openai.responses.create({ model: config.model, input, tools: [ { type: "web_search_preview", search_context_size: config.searchContextSize, }, ], tool_choice: "auto", parallel_tool_calls: true, reasoning: { effort: config.reasoningEffort }, }); return { content: [ { type: "text", text: response.output_text || "No response text available.", }, ], }; } catch (error) { console.error("Error calling OpenAI API:", error); return { content: [ { type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error occurred"}`, }, ], }; } }, );