shared_tools 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77d4fd4712e3a0eff81653da54bafa994746c6334780e95862379a943c3b5274
4
- data.tar.gz: fd504802d298371efe604e341e9a339fef42acecf2ff47148d70007efe901c44
3
+ metadata.gz: c72583fc2d491abce837a4c42268770fa5385c96800c28bd846a2b6cd12aa506
4
+ data.tar.gz: 41aefa6cb69ceea26c66d2c68bc46602d08e824213737ad432bdcf73bf3fef92
5
5
  SHA512:
6
- metadata.gz: f14ebee5d9ceb6fadfafa19af5bfc18c0ece33ba4d2d6894f2c4192e5ffe9abf41e8f3f4f8a109f2ab646b0ac076b9b3f530839af1dd4f979a7ba3c88b19cab0
7
- data.tar.gz: '0428dda46694b2f0eebb6112884a45f1d33e3a43dd23938598c1b4e3ca9163446b4033c8f1273c6f782047dc4d3c62d6d4b3ffdaff7173cacbfbe4f212a194dd'
6
+ metadata.gz: 77eb4bb5382359ef3132b376ddeca5f244edf9f4e4eab2d54bf7c9a0eff49825c75a0fbf5efca5ce0f737b799c782d34f3c1f91ac3a1e42dbd9c7d14b6a3cb16
7
+ data.tar.gz: e342c4d27481ce0bc72631753f64b6dfc047b70d3848b48be21affec7baa0360f46537dfbb86061cac756818df64f93e384c3f1e0048be83aee620ef1e585593
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### [0.4.2] - 2026-03-27
6
+
7
+ #### MCP Clients
8
+ - Added Playwright MCP client (`mcp/playwright_client.rb`) — browser automation via the official `@playwright/mcp` package (npx auto-download, no pre-installation required)
9
+ - Added `mcp/tool_schema_patch.rb` — strips `$schema` from MCP tool input schemas before API serialization; fixes `BadRequestError` from Claude's API when MCP servers annotate schemas with JSON Schema Draft 2020-12 meta-fields
10
+ - Added demo script: `examples/mcp/playwright_demo.rb`
11
+
3
12
  ## Released
4
13
 
5
14
  ### [0.4.1] - 2026-03-26
data/README.md CHANGED
@@ -437,6 +437,7 @@ SharedTools bundles [Model Context Protocol](https://modelcontextprotocol.io) cl
437
437
  | `require 'shared_tools/mcp/sequential_thinking_client'` | Chain-of-thought reasoning |
438
438
  | `require 'shared_tools/mcp/chart_client'` | Chart and visualisation generation |
439
439
  | `require 'shared_tools/mcp/brave_search_client'` | Web and news search (`BRAVE_API_KEY`) |
440
+ | `require 'shared_tools/mcp/playwright_client'` | Browser automation: navigate, click, fill, screenshot, extract |
440
441
 
441
442
  ```ruby
442
443
  # Load all available clients at once (skips any whose env vars are missing)
@@ -523,6 +524,7 @@ bundle exec ruby -I examples examples/doc_tool_demo.rb
523
524
  | `mcp/sequential_thinking_demo.rb` | Chain-of-thought reasoning |
524
525
  | `mcp/chart_demo.rb` | Chart generation |
525
526
  | `mcp/brave_search_demo.rb` | Brave web search |
527
+ | `mcp/playwright_demo.rb` | Browser automation via Playwright |
526
528
  | `notification_tool_demo.rb` | Desktop notifications, alerts, TTS |
527
529
  | `system_info_tool_demo.rb` | System info |
528
530
  | `weather_tool_demo.rb` | Weather + local forecast |
@@ -0,0 +1,34 @@
1
+ # shared_tools/mcp/playwright_client.rb
2
+ #
3
+ # Playwright MCP Server Client — npx auto-download (no pre-installation required)
4
+ #
5
+ # Provides browser automation via Playwright: navigate pages, click elements,
6
+ # fill forms, take screenshots, extract text/HTML, and interact with web apps.
7
+ #
8
+ # Uses the official @playwright/mcp package from the Playwright team.
9
+ #
10
+ # Prerequisites:
11
+ # - Node.js and npx (https://nodejs.org)
12
+ # The @playwright/mcp package is downloaded automatically on first use via `npx -y`.
13
+ #
14
+ # Configuration:
15
+ # No environment variables required.
16
+ #
17
+ # Usage:
18
+ # require 'shared_tools/mcp/playwright_client'
19
+ # client = RubyLLM::MCP.clients["playwright"]
20
+ # chat = RubyLLM.chat.with_tools(*client.tools)
21
+ #
22
+ # Compatible with ruby_llm-mcp >= 0.7.0
23
+
24
+ require "ruby_llm/mcp"
25
+
26
+ RubyLLM::MCP.add_client(
27
+ name: "playwright",
28
+ transport_type: :stdio,
29
+ config: {
30
+ command: "npx",
31
+ args: ["-y", "@playwright/mcp"],
32
+ env: {},
33
+ },
34
+ )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SharedTools
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shared_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
@@ -297,6 +297,7 @@ files:
297
297
  - lib/shared_tools/mcp/hugging_face_client.rb
298
298
  - lib/shared_tools/mcp/memory_client.rb
299
299
  - lib/shared_tools/mcp/notion_client.rb
300
+ - lib/shared_tools/mcp/playwright_client.rb
300
301
  - lib/shared_tools/mcp/sequential_thinking_client.rb
301
302
  - lib/shared_tools/mcp/slack_client.rb
302
303
  - lib/shared_tools/mcp/streamable_http_patch.rb