openai-knowledge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenAI Knowledge

OpenAI知识库

Overview

概述

Use the OpenAI Developer Documentation MCP server to search and fetch exact docs (markdown), then base your answer on that text instead of guessing.
使用OpenAI开发者文档MCP服务器搜索并获取准确的文档(markdown格式),然后基于该文本给出答案,而非凭空猜测。

Workflow

工作流程

1) Check whether the Docs MCP server is available

1) 检查文档MCP服务器是否可用

If the
mcp__openaiDeveloperDocs__*
tools are available, use them.
If you are unsure, run
codex mcp list
and check for
openaiDeveloperDocs
.
如果
mcp__openaiDeveloperDocs__*
工具可用,请使用它们。如果不确定,请运行
codex mcp list
并检查是否存在
openaiDeveloperDocs

2) Use MCP tools to pull exact docs

2) 使用MCP工具获取准确文档

  • Search first, then fetch the specific page or pages.
    • mcp__openaiDeveloperDocs__search_openai_docs
      → pick the best URL.
    • mcp__openaiDeveloperDocs__fetch_openai_doc
      → retrieve the exact markdown (optionally with an
      anchor
      ).
  • When you need endpoint schemas or parameters, use:
    • mcp__openaiDeveloperDocs__get_openapi_spec
    • mcp__openaiDeveloperDocs__list_api_endpoints
Base your answer on the fetched text and quote or paraphrase it precisely. Do not invent flags, field names, defaults, or limits.
  • 先搜索,然后获取特定的一个或多个页面。
    • mcp__openaiDeveloperDocs__search_openai_docs
      → 选择最佳URL。
    • mcp__openaiDeveloperDocs__fetch_openai_doc
      → 获取准确的markdown文档(可选择带
      anchor
      参数)。
  • 当你需要端点模式或参数时,使用:
    • mcp__openaiDeveloperDocs__get_openapi_spec
    • mcp__openaiDeveloperDocs__list_api_endpoints
基于获取到的文本给出答案,准确引用或改写内容。请勿自行编造标志、字段名、默认值或限制。

3) If MCP is not configured, guide setup (do not change config unless asked)

3) 如果未配置MCP,引导用户进行设置(除非用户要求,否则不要修改配置)

Provide one of these setup options, then ask the user to restart the Codex session so the tools load:
  • CLI:
    • codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp
  • Config file (
    ~/.codex/config.toml
    ):
    • Add:
      toml
      [mcp_servers.openaiDeveloperDocs]
      url = "https://developers.openai.com/mcp"
提供以下其中一种设置选项,然后请用户重启Codex会话以加载工具:
  • CLI方式:
    • codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp
  • 配置文件方式(
    ~/.codex/config.toml
    ):
    • 添加以下内容:
      toml
      [mcp_servers.openaiDeveloperDocs]
      url = "https://developers.openai.com/mcp"