gpt_search
Search the web or research a topic by sending a prompt to ChatGPT. Supports output to file or JSON parsing for structured results.
Instructions
Search the web or research a topic using ChatGPT.
Provide either query or prompt_file. The prompt is sent directly to ChatGPT.
Args:
query: Full prompt to send to ChatGPT.
prompt_file: Path to a text file containing the prompt. Relative paths resolve from the MCP server process working directory.
output_file: Optional path where the cleaned markdown response should be saved. Parent directories are created if needed.
return_output: When True, return the full response to the MCP client. When False, return only a short saved-path summary. Defaults to True unless output_file is provided, in which case it defaults to False to keep client context light.
output_json: When True, try to parse/repair the response as JSON after ChatGPT returns. If output_file is provided, raw output is saved first and overwritten only when JSON post-processing succeeds. If post-processing fails, raw output is left in place.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| prompt_file | No | ||
| output_file | No | ||
| return_output | No | ||
| output_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |