add_bullet_list
Add bulleted lists to Microsoft Word documents by providing document ID and list items. This tool enables structured content organization for AI-assisted document creation.
Instructions
Add a bulleted list to the document
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | Document identifier | |
| items | Yes | Array of list items |
Implementation Reference
- src/tools/tool-handlers.ts:40-49 (handler)Handles the "add_bullet_list" tool call by delegating to DocumentManager.addBulletList and returning a success message with item count.case "add_bullet_list": documentManager.addBulletList(args.docId, args.items); return { content: [ { type: "text", text: `Bullet list added with ${args.items.length} items.`, }, ], };
- src/tools/document-tools.ts:81-98 (schema)Defines the tool schema including name, description, and input schema requiring docId and items array.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"], }, },
- src/index.ts:24-28 (registration)Registers the documentTools array (containing add_bullet_list schema) for the MCP ListToolsRequest.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: documentTools, }; });
- Core implementation that adds each item as a bulleted Paragraph to the document's paragraphs array and updates the document.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); }