From e325867716bd26318d9216f7cf8d5972e394fc37 Mon Sep 17 00:00:00 2001 From: Tor Anders Johansen Date: Wed, 13 May 2026 14:32:40 +0200 Subject: [PATCH] feat(mcp): add fullWidth parameter to create_document and update_document tools (#12338) The fullWidth field is already persisted on the Document model and supported in the REST API schemas (DocumentsCreateSchema, DocumentsUpdateSchema), but the built-in MCP server did not expose it. This patch adds fullWidth as an optional boolean parameter to both create_document and update_document MCP tools, passing it through to documentCreator and documentUpdater respectively. --- server/tools/documents.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/tools/documents.ts b/server/tools/documents.ts index b448f54c15..00f807f407 100644 --- a/server/tools/documents.ts +++ b/server/tools/documents.ts @@ -300,6 +300,12 @@ export function documentTools(server: McpServer, scopes: string[]) { .describe( "Whether to publish the document. Defaults to true. Set to false to create as a draft." ), + fullWidth: z + .boolean() + .optional() + .describe( + "Whether the document should occupy full width of the screen. Defaults to false." + ), }, }, withTracing("create_document", async (input, context) => { @@ -340,6 +346,7 @@ export function documentTools(server: McpServer, scopes: string[]) { parentDocumentId: parentDocumentId, publish: input.publish !== false, collectionId: collection?.id, + fullWidth: input.fullWidth, }); const [{ text, ...attributes }, breadcrumb] = await Promise.all([ @@ -556,6 +563,12 @@ export function documentTools(server: McpServer, scopes: string[]) { .describe( "Set to true to publish a draft document, or false to convert a published document back to a draft." ), + fullWidth: z + .boolean() + .optional() + .describe( + "Whether the document should occupy full width of the screen." + ), }, }, withTracing("update_document", async (input, context) => {