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

# Strumenti MCP

> Gli strumenti del server MCP in /mcp/: pubblici e di sola lettura.

Il server è l'MCP nativo di Total.js 5: ogni action contrassegnata con `mcp: true` diventa uno strumento con il nome dell'action, e i suoi argomenti vanno in `query`, `input` o `params`, come nell'action.

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

Senza token, `/mcp/` elenca solo gli strumenti pubblici di lettura, e gli stessi strumenti vengono registrati nel browser per WebMCP. Con l'header `Authorization: Bearer <token>`, ogni strumento viene eseguito come l'agente del token: l'elenco aggiunge gli strumenti del suo ruolo, e ogni action verifica di nuovo il ruolo e i progetti del token.

| Strumenti | Ruolo del 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" } } }
```

Gli agenti non possono rimuovere nulla: questo resta nel pannello. Vedi [AI e agenti](/documents/1/guides/ai-and-agents/).

## API

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

Type: `command`

Elenca i progetti, le loro versioni e l'indirizzo del loro llms.txt. Parti da qui quando non conosci lo slug di un progetto.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `language` | `String` | no |  | Lingua dei nomi e dei riepiloghi. |

Returns: `Array`

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

Type: `command`

Cerca tra pagine e voci API.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `q` | `String` | yes |  | Le parole da cercare. |
| `project` | `String` | no |  | Lo slug di un progetto. |
| `version` | `String` | no |  | Lo slug di una versione. |
| `type` | `String` | no |  | `page` o un tipo di voce. |
| `language` | `String` | no |  |  |
| `take` | `Number` | no | `10` |  |

Returns: `Array` Titoli, indirizzi e riepiloghi; leggi il testo completo con Docs_page o Docs_entry.

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

Type: `command`

Restituisce una pagina e tutte le sue voci in Markdown.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `String` | yes |  | L'indirizzo o il percorso della pagina, per esempio /documents/1/guides/introduction/. |

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

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

Type: `command`

Trova le voci API per nome esatto e restituisce ciascuna in Markdown.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String` | yes |  | Il nome della voce, con o senza `()`. |
| `project` | `String` | no |  |  |
| `version` | `String` | no |  |  |
| `language` | `String` | no |  |  |

Returns: `Array`
