豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

fix: simplify emulation and script tools#1073

Merged
OrKoN merged 1 commit intomainfrom
orkon/fix-emulation
Mar 2, 2026
Merged

fix: simplify emulation and script tools#1073
OrKoN merged 1 commit intomainfrom
orkon/fix-emulation

Conversation

@OrKoN
Copy link
Copy Markdown
Collaborator

@OrKoN OrKoN commented Mar 2, 2026

  • reduces the token usage.
  • makes emulation and script compatible with CLI.
  • documents .nullable() and .object() restrictions for the future.
  • the emulation tools do not have nullable anymore and undefined would clear the emulation instead. The model is thus required to provide all emulation settings at once.

Closes #918

Comment thread src/tools/ToolDefinition.ts Outdated
Comment thread src/McpContext.ts
Comment thread CONTRIBUTING.md
Copy link
Copy Markdown
Collaborator

@Lightning00Blade Lightning00Blade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments

@OrKoN OrKoN force-pushed the orkon/fix-emulation branch from 6f3e873 to 8906001 Compare March 2, 2026 13:27
@OrKoN OrKoN enabled auto-merge March 2, 2026 13:28
@OrKoN OrKoN added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit e51ba47 Mar 2, 2026
21 checks passed
@OrKoN OrKoN deleted the orkon/fix-emulation branch March 2, 2026 13:37
OrKoN pushed a commit that referenced this pull request Mar 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.19.0](chrome-devtools-mcp-v0.18.1...chrome-devtools-mcp-v0.19.0)
(2026-03-05)


### 🎉 Features

* add pageId routing for parallel multi-agent workflows
([#1022](#1022))
([caf601a](caf601a)),
closes
[#1019](#1019)
* Add skill which helps with onboarding of the mcp server
([#1083](#1083))
([7273f16](7273f16))
* integrate Lighthouse audits
([#831](#831))
([dfdac26](dfdac26))


### 🛠️ Fixes

* improve error messages around --auto-connect
([#1075](#1075))
([bcb852d](bcb852d))
* improve tool descriptions
([#965](#965))
([bdbbc84](bdbbc84))
* repair broken markdown and extract snippets in a11y-debugging skill
([#1096](#1096))
([adac7c5](adac7c5))
* simplify emulation and script tools
([#1073](#1073))
([e51ba47](e51ba47))
* simplify focus state management
([#1063](#1063))
([f763da2](f763da2))
* tweak lighthouse description
([#1112](#1112))
([5538180](5538180))


### 📄 Documentation

* Adapt a11y skill to utilize Lighthouse
([#1054](#1054))
([21634e6](21634e6))
* add feature release checklist to CONTRIBUTING.md
([#1118](#1118))
([0378457](0378457))
* fix typo in README regarding slim mode
([#1093](#1093))
([92f2c7b](92f2c7b))


### 🏗️ Refactor

* clean up more of the context getters
([#1062](#1062))
([9628dab](9628dab))
* consistently use McpPage in tools
([#1057](#1057))
([302e5a0](302e5a0))
* improve type safety for page scoped tools
([#1051](#1051))
([5f694c6](5f694c6))
* make cdp resolvers use McpPage
([#1060](#1060))
([d6c06c5](d6c06c5))
* move dialog handling to McpPage
([#1059](#1059))
([40c241b](40c241b))
* move server to a separate file
([#1043](#1043))
([a8bf3e5](a8bf3e5))
* remove page passing via context
([#1061](#1061))
([4cb5a17](4cb5a17))
* set defaults to performance trace tool
([#1090](#1090))
([dfa9b79](dfa9b79))
* simplify the response texts
([#1095](#1095))
([cb0079e](cb0079e))
* type-cast as internal CdpPage interface
([#1064](#1064))
([2d5e4fa](2d5e4fa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
github-merge-queue bot pushed a commit that referenced this pull request Apr 1, 2026
## Summary

- Add `@local/no-zod-nullable-object` ESLint rule that disallows
`.nullable()` and `.object()` usage in tool schema files
(`src/tools/**/*.ts`)
- Fix the existing `zod.object()` violation in `fill_form` by converting
the elements array from objects to `"uid=value"` formatted strings
- Remove the TODO from CONTRIBUTING.md and link the rule name to the
documented restriction

## Context

Per the [PR #1073
review](#1073 (comment))
and the CONTRIBUTING.md guidelines, tool schemas should not use
`.nullable()` or `.object()` types. Complex objects should be
represented as short formatted strings instead.

The rule catches:
- `zod.object({...})` / `z.object({...})` - flags direct zod object
schema usage
- `.nullable()` - flags nullable schema usage on any expression

Closes #1076

## Test plan

- [ ] `npx eslint src/tools/` passes with no violations
- [ ] Creating a test file with `zod.object()` or `.nullable()` in
`src/tools/` triggers the rule
- [ ] TypeScript compilation passes (`npx tsc --noEmit`)
- [ ] Existing `fill_form` test updated to use new string format

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Co-authored-by: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

emulate tool schema uses anyOf, rejected by Claude API

2 participants