---
title: MCP tools
project: Documents
version: v1
section: reference
language: en
license: MIT
url: https://totaljs.es/docs/documents/1/reference/mcp-tools/
updated: 2026-11-20T06:51:57.969Z
---

# MCP tools

> The tools of the MCP server at /mcp/: public and read-only.

The server is the native MCP of Total.js 5: every action marked with `mcp: true` becomes a tool named after the action, and its arguments go in `query`, `input` or `params`, like in the action.

```json
{ "name": "Docs_search", "arguments": { "query": { "q": "versions" } } }
```

Without a token, `/mcp/` lists only the public reading tools, and the same tools are registered in the browser for WebMCP. With the header `Authorization: Bearer <token>`, every tool runs as the agent of the token: the list adds the tools of its role, and each action checks the role and the projects of the token again.

| Tools | Role of the token |
| --- | --- |
| `Projects_list`, `Pages_list`, `Pages_read` | editor, translator |
| `Pages_save`, `Entries_save` | editor |
| `Translations_list`, `Translations_read`, `Translations_save` | translator, editor |

```json
{ "name": "Pages_save", "arguments": { "input": { "versionid": "…", "section": "guides", "slug": "install", "title": "Install", "body": "…", "status": "draft", "note": "First draft" } } }
```

Agents cannot remove anything: that stays in the panel. See [AI and agents](/documents/1/guides/ai-and-agents/).

## API

### Docs_projects({ query: { language } })

Type: `command`

Lists the projects, their versions and the address of their llms.txt. Start here when you do not know the slug of a project.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `language` | `String` | no |  | Language of the names and summaries. |

Returns: `Array`

### Docs_search({ query: { q, project, version, type, language, take } })

Type: `command`

Searches pages and API entries.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `q` | `String` | yes |  | The words to search for. |
| `project` | `String` | no |  | A project slug. |
| `version` | `String` | no |  | A version slug. |
| `type` | `String` | no |  | `page` or an entry type. |
| `language` | `String` | no |  |  |
| `take` | `Number` | no | `10` |  |

Returns: `Array` Titles, addresses and summaries; read the full text with Docs_page or Docs_entry.

### Docs_page({ query: { url } })

Type: `command`

Returns a page and all its entries as Markdown.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `String` | yes |  | The address or path of the page, for example /documents/1/guides/introduction/. |

Returns: `Object` `{ url, language, markdown }`

### Docs_entry({ query: { name, project, version, language } })

Type: `command`

Finds API entries by exact name and returns each one as Markdown.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String` | yes |  | The entry name, with or without `()`. |
| `project` | `String` | no |  |  |
| `version` | `String` | no |  |  |
| `language` | `String` | no |  |  |

Returns: `Array`
