Skip to content

Add WebMCP interaction skill + SVO Zählerstandsmeldung domain skill#474

Open
VibeVik89 wants to merge 1 commit into
browser-use:mainfrom
VibeVik89:add-webmcp-skills
Open

Add WebMCP interaction skill + SVO Zählerstandsmeldung domain skill#474
VibeVik89 wants to merge 1 commit into
browser-use:mainfrom
VibeVik89:add-webmcp-skills

Conversation

@VibeVik89

@VibeVik89 VibeVik89 commented Jun 25, 2026

Copy link
Copy Markdown

What

Two new skills capturing field-tested learnings about WebMCP (navigator.modelContext) — page-registered, agent-callable tools.

interaction-skills/webmcp.md (generic)

  • Detecting WebMCP (the API surface lives on the prototype: getTools, executeTool, registerTool, ontoolchange).
  • Listing tools — inputSchema frequently arrives as a JSON-encoded string, not an object.
  • The two non-obvious executeTool gotchas, verified against Chrome (June 2026):
    1. First arg must be the RegisteredTool object from getTools(), not the tool name → else TypeError: ... not of type 'RegisteredTool'.
    2. Second arg must be a JSON string, not a JS object → else UnknownError: Failed to parse input arguments.
  • Verify-via-DOM, because handlers may intentionally not echo entered values.

domain-skills/svo/zaehlerstandsmeldung.md (site-specific)

  • The report_meter_reading tool: required fields, the HT/NT-vs-single-rate conditional fields, the honeypot trap, and that it never submits (CAPTCHA stays a human action).

Why

The executeTool arg shape is undiscoverable from the API alone and cost several attempts to work out — the next agent on any WebMCP site shouldn't pay that tax again.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EqyH3G9SuZmQXnotdt4bwi


Summary by cubic

Adds a generic WebMCP interaction skill and a site-specific SVO meter-reading skill to use page-registered tools instead of the DOM, reducing errors and setup time.

  • New Features
    • interaction-skills/webmcp.md: Detects navigator.modelContext, lists tools (parses inputSchema when it’s a JSON string), and details executeTool requirements (pass the RegisteredTool object and a JSON string). Recommends DOM-based verification.
    • domain-skills/svo/zaehlerstandsmeldung.md: Documents report_meter_reading inputs, HT/NT vs single-rate rules, and the honeypot trap. Notes that the tool fills fields but never submits (CAPTCHA remains manual).

Written for commit 15f9fa6. Summary will update on new commits.

Review in cubic

interaction-skills/webmcp.md documents navigator.modelContext: how to
detect WebMCP, list tools (inputSchema arrives as a JSON string), and
the two non-obvious executeTool gotchas — first arg must be the
RegisteredTool object (not the name), second arg must be a JSON string
(not a JS object). Plus verify-via-DOM since handlers may not echo.

domain-skills/svo/zaehlerstandsmeldung.md covers the report_meter_reading
tool: required fields, the HT/NT-vs-single-rate conditional fields, the
honeypot trap, and that it never submits (CAPTCHA stays a human action).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqyH3G9SuZmQXnotdt4bwi
@browser-harness-review

Copy link
Copy Markdown

✅ Skill review passed

Reviewed 2 file(s) — no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 issues found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="interaction-skills/webmcp.md">

<violation number="1" location="interaction-skills/webmcp.md:78">
P2: Verification snippet may leak sensitive form data by logging values from nearly all input fields (including non-hidden secrets).</violation>
</file>

<file name="domain-skills/svo/zaehlerstandsmeldung.md">

<violation number="1" location="domain-skills/svo/zaehlerstandsmeldung.md:62">
P2: Syntax error: missing closing parenthesis for `print()` in the verify code example. The expression `print(js(r'''...''')` has an unclosed `print(` call.</violation>

<violation number="2" location="domain-skills/svo/zaehlerstandsmeldung.md:69">
P3: The note advises reading `inputSchema.required`, but per the companion skill (`interaction-skills/webmcp.md`) the `inputSchema` is **often a JSON-encoded string, not an object**. Accessing `.required` directly on a string returns `undefined`. The note should include a `JSON.parse()` step before reading `.required` so the guidance works in the common case.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

res = js(r'''(() => {
const out = [];
document.querySelectorAll('input,select,textarea').forEach(el => {
if (el.type === 'hidden') return;

@cubic-dev-ai cubic-dev-ai Bot Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Verification snippet may leak sensitive form data by logging values from nearly all input fields (including non-hidden secrets).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At interaction-skills/webmcp.md, line 78:

<comment>Verification snippet may leak sensitive form data by logging values from nearly all input fields (including non-hidden secrets).</comment>

<file context>
@@ -0,0 +1,92 @@
+res = js(r'''(() => {
+  const out = [];
+  document.querySelectorAll('input,select,textarea').forEach(el => {
+    if (el.type === 'hidden') return;
+    out.push({name: el.name || el.id, value: (el.type==='checkbox'||el.type==='radio') ? el.checked : el.value});
+  });
</file context>
Fix with cubic

out.push({name: el.name, value: (el.type==='checkbox'||el.type==='radio') ? el.checked : el.value});
});
return out;
})()''')

@cubic-dev-ai cubic-dev-ai Bot Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Syntax error: missing closing parenthesis for print() in the verify code example. The expression print(js(r'''...''') has an unclosed print( call.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At domain-skills/svo/zaehlerstandsmeldung.md, line 62:

<comment>Syntax error: missing closing parenthesis for `print()` in the verify code example. The expression `print(js(r'''...''')` has an unclosed `print(` call.</comment>

<file context>
@@ -0,0 +1,69 @@
+    out.push({name: el.name, value: (el.type==='checkbox'||el.type==='radio') ? el.checked : el.value});
+  });
+  return out;
+})()''')
+```
+
</file context>
Fix with cubic


- There's a `honeypot` text input — leave it empty (spam trap; filling it likely flags the submission).
- The page has a fixed notification banner overlaying the lower viewport; `scrollIntoView`/`window.scrollTo` to bring form fields above it before screenshotting.
- Conversational use: read the tool's `inputSchema.required` first, then ask the user for the tariff type + the matching reading(s) before calling.

@cubic-dev-ai cubic-dev-ai Bot Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3: The note advises reading inputSchema.required, but per the companion skill (interaction-skills/webmcp.md) the inputSchema is often a JSON-encoded string, not an object. Accessing .required directly on a string returns undefined. The note should include a JSON.parse() step before reading .required so the guidance works in the common case.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At domain-skills/svo/zaehlerstandsmeldung.md, line 69:

<comment>The note advises reading `inputSchema.required`, but per the companion skill (`interaction-skills/webmcp.md`) the `inputSchema` is **often a JSON-encoded string, not an object**. Accessing `.required` directly on a string returns `undefined`. The note should include a `JSON.parse()` step before reading `.required` so the guidance works in the common case.</comment>

<file context>
@@ -0,0 +1,69 @@
+
+- There's a `honeypot` text input — leave it empty (spam trap; filling it likely flags the submission).
+- The page has a fixed notification banner overlaying the lower viewport; `scrollIntoView`/`window.scrollTo` to bring form fields above it before screenshotting.
+- Conversational use: read the tool's `inputSchema.required` first, then ask the user for the tariff type + the matching reading(s) before calling.
</file context>
Fix with cubic

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.

1 participant