Skip to main content
Glama

coda_append_page_content

Add markdown content to the end of a specified page in a Coda document by providing the document ID, page ID or name, and the content to append.

Instructions

Append new markdown content to the end of a page

Input Schema

NameRequiredDescriptionDefault
contentYesThe markdown content to append to the page
docIdYesThe ID of the document that contains the page to append the content to
pageIdOrNameYesThe ID or name of the page to append the content to

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "content": { "description": "The markdown content to append to the page", "type": "string" }, "docId": { "description": "The ID of the document that contains the page to append the content to", "type": "string" }, "pageIdOrName": { "description": "The ID or name of the page to append the content to", "type": "string" } }, "required": [ "docId", "pageIdOrName", "content" ], "type": "object" }

Implementation Reference

  • The handler function that appends markdown content to the end of a specified page by calling the updatePage SDK function with insertionMode set to 'append'. Handles errors by returning an error message.
    async ({ docId, pageIdOrName, content }): Promise<CallToolResult> => { try { const resp = await updatePage({ path: { docId, pageIdOrName, }, body: { // @ts-expect-error auto-generated client types contentUpdate: { insertionMode: "append", canvasContent: { format: "markdown", content }, }, }, throwOnError: true, }); return { content: [{ type: "text", text: JSON.stringify(resp.data) }] }; } catch (error) { return { content: [{ type: "text", text: `Failed to append page content: ${error}` }], isError: true }; } },
  • Zod input schema defining the parameters: docId, pageIdOrName, and content for the tool.
    { docId: z.string().describe("The ID of the document that contains the page to append the content to"), pageIdOrName: z.string().describe("The ID or name of the page to append the content to"), content: z.string().describe("The markdown content to append to the page"), },
  • src/server.ts:188-218 (registration)
    Registers the 'coda_append_page_content' tool with McpServer, including name, description, input schema, and handler function.
    server.tool( "coda_append_page_content", "Append new markdown content to the end of a page", { docId: z.string().describe("The ID of the document that contains the page to append the content to"), pageIdOrName: z.string().describe("The ID or name of the page to append the content to"), content: z.string().describe("The markdown content to append to the page"), }, async ({ docId, pageIdOrName, content }): Promise<CallToolResult> => { try { const resp = await updatePage({ path: { docId, pageIdOrName, }, body: { // @ts-expect-error auto-generated client types contentUpdate: { insertionMode: "append", canvasContent: { format: "markdown", content }, }, }, throwOnError: true, }); return { content: [{ type: "text", text: JSON.stringify(resp.data) }] }; } catch (error) { return { content: [{ type: "text", text: `Failed to append page content: ${error}` }], isError: true }; } }, );

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/orellazri/coda-mcp'

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