> 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 准备好的文档

让你发布的文档更容易被 AI 工具发现、阅读和使用

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/mian-xiang-du-zhe-de-ai/mcp-servers-for-published-docs.md).

## 为 AI 优化你的文档

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

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

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

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

### 保持翻译对齐

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

[翻译](/docs/documentation/zh/gitbook-dai-li/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.
