> 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 为每个已发布的文档站点提供 Model Context Protocol（MCP）服务器。兼容的工具可以将你的文档作为结构化资源进行发现和检索。

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

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

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

了解更多，请参见 [已发布文档的 MCP 服务器](/docs/documentation/zh/ai-for-your-readers/mcp-servers-for-published-docs.md).

## 为 AI 优化你的文档

GitBook 负责交付层。你的写作决定 AI 答案的质量。

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

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

这些做法能提升检索效果、减少歧义，并帮助人们找到答案。

### 保持翻译一致

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

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

### 衡量 AI 流量

使用 [Agents 与 MCP](/docs/documentation/zh/analytics/insights/agents-and-mcp.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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
