> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/getting-started/llm-ready-docs.md).

# 可供 LLM 使用的文档

GitBook 会自动为你的文档站点发布适合 AI 的格式。

它们帮助大型语言模型（LLM）、编码代理和 AI 搜索系统。这些工具无需解析 HTML 就能发现并检索准确的文档。

## Markdown 页面

附加 `.md` 到任何已发布页面的 URL 后，即可查看其 Markdown。Markdown 为 AI 工具提供结构化内容，而无需外层 HTML。

<a href="https://gitbook.com/docs/publishing-documentation/llm-ready-docs.md" class="button primary">查看此页面的 .md 文件</a>

## llms.txt

[llms.txt](https://llmstxt.org/) 是面向 LLM 的网页内容的拟议标准。附加 `/llms.txt` 到你文档站点的根 URL。

它列出所有带有 Markdown 版本的已发布页面。AI 工具可以使用这个索引来发现你的文档。

<a href="https://gitbook.com/docs/llms.txt" class="button primary">查看 GitBook 文档的 /llms.txt</a>

## llms-full.txt

附加 `/llms-full.txt` 到你文档站点的根 URL。此文件将你的完整文档内容集中在一个位置。

隐藏页面会包含在 `llms-full.txt`中。隐藏页面只会将其从已发布的目录中移除。

<a href="https://gitbook.com/docs/llms-full.txt" class="button primary">查看 GitBook 文档的 /llms-full.txt 文件</a>

## 已发布文档的 MCP 服务器

GitBook 为每个已发布的文档站点提供模型上下文协议（MCP）服务器。兼容的工具可以将你的文档作为结构化资源进行发现和检索。

隐藏页面仍可通过站点的 MCP 服务器访问。隐藏页面只会将其从已发布的目录中移除。

附加 `/~gitbook/mcp` 到你文档站点的根 URL。例如，GitBook 的 MCP 服务器是 `https://gitbook.com/docs/~gitbook/mcp`.

{% hint style="info" %}
在浏览器中打开此 URL 会返回错误。请使用可发出 HTTP 请求的工具。
{% endhint %}

了解更多： [已发布文档的 MCP 服务器](/docs/documentation/zh/wei-ni-de-du-zhe-ti-gong-ai/mcp-servers-for-published-docs.md).

## 为 AI 优化你的文档

GitBook 负责传递层。你的写作决定 AI 回答的质量。

编写 AI 工具能够可靠理解的内容：

* 为每个页面赋予清晰的用途。
* 使用描述性标题和简短章节。
* 直接说明限制、默认值和要求。
* 包含具体示例和精确数值。
* 当你的产品发生变化时，更新内容。

这些做法可改善检索、减少歧义，并帮助人们找到答案。

### 保持翻译同步

如果你以多种语言发布，请让每个译文与源内容保持同步。

[翻译](/docs/documentation/zh/gitbook-agent/translations.md) 可让你使用 GitBook Agent 本地化内容。当源内容发生变化时，GitBook 可以保持译文同步。

### 衡量 AI 流量

使用 [网站分析](/docs/documentation/zh/fen-xi/insights.md) 来跟踪来自 LLM 和 MCP 客户端的流量。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/getting-started/llm-ready-docs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
