get_document_toc
Retrieve a document's heading structure as a table of contents with line numbers. Use it to understand document layout and navigate to specific sections.
Instructions
Returns the heading structure of a document as a
table of contents with line numbers.
Use this tool when you need to:
- Understand the structure of a large document
- Find specific sections before reading them
- Navigate a document by its headings
Line numbers in the output can be used with
read_document(offset=...) or
read_document_section(heading=...) to read specific
parts.
Args:
document_id: The document ID
Returns:
Formatted table of contents with line numbers
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>"
},
"name": "get_document_toc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |