Skip to main content
Glama

apply_bullet_list

Format paragraphs in Word documents as bulleted lists using various bullet styles like circles, squares, dashes, or checkmarks to organize content clearly.

Instructions

Apply bullet list formatting to paragraphs.

Args: filepath: Path to the document paragraph_indices: List of paragraph indices to bullet bullet_style: Type of bullet ('bullet', 'circle', 'square', 'dash', 'check')

Returns: Dictionary with status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathYes
paragraph_indicesYes
bullet_styleNobullet

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the apply_bullet_list tool.
    def apply_bullet_list(
        filepath: str,
        paragraph_indices: list[int],
        bullet_style: str = "bullet",
    ) -> dict[str, Any]:
        """
        Apply bullet list formatting to paragraphs.
    
        Args:
            filepath: Path to the document
            paragraph_indices: List of paragraph indices to bullet
            bullet_style: Type of bullet ('bullet', 'circle', 'square', 'dash', 'check')
    
        Returns:
            Dictionary with status
        """
        logger.info("Applying bullet list", extra={"tool": "apply_bullet_list", "filepath": filepath})
    
        try:
            doc = safe_open_document(filepath)
    
            # Validate indices
            for idx in paragraph_indices:
                if idx < 0 or idx >= len(doc.paragraphs):
                    raise InvalidParameterError("paragraph_indices", f"Index {idx} out of range")
    
            # Apply bullet formatting using list style
            for idx in paragraph_indices:
                paragraph = doc.paragraphs[idx]
                # Use list format (list_number is the built-in bullet style)
                paragraph.paragraph_format.left_indent = Inches(0.5)
                paragraph.style = "List Bullet"
    
            safe_save_document(doc, filepath)
            logger.info(
                f"Applied bullet list to {len(paragraph_indices)} paragraphs",
                extra={"filepath": filepath},
            )
    
            return {
                "status": "success",
                "filepath": filepath,
                "paragraphs_updated": len(paragraph_indices),
                "bullet_style": bullet_style,
            }
        except DocxMcpError as e:
            logger.warning(e.message, extra={"tool": "apply_bullet_list", "error_code": e.error_code})
            return {"status": "error", "error": e.message, "error_code": e.error_code}
        except Exception as e:
            logger.error(f"Unexpected error applying bullet list: {str(e)}")
  • Tool registration using the @app.tool() decorator.
    @app.tool()
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions the tool 'applies' formatting (implying mutation) and returns a status dictionary, but doesn't disclose permissions needed, whether changes are destructive/reversible, error conditions, or what specific status values mean.

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

Conciseness4/5

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

The description is efficiently structured with a clear purpose statement followed by parameter and return sections. However, the 'Args:' and 'Returns:' headings are somewhat redundant since this information is already in structured fields, and the return statement could be more specific.

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

Completeness3/5

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

For a mutation tool with 3 parameters, 0% schema coverage, no annotations, but with an output schema, the description is minimally adequate. It covers the basic operation and parameters but lacks important context about file system interactions, error handling, and relationship to other document formatting tools.

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 0%, so the description must compensate but only partially does. It lists parameters and provides a bullet_style enum that isn't in the schema, adding some value. However, it doesn't explain paragraph_indices format (zero-based?), filepath requirements, or default behavior when bullet_style is omitted.

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 verb 'apply' and the resource 'bullet list formatting to paragraphs', making the purpose evident. It distinguishes from sibling 'apply_numbered_list' by specifying bullet formatting, but doesn't explicitly differentiate from other formatting tools like 'apply_paragraph_style'.

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 like 'apply_numbered_list' or 'apply_paragraph_style'. The description only states what the tool does, not when it should be selected over other formatting options available in the sibling tool list.

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/Andrew82106/LLM_Docx_Agent_MCP'

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