
According to CONTRIBUTING.md, there are strict restrictions on the JSON schemas used for tools (specifically, no .nullable() and no .object() types, representing complex objects as short formatted strings instead). Since CLAUDE.md serves as a guide for AI assistants, it is highly beneficial to document these schema restrictions here so that the AI assistant adheres to them when defining new tools.
- `defineTool` — for tools that act on `context` (global operations)
- `definePageTool` — for tools that act on a specific page; receives `request.page`
- Tools that accept CLI arguments use factory form: `defineTool((args) => ({...}))`
- Use `pageIdSchema` and `timeoutSchema` from `ToolDefinition.ts` for common parameters
- **JSON Schema Restrictions**: Do not use `.nullable()` or `.object()` types in schemas; represent complex objects as short formatted strings (per `CONTRIBUTING.md`).
Originally posted by @gemini-code-assist[bot] in thetigerone888/chrome-devtools-mcp#2 (comment)
According to
CONTRIBUTING.md, there are strict restrictions on the JSON schemas used for tools (specifically, no.nullable()and no.object()types, representing complex objects as short formatted strings instead). SinceCLAUDE.mdserves as a guide for AI assistants, it is highly beneficial to document these schema restrictions here so that the AI assistant adheres to them when defining new tools.Originally posted by @gemini-code-assist[bot] in thetigerone888/chrome-devtools-mcp#2 (comment)