ReboFilesDocs
Empezar3
Qué es ReboFiles
Primeros pasos
Demos para ejecutar
Ponlo en tu app6
Componente de React
Headless: tu propia interfaz
Sin framework
Estilos y temas
Teclado y accesibilidad
Idiomas
Archivos9
Subidas
Vistas previas y el visor
Búsqueda
Cambios en vivo y carpetas grandes
Comentarios
Destacados y campos
Versiones, papelera y espacio
Descargar como .zip
Documentos de Word
El servidor14
La ruta
Frameworks e inicio de sesión
Quién puede hacer qué
Almacenamiento: S3, GCS, Azure y disco
Revisar las subidas
Metadatos: SQLite y Postgres
Esquema de la base de datos
Compartir y enlaces
Actividad y notificaciones
Ganchos, registros y límites
Retención, bloqueos y exportación
Escritorio y otros orígenes
Sincronizar una carpeta
Ir a producción
En equipo1
Asistentes de IA (MCP)
Referencia5
Paquetes
Componentes y hooks
API del cliente
Rutas HTTP
Estado y hoja de ruta
↑↓ para moverte↵ para abrirEsc para cerrar38 páginas

En equipo Asistentes de IA (MCP)

Asistentes de IA (MCP)

@rebofiles/mcp da a un asistente el drive como herramientas: listar, buscar, leer, escribir texto, renombrar, mover, colorear y mandar a la papelera. Cada una se pide a las rutas del drive con los permisos de la persona, así que authorize también se consulta para el asistente.
HTTP

En tu aplicación, por HTTP

Junto a la ruta del drive: reenvía la autorización y la cookie de cada petición al drive, así que basta con un token de la persona.

// app/api/mcp/route.ts, in Next.js
import { createMcpHandler } from '@rebofiles/mcp';

export const POST = createMcpHandler({ base: 'https://acme.com/api/files' });
claude mcp add --transport http rebofiles https://acme.com/api/mcp --header "Authorization: Bearer …"

headers indica con qué se pregunta al drive si no; fetch da el propio handler del drive, para preguntarle en el mismo proceso; origins, los orígenes desde los que un navegador puede llamarlo además del suyo.

stdio

En tu ordenador, por stdio

Para Claude Desktop y otros clientes que arrancan un comando.

{
  "mcpServers": {
    "rebofiles": {
      "command": "npx",
      "args": ["rebofiles-mcp"],
      "env": { "REBOFILES_URL": "https://acme.com/api/files", "REBOFILES_TOKEN": "…" }
    }
  }
}
Seguridad

Lo que puede tocar un asistente

  • Solo lo que puede su persona: cada herramienta pasa por las rutas del drive, identify y authorize.
  • Nada definitivo: puede mandar a la papelera, no borrar; no puede compartir. Lo que hace se puede deshacer desde la papelera o las versiones.
  • Lo que el servidor rechaza vuelve al modelo en palabras, para que haga otra cosa.
Herramientas

Todas las herramientas

Lo que hace cada una, traducido. Al asistente se las describe en inglés, que todos los modelos leen.

HerramientaTypeWhat it does
list_folderleeLo que hay en una carpeta del drive, las carpetas primero, o arriba del todo de Mis archivos. Da el id de cada una, para las demás herramientas.
search_textleeArchivos cuyo texto tiene cada palabra de la búsqueda, con un trozo del texto alrededor de lo encontrado: archivos de texto y documentos de Word, como se leyeron al subirlos.
get_infoleeUn archivo o carpeta: su tipo, tamaño, dueño, cuándo cambió y quién, dónde está, con quién se comparte, y sus versiones.
read_fileleeEl texto de un archivo: texto, Markdown, CSV, JSON y parecidos, y documentos de Word (.docx) cuando el servidor tiene Rebodocs. De una versión, si se da. No imágenes ni PDF. Hasta un megabyte.
list_recentleeLos últimos archivos cambiados que puede leer la persona para quien trabaja el asistente, el más reciente primero.
list_sharedleeLo que otros compartieron con la persona para quien trabaja el asistente.
get_activityleeQuién hizo qué a un archivo o carpeta, y, de una carpeta, a lo que tiene dentro: creado, subido, renombrado, movido, a la papelera, compartido. Lo más nuevo primero.
list_commentsleeLo que dijo la gente de un archivo o carpeta, cada hilo con sus respuestas debajo, y si se resolvió.
add_commentescribeUn comentario en un archivo o carpeta, en nombre de la persona para quien trabaja el asistente, visible para todos los que pueden leerlo; o una respuesta bajo otro, con su id. Se avisa a los nombrados con @.
create_folderescribeUna carpeta nueva; con "(2)" tras su nombre si ya está ocupado ahí.
create_text_fileescribeUn archivo nuevo con el texto dado, su tipo por su nombre (.md, .csv, .json, .txt…); con "(2)" tras su nombre si ya está ocupado ahí.
update_text_fileescribeEl texto dado pasa a ser el archivo; lo que era queda como su versión anterior, para restaurarla.
restore_versionescribeUna versión anterior de un archivo pasa a ser la actual, como versión nueva: la que era se queda, así que también se puede deshacer.
renameescribeOtro nombre para un archivo o carpeta; se rechaza si otro de la misma carpeta lo tiene.
set_folder_colorescribeUn color para una carpeta, para distinguirla de un vistazo: red, orange, yellow, green, teal, blue, purple, pink, gray; o "none" para el del drive.
moveescribeUn archivo o carpeta a otra carpeta, o arriba del todo de Mis archivos; se rechaza si el nombre está ocupado ahí.
move_to_trashescribeA la papelera, con lo que tiene dentro; restore la saca. Aquí nada se borra para siempre.
restoreescribeDe vuelta a la carpeta en que estaba, o arriba del todo si ya no está; con "(2)" si su nombre se ocupó mientras.
Rebodocs

Documentos de Word, con Rebodocs

Con @rebodocs/mcp instalado, los .docx del drive se leen y editan con las propias herramientas de Rebodocs, cada cambio guardado como una versión.

HerramientaWhat it does
create_documentA new, empty Word document (.docx) in the drive, to write in with insert_paragraphs (after_paragraph 0); with "(2)" after its name when the name is taken there.
get_overviewA summary of the document: how long it is, its headings with the paragraph each is at, its template variables, its notes and its paragraph styles. Start here.
read_documentThe text of the document, one paragraph a line, each with its number in brackets and, in parentheses, its style and its table cell when it has them. A long document comes in parts: ask for the next with "from".
read_formattingHow paragraphs look: for each, its style, alignment, indents, the room before and after it and its line spacing; then each stretch of its text that looks different, with its font, its size and whether it is bold, italic, underlined or coloured. Read it before rewriting or adding text that has to look like what is there.
compare_documentsWhat changed between this document and another version of it: an earlier version of the same file (the one before the current, unless "version" says), or another document ("other"). The paragraphs put in, taken out and changed, of the text and of its headers, footers, notes and text boxes, and the notes on the text, with what was taken out as [-…-] and what was put in as {+…+}. Tracked changes are compared as if accepted, as Word does. By default the other is the earlier one; with "file_is" "later", it is the later one.
find_textEvery place a text is found, with the paragraph it is in and the words around it.
replace_textPuts a text in place of another, in the formatting of what was there: its font, its size and its marks. The text to find has to be inside one paragraph. An empty "replace" deletes it. To write a whole paragraph anew, as in a translation, rewrite_paragraph keeps more of its look.
rewrite_paragraphWrites the whole text of a paragraph anew, as to translate it or say it otherwise, and keeps how it looks: its style, alignment, indents and spacing, and the font, size and colour most of its text has. Words that were set apart (bold, italic…) are kept so by giving the text in "segments". A paragraph with a picture is changed with replace_text instead.
insert_paragraphsWrites new paragraphs after a paragraph. Each has its text and, when wanted, a style (a heading, for one) or a list. With "like_paragraph" a new one looks like a paragraph that is there: its alignment, indents, spacing, list, and the font, size and colour of most of its text. Text between double braces, like {{cliente}}, is a template variable.
delete_paragraphsDeletes whole paragraphs, from one to another. Not for the paragraphs of a table.
edit_documentMakes several changes in one go, each as the tool it names would make it, and all of them or none. Every paragraph number in them is the one read_document showed before the first edit: the numbers do not move as the edits before insert or delete paragraphs, so there is no need to read again between them. A text to find is looked for as the document is when its edit comes. Each edit is an object with "tool" (replace_text, rewrite_paragraph, insert_paragraphs, delete_paragraphs, set_style, set_list, format_text, format_paragraphs, set_link, add_note, insert_page_break, move_section, set_cell_text, renumber_clauses) and the arguments of that tool beside it. The text of the document only: for a header or a footer, use each tool alone with "area".
move_sectionMoves a heading and everything under it, down to the next heading of its level or above (a clause with its text, a chapter with its clauses), to another place, as dragging it in the outline of the editor does. The paragraphs keep their look, their notes and their pictures. After it, renumber_clauses puts the numbers of the headings in order.
renumber_clausesPuts in order the numbers written at the start of the headings of clauses, after one was put in, taken out or moved: "Primera.", "Segunda."… in words, "CLÁUSULA 3.", or "IV.", each kept as it is written (its capitals, "Primera" or "Primero", "Décima Primera" or "Undécima"). The headings of one series are those that begin the same way and have the same style; the longest is renumbered, or the one of "paragraph". It says the places of the text that name a clause by its number ("según la cláusula Tercera"), for you to check: it does not change them.
set_cell_textWrites the text of a cell of a table, by its table, row and cell, as read_document shows them ("table 1, row 2, cell 3"): what the cell had goes, empty or not, and the text takes the look most of it had. A new line in "text" starts another paragraph in the cell. The way to fill the cells of a row just put in.
set_styleGives paragraphs a paragraph style: a heading, a title, the normal text. get_overview lists the styles of the document.
set_listMakes paragraphs the items of a list with bullets or with numbers, or takes them out of the list they are in.
format_textChanges how a text looks: its font, its size, bold, italic, underlined, struck through, its colour or the highlight behind it. The text is one found by "find", or whole paragraphs, from "from" to "to". Give only what is to change.
format_paragraphsChanges how paragraphs sit on the page: their alignment, indents, the room before and after them, their line spacing, their tab stops, and whether they keep with the next one. Give only what is to change.
add_notePuts a note on a text: a comment in the margin, as in Word, that does not change the document. The way to review a document, or to ask about something in it.
list_notesThe notes of the document: the id of each, who wrote it, the text it is about and what it says.
remove_noteTakes a note away; the text it was about stays.
track_changesSwitches tracked changes on or off, as Word's "Track changes". While on, every change made to the text, by any tool, stays marked for a person to accept or reject: what was put in as {+…+} and what was taken out as [-…-] in read_document.
list_changesThe tracked changes of the document, numbered: who made each, whether it put text in, took it out, moved it or changed its formatting, the text, and the paragraph it is in. Text one person put in and another took out is two changes. accept_changes and reject_changes take these numbers.
accept_changesAccepts tracked changes: what was put in stays, unmarked, and what was taken out goes. With "changes", the ones of those numbers in list_changes; with "author", all of that person's; without either, all of them. A move is accepted whole.
reject_changesRejects tracked changes: what was put in goes, and what was taken out comes back. With "changes", the ones of those numbers in list_changes; with "author", all of that person's; without either, all of them. A move is rejected whole.
list_variablesThe template variables of the document, written between double braces: the name of each, how many times it is used and the formats it is given (capitals, a date, money…).
fill_variablesPuts a value in place of each template variable that is given one, everywhere in the document (its headers, footers, notes and text boxes too), in the format the variable asks for, and writes out each block given one: {{#name}} … {{/name}} is repeated for each item of a list (a row of a table, paragraphs, or text), kept for true and taken out for false; {{^name}} … {{/name}} the other way round. Dates go as YYYY-MM-DD and numbers plain (1234.5): the format writes them out. Variables and blocks with no value stay as they are.
insert_tablePuts in a table after a paragraph, with the text of each cell. Every row must have the same number of cells.
insert_signaturesPuts in a block of signatures after a paragraph: side by side, each with its title (such as ASESOR and CLIENTE), a line to sign on and the name under it.
edit_tableChanges the shape or the look of a table that is there. "paragraph" is any paragraph of the cell to act on (read_document says which cell each is in). Actions: insert_row_above, insert_row_below, insert_column_left, insert_column_right, delete_row, delete_column, merge_cells (from "paragraph" to "to_paragraph"), split_cell (undoes a merge), set_column_widths (with "widths_cm", one for each column), set_row_height (with "height_cm", 0 for as tall as it holds, and "exact"), header_row_on and header_row_off (the rows down to this one repeat at the top of each page), align_cells_top, align_cells_center, align_cells_bottom, text_level, text_up and text_down (the text of the cells set level, or vertically to read from the bottom up or from the top down; its lines are as long as the row is tall), shade_cells (with "shade"), cell_lines (with "line_style", "line_width_pt" and "line_color"; "line_style" none takes them away), show_borders, hide_borders (the whole table), keep_together (the whole table on one page, as a block of signatures should be: no row is cut, and each row stays with the next), allow_split (undoes it) and delete_table. The actions on cells take "to_paragraph" for several. The text of a cell is changed with replace_text and insert_paragraphs.
insert_imagePuts a picture from a file (PNG, JPEG or GIF) in a paragraph of its own after a paragraph. It goes at its own size, or as wide as the text when it is wider, unless "width_cm" says otherwise.
edit_imageChanges a picture that is in the document: "resize" it (with "width_cm"; its height follows), "move" it to a paragraph of its own after another (with "after_paragraph"), "align" the paragraph it is in (with "align"), "describe" it for whoever cannot see it (with "description", what a screen reader says; empty takes it away), or "delete" it. read_document shows a picture as [image], or [image: its description].
set_columnsSets text in columns, as a newsletter: one column, two, three, with a line between them or not. With "from" and "to" only those paragraphs go in columns, in a section of their own on the same page; with "paragraph" alone, the whole section that paragraph is in.
insert_column_breakMakes the text from a place start at the top of the next column, in a section set in columns: before a text found with "find", or at the start of a paragraph.
insert_footnotePuts a note at the foot of the page: its number goes in the text right after a text found with "find" (or at the end of paragraph "at_paragraph"), and the note says "text". Notes are numbered by where they are in the text.
insert_endnotePuts a note at the end of the document, after its text (or at the end of its section, when the document puts them there): its number (i, ii, iii) goes in the text right after a text found with "find" (or at the end of paragraph "at_paragraph"), and the note says "text". Notes at the end are numbered by where they are in the text, apart from those at the foot of the page.
insert_text_boxPuts a text box in: a box with a thin black line, anchored to a paragraph (at the end of "after_paragraph"; 1 when left out), at the left of the column, with the text of that paragraph going round it. It is as tall as its text. Its text is "text"; each line of it a paragraph. Change it later with area "textbox".
set_letterheadGives the document a letterhead: a picture from a file (PNG, JPEG or GIF), stretched over the whole page behind the text of every page, in place of the one it had. For a PNG, the top and bottom margins grow to clear what it prints there. With "remove", takes it away; the rest of the header stays. get_overview says whether the document has one.
set_page_setupChanges the size of the paper, its orientation, or its margins; and, for one section of a document of several, whether it has a header and footer of its own and whether its first page has its own. Give only what is to change. Without "section", the page of every section changes.
set_page_numberPuts the number of the page in the header or the footer of every page, moves it, changes how it reads, or takes it away.
insert_page_breakMakes the text after a paragraph start on a new page.

Un guardado hecho mientras tanto por otra persona se detecta preguntando al drive justo antes de escribir, y no se sobrescribe.