Spanish Total.js
English
Documentation For AI agents
Contents

MCP tools

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

.md
On this page

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.

{ "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.

ToolsRole of the token
Projects_list, Pages_list, Pages_readeditor, translator
Pages_save, Entries_saveeditor
Translations_list, Translations_read, Translations_savetranslator, editor
{ "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.

API

command

Docs_projects({ query: { language } })

Lists the projects, their versions and the address of their llms.txt. Start here when you do not know the slug of a project.
ParameterTypeDescription
language? String Language of the names and summaries.

Returns Array

command

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

Searches pages and API entries.
ParameterTypeDescription
q String The words to search for.
project? String A project slug.
version? String A version slug.
type? String page or an entry type.
language? String
take? Number Default: 10

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

command

Docs_page({ query: { url } })

Returns a page and all its entries as Markdown.
ParameterTypeDescription
url String The address or path of the page, for example /documents/1/guides/introduction/.

Returns Object { url, language, markdown }

command

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

Finds API entries by exact name and returns each one as Markdown.
ParameterTypeDescription
name String The entry name, with or without ().
project? String
version? String
language? String

Returns Array

Made in Europe