#1420: clearer option errors and text cut-off in the inspect docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
This commit is contained in:
Mert Dede
2026-10-29 12:43:53 +03:00
co-authored by Claude Opus 5.5 GPT-6 Astra
parent 462b32a642
commit bd7a277c75
3 changed files with 15 additions and 13 deletions
+8 -8
View File
@@ -178,16 +178,16 @@ that `node.set` accepts are listed in [mcp.md](mcp.md#conventions-agents-must-kn
Both inspection methods accept `fields: [string]`: exact, case-sensitive top-level node keys such
as `name`, `type`, `x`, `fills`, `characters` or `pluginData`, applied recursively to pages too.
`[]` keeps only ids and structure. `id`, `children` and depth-boundary `childCount` are always kept.
Unknown keys are errors listing the valid keys; wrong types are
errors too.
An unknown key is an error that lists the valid keys; a `fields` that is not an array of strings,
or an `outline` that is not a boolean, is an error too.
`outline: true` selects `id`, `name`, `type`, `characters`, `mainComponentName` and `visible`, plus
structure. `characters` stops at 120 characters, with ASCII `...` appended only when
longer. When `visible` is selected (by either option), every node has an explicit boolean;
without options the output stays sparse. `outline: true` with `fields` is an error;
`outline: false` with `fields` is allowed. Document metadata is unchanged. The engine command
`node.get` (not this control method) takes the same options but no `depth`: it always returns one
level of children.
structure. `characters` is cut after 120 characters (Unicode scalars), with ASCII `...` appended
only when longer. When `visible` is selected (by either option), every node has an explicit
boolean; without options the output stays sparse. `outline: true` with `fields` is an error;
`outline: false` with `fields` is allowed. Document metadata is unchanged. Through
`engine.execute`, the engine command `node.get` takes the same options but no `depth`; it always
returns one level of children.
```json
{"id":5,"method":"document.inspect","params":{"depth":6,"outline":true}}