Skip to main content
Glama

create-document-item

Add a document to a Miro board by specifying its URL, position, and optional title or dimensions for collaborative visualization.

Instructions

Create a new document item on a Miro board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesUnique identifier (ID) of the board where the document will be created
dataYesThe content and configuration of the document
positionYesPosition of the document on the board
geometryNoDimensions of the document

Implementation Reference

  • The handler function that creates a document item on a Miro board using the Miro API. It constructs a DocumentCreateRequest with the provided data, position, and optional geometry, then calls createDocumentItemUsingUrl.
    fn: async ({ boardId, data, position, geometry }) => {
      try {
        if (!boardId) {
          return ServerResponse.error("Board ID is required");
        }
    
        const createRequest = new DocumentCreateRequest();
        
        const documentData = new DocumentUrlData();
        documentData.url = data.url;
        
        if (data.title !== undefined) documentData.title = data.title;
        
        createRequest.data = documentData;
        createRequest.position = position;
        
        if (geometry) {
          createRequest.geometry = geometry;
        }
    
        const result = await MiroClient.getApi().createDocumentItemUsingUrl(boardId, createRequest);
        return ServerResponse.text(JSON.stringify(result, null, 2));
      } catch (error) {
        return ServerResponse.error(error);
      }
    }
  • Input schema using Zod for validating parameters: boardId (string), data (object with url and optional title), position (object with x and y), optional geometry (object with width and height).
    args: {
      boardId: z.string().describe("Unique identifier (ID) of the board where the document will be created"),
      data: z.object({
        url: z.string().describe("URL of the document to be added to the board"),
        title: z.string().optional().nullish().describe("Title of the document")
      }).describe("The content and configuration of the document"),
      position: z.object({
        x: z.number().describe("X coordinate of the document"),
        y: z.number().describe("Y coordinate of the document")
      }).describe("Position of the document on the board"),
      geometry: z.object({
        width: z.number().optional().nullish().describe("Width of the document"),
        height: z.number().optional().nullish().describe("Height of the document")
      }).optional().nullish().describe("Dimensions of the document")
    },
  • src/index.ts:142-142 (registration)
    Registers the create-document-item tool in the ToolBootstrapper chain.
    .register(createDocumentItemTool)
  • src/index.ts:41-41 (registration)
    Imports the createDocumentItemTool for registration.
    import createDocumentItemTool from './tools/createDocumentItem.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 'Create a new document item' which implies a write operation, but doesn't mention permissions required, rate limits, whether the operation is idempotent, or what happens on failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, clear sentence with zero wasted words. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

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?

Given this is a mutation tool (creating items) with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or behavioral constraints. The 100% schema coverage helps with inputs, but overall context for safe and effective use is lacking.

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?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain URL format requirements or position coordinate systems). Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Create') and resource ('document item on a Miro board'), making the purpose evident. However, it doesn't differentiate from sibling tools like 'create-text-item' or 'create-embed-item' that also create items on Miro boards, so it lacks sibling distinction for a perfect score.

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. With many sibling tools for creating different item types (e.g., 'create-text-item', 'create-image-item-using-url'), there's no indication that this is specifically for document items based on URLs, leaving the agent to guess based on the tool name alone.

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