Skip to main content
Glama

add_table_of_contents

Insert a table of contents into a document, allowing you to set the section title and the number of heading levels.

Instructions

Add a Table of Contents to the document. The TOC will include headings up to the specified level.

Args: title: Title for the TOC section heading_levels: Number of heading levels to include (1-9)

Returns: Success or error message

Note: Open the document in Word and update the field to populate the TOC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoTable of Contents
heading_levelsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

Without annotations, the description carries full behavioral disclosure. It states the tool adds a TOC but only discloses as a note that the field must be updated in Word. It does not mention that the TOC is not auto-populated, whether it overwrites existing TOCs, or any permissions needed.

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

Conciseness3/5

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

The description is relatively short but includes redundant Args section that repeats parameter info from the schema. The note about updating in Word is important but placed at the end. Overall adequate but not optimally concise.

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 no annotations and schema coverage, the description is incomplete. It lacks details on behavior when no headings exist, whether it replaces existing TOCs, and the exact return format. The existence of sibling 'update_toc' makes this gap more significant.

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 coverage is 0%, so the description must add meaning. It provides ranges for heading_levels (1-9) and default values, which is helpful. However, it does not explain the effect of different values or any constraints beyond the schema.

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 tool 'Add a Table of Contents to the document' and specifies it includes headings up to a given level. It distinguishes itself from siblings like 'update_toc' and 'add_heading'. However, it could be more precise about the TOC being a field that requires manual update.

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 like 'update_toc' or 'add_heading'. It does not mention prerequisites (e.g., existing headings) or when not to use it. The note about updating in Word is buried.

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/rofiqcp/mcp-dokumen'

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