---
title: "file.inspect: Describe Document — Doc kit command — Kition"
description: "Answers the document's structure: pages, sections, paragraphs by index with their styles and short text, the selection and counts; with text true it includes each paragraph's full text. Use file.text for all the text."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/file.inspect"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/file.inspect](https://developer.kition.ai/docs/kits/doc/commands/file.inspect)

# file.inspect

**Describe Document.** Answers the document's structure: pages, sections, paragraphs by index with their styles and short text, the selection and counts; with text true it includes each paragraph's full text. Use file.text for all the text.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `boolean` | no |  |

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "file.inspect" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `text`. doc_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `blocks` | `object[]` | no |  |
| `canRedo` | `boolean` | no |  |
| `canUndo` | `boolean` | no |  |
| `comments` | `number` | no |  |
| `pages` | `number` | no |  |
| `parts` | `any[]` | no |  |
| `properties` | `object` | no |  |
| `sections` | `object[]` | no |  |
| `selection` | `object` | no |  |
| `trackChanges` | `boolean` | no |  |
| `words` | `number` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "blocks": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "index": {
            "type": "number"
          },
          "len": {
            "type": "number"
          },
          "props": {
            "additionalProperties": true,
            "properties": {
              "style": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "runs": {
            "items": {
              "additionalProperties": true,
              "properties": {
                "end": {
                  "type": "number"
                },
                "props": {
                  "additionalProperties": true,
                  "properties": {
                    "font": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "start": {
                  "type": "number"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "style": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "canRedo": {
      "type": "boolean"
    },
    "canUndo": {
      "type": "boolean"
    },
    "comments": {
      "type": "number"
    },
    "pages": {
      "type": "number"
    },
    "parts": {
      "type": "array"
    },
    "properties": {
      "additionalProperties": true,
      "properties": {
        "category": {
          "type": "string"
        },
        "created": {
          "type": "string"
        },
        "creator": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "keywords": {
          "type": "string"
        },
        "lastModifiedBy": {
          "type": "string"
        },
        "modified": {
          "type": "string"
        },
        "revision": {
          "type": "number"
        },
        "subject": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "sections": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "endBlock": {
            "type": "number"
          },
          "props": {
            "additionalProperties": true,
            "properties": {
              "columns": {
                "additionalProperties": true,
                "properties": {
                  "count": {
                    "type": "number"
                  },
                  "separator": {
                    "type": "boolean"
                  },
                  "space": {
                    "type": "number"
                  },
                  "widths": {
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "footer": {
                "type": "number"
              },
              "footers": {
                "additionalProperties": true,
                "properties": {
                  "default": {},
                  "even": {},
                  "first": {}
                },
                "type": "object"
              },
              "gutter": {
                "type": "number"
              },
              "header": {
                "type": "number"
              },
              "headers": {
                "additionalProperties": true,
                "properties": {
                  "default": {},
                  "even": {},
                  "first": {}
                },
                "type": "object"
              },
              "landscape": {
                "type": "boolean"
              },
              "lineNumbers": {},
              "marginBottom": {
                "type": "number"
              },
              "marginLeft": {
                "type": "number"
              },
              "marginRight": {
                "type": "number"
              },
              "marginTop": {
                "type": "number"
              },
              "pageBorders": {},
              "pageH": {
                "type": "number"
              },
              "pageNumFormat": {
                "type": "string"
              },
              "pageNumStart": {},
              "pageW": {
                "type": "number"
              },
              "rtl": {
                "type": "boolean"
              },
              "start": {
                "type": "string"
              },
              "titlePage": {
                "type": "boolean"
              },
              "valign": {
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "selection": {
      "additionalProperties": true,
      "properties": {
        "anchor": {
          "additionalProperties": true,
          "properties": {
            "off": {
              "type": "number"
            },
            "path": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "story": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "focus": {
          "additionalProperties": true,
          "properties": {
            "off": {
              "type": "number"
            },
            "path": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "story": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "text": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "trackChanges": {
      "type": "boolean"
    },
    "words": {
      "type": "number"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "text": {
      "type": "boolean"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
