Skip to main content
Glama

update_page

Modify existing wiki pages by updating content, metadata, or structure within BookStack. Change page text, tags, location, or priority to maintain current documentation.

Instructions

Update an existing page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPage ID
book_idNoMove to different book ID
chapter_idNoMove to different chapter ID
nameNoPage name (max 255 chars)
htmlNoPage content in HTML format
markdownNoPage content in Markdown format
tagsNoArray of tags with name and value
priorityNoPage priority/order

Implementation Reference

  • Handler logic in handleContentTool that destructures args, parses and validates input using UpdatePageSchema, converts tags, calls client.updatePage, and returns formatted response.
    case "update_page": { const { id, ...updateData } = args; const pageId = parseInteger(id); const validatedData = UpdatePageSchema.parse(updateData); const data = { ...validatedData, tags: convertTags(validatedData.tags), }; const result = await client.updatePage(pageId, data); return formatApiResponse(result); }
  • Zod validation schema for update_page tool parameters, used in the handler for input validation.
    export const UpdatePageSchema = z.object({ book_id: z.number().optional(), chapter_id: z.number().optional(), name: z.string().min(1).max(255).optional(), html: z.string().optional(), markdown: z.string().optional(), tags: z.array(TagSchema).optional(), priority: z.number().optional(), });
  • Tool definition registered in createContentTools function, including name, description, and input schema matching UpdatePageSchema.
    { name: "update_page", description: "Update an existing page", inputSchema: { type: "object", properties: { id: { type: "number", description: "Page ID" }, book_id: { type: "number", description: "Move to different book ID" }, chapter_id: { type: "number", description: "Move to different chapter ID", }, name: { type: "string", description: "Page name (max 255 chars)" }, html: { type: "string", description: "Page content in HTML format" }, markdown: { type: "string", description: "Page content in Markdown format", }, tags: { type: "array", description: "Array of tags with name and value", items: { type: "object", properties: { name: { type: "string" }, value: { type: "string" }, order: { type: "number" }, }, required: ["name", "value"], }, }, priority: { type: "number", description: "Page priority/order" }, }, required: ["id"], },
  • src/index.ts:124-126 (registration)
    Dispatch logic in MCP server request handler that routes 'update_page' (listed in contentToolNames) to handleContentTool.
    if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) {
  • BookStackClient.updatePage method called by the handler, performs the actual PUT API request to update the page.
    async updatePage( id: number, data: Partial<CreatePageRequest> ): Promise<Page> { return this.put<Page>(`/pages/${id}`, data); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lautarobarba/bookstack_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server