Skip to main content
Glama

add_numbered_list

Insert a numbered list into a Word document by providing document ID and list items. This tool organizes content with sequential numbering for structured presentation.

Instructions

Add a numbered list to the document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesDocument identifier
itemsYesArray of list items

Implementation Reference

  • Core implementation of the addNumberedList method that creates docx Paragraph elements with numbering configuration and appends them to the document's paragraphs array.
    addNumberedList(docId: string, items: string[]): void {
      const docInfo = this.getDocument(docId);
    
      items.forEach((item, index) => {
        const paragraph = new Paragraph({
          text: item,
          numbering: {
            reference: "default-numbering",
            level: 0,
          },
        });
        docInfo.paragraphs.push(paragraph);
      });
    
      this.updateDocument(docId);
    }
  • Tool call handler case within handleToolCall that invokes the documentManager's addNumberedList method and returns a success confirmation.
    case "add_numbered_list":
      documentManager.addNumberedList(args.docId, args.items);
      return {
        content: [
          {
            type: "text",
            text: `Numbered list added with ${args.items.length} items.`,
          },
        ],
      };
  • Defines the tool schema for 'add_numbered_list' including input validation for docId (string) and items (string array).
    {
      name: "add_numbered_list",
      description: "Add a numbered 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)
    MCP server registration of tools list via ListToolsRequestHandler, where documentTools array includes the 'add_numbered_list' tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: documentTools,
      };
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds a numbered list but does not cover critical aspects like whether this is a mutating operation, how it affects document structure, error conditions, or response format. This leaves significant gaps in understanding the tool's behavior.

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, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core 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 the lack of annotations and output schema, the description is incomplete for a mutating tool. It does not address behavioral traits, error handling, or return values, leaving the agent with insufficient context to use the tool effectively beyond basic parameter input.

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, clearly documenting both parameters ('docId' and 'items'). The description does not add any additional meaning beyond the schema, such as examples or constraints, but the schema provides adequate baseline information, justifying a score of 3.

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 ('Add') and the resource ('numbered list to the document'), making the purpose unambiguous. However, it does not differentiate from sibling tools like 'add_bullet_list' or explain what distinguishes a numbered list from other list types, which prevents 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?

No guidance is provided on when to use this tool versus alternatives such as 'add_bullet_list' or 'add_paragraph'. The description lacks context about prerequisites (e.g., document must exist) or typical use cases, offering minimal usage direction.

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

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