Skip to main content
Glama

update-document-item

Modify document items on Miro boards by updating content, position, or dimensions to keep collaborative workspaces current.

Instructions

Update an existing document item on a Miro board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesUnique identifier (ID) of the board that contains the document
itemIdYesUnique identifier (ID) of the document that you want to update
dataNoThe updated content and configuration of the document
positionNoUpdated position of the document on the board
geometryNoUpdated dimensions of the document

Implementation Reference

  • The main handler function that executes the tool logic: validates required boardId and itemId, constructs a DocumentUpdateRequest with optional data, position, and geometry, calls the Miro API to update the document item, and returns the result or error.
    fn: async ({ boardId, itemId, data, position, geometry }) => { try { if (!boardId) { return ServerResponse.error("Board ID is required"); } if (!itemId) { return ServerResponse.error("Item ID is required"); } const updateRequest = new DocumentUpdateRequest(); if (data) { const documentData = new DocumentUrlData(); if (data.url !== undefined) documentData.url = data.url; if (data.title !== undefined) documentData.title = data.title; if (Object.keys(documentData).length > 0) { updateRequest.data = documentData; } } if (position) { updateRequest.position = position; } if (geometry) { updateRequest.geometry = geometry; } if (Object.keys(updateRequest).length === 0) { return ServerResponse.error("No data provided for update"); } const result = await MiroClient.getApi().updateDocumentItemUsingUrl(boardId, itemId, updateRequest); return ServerResponse.text(JSON.stringify(result, null, 2)); } catch (error) { return ServerResponse.error(error); } }
  • Zod input schema defining parameters for the tool: boardId (required string), itemId (required string), optional data (url/title), position (x/y), geometry (width/height).
    args: { boardId: z.string().describe("Unique identifier (ID) of the board that contains the document"), itemId: z.string().describe("Unique identifier (ID) of the document that you want to update"), data: z.object({ url: z.string().optional().nullish().describe("Updated URL of the document"), title: z.string().optional().nullish().describe("Updated title of the document") }).optional().nullish().describe("The updated content and configuration of the document"), position: z.object({ x: z.number().optional().nullish().describe("Updated X coordinate of the document"), y: z.number().optional().nullish().describe("Updated Y coordinate of the document") }).optional().nullish().describe("Updated position of the document on the board"), geometry: z.object({ width: z.number().optional().nullish().describe("Updated width of the document"), height: z.number().optional().nullish().describe("Updated height of the document") }).optional().nullish().describe("Updated dimensions of the document") },
  • src/index.ts:144-144 (registration)
    The line where the updateDocumentItemTool is registered with the ToolBootstrapper instance to make it available in the MCP server.
    .register(updateDocumentItemTool)
  • src/index.ts:43-43 (registration)
    Import statement that loads the tool definition for registration.
    import updateDocumentItemTool from './tools/updateDocumentItem.js';

Other Tools

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/k-jarzyna/mcp-miro'

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