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.
This commit is contained in:
Tor Anders Johansen
2026-05-13 14:32:40 +02:00
committed by GitHub
parent bc6aa11f5d
commit e325867716
+13
View File
@@ -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) => {