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';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool updates a document item but fails to mention critical details such as required permissions, whether the update is partial or full, error handling (e.g., if the item doesn't exist), or the response format. This lack of information makes it inadequate for a mutation tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly for the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It lacks details on behavioral aspects (e.g., permissions, error handling), usage context, and return values, leaving significant gaps that could hinder an agent's ability to invoke the tool correctly and handle outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with each parameter clearly documented (e.g., 'boardId' as the board's ID, 'data' for updated content). The description adds no additional meaning beyond the schema, such as explaining how 'data', 'position', and 'geometry' interact or providing examples. Given the high schema coverage, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and the resource ('an existing document item on a Miro board'), making the purpose evident. However, it does not differentiate from sibling tools like 'update-board' or 'update-item-position', which are also update operations on Miro resources, leaving room for ambiguity in tool selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing board and item IDs), exclusions, or compare it to sibling tools like 'update-item-position' (which might handle only position updates) or 'create-document-item' (for new items), leaving the agent without context for appropriate selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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