Skip to main content
Glama

add_bullet_list

Add bulleted lists to Microsoft Word documents by specifying document ID and list items. This tool enables structured content organization within documents.

Instructions

Add a bulleted list to the document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesDocument identifier
itemsYesArray of list items

Implementation Reference

  • Implements the core logic for adding a bulleted list to a document by creating Paragraph elements with bullet formatting and appending them to the document's paragraphs.
    addBulletList(docId: string, items: string[]): void {
      const docInfo = this.getDocument(docId);
    
      items.forEach((item) => {
        const paragraph = new Paragraph({
          text: item,
          bullet: {
            level: 0,
          },
        });
        docInfo.paragraphs.push(paragraph);
      });
    
      this.updateDocument(docId);
    }
  • Switch case in handleToolCall function that handles 'add_bullet_list' tool calls by invoking documentManager.addBulletList and returning a success message.
    case "add_bullet_list":
      documentManager.addBulletList(args.docId, args.items);
      return {
        content: [
          {
            type: "text",
            text: `Bullet list added with ${args.items.length} items.`,
          },
        ],
      };
  • Defines the tool schema for 'add_bullet_list' including name, description, input schema with docId and items parameters.
    {
      name: "add_bullet_list",
      description: "Add a bulleted list to the document",
      inputSchema: {
        type: "object",
        properties: {
          docId: {
            type: "string",
            description: "Document identifier",
          },
          items: {
            type: "array",
            items: { type: "string" },
            description: "Array of list items",
          },
        },
        required: ["docId", "items"],
      },
    },

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/bibash44/word-documet-mcp-server'

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