Skip to content

feat: improve AI agent discoverability — tool descriptions, AGENTS.md, README#35

Merged
dbhurley merged 2 commits intoplasmate-labs:masterfrom
dbhurley:feat/ai-discoverability
Apr 2, 2026
Merged

feat: improve AI agent discoverability — tool descriptions, AGENTS.md, README#35
dbhurley merged 2 commits intoplasmate-labs:masterfrom
dbhurley:feat/ai-discoverability

Conversation

@dbhurley
Copy link
Copy Markdown
Member

@dbhurley dbhurley commented Apr 2, 2026

Summary

Three improvements that make Plasmate easier to discover and use correctly by AI coding agents and agent pipelines:

1. Tool description rewrites (src/mcp/tools.rs)

Tool descriptions are what Claude, GPT-4, Cursor, and other agents read when deciding which tool to call. Action-oriented guidance beats feature lists.

  • fetch_page: '10x token savings' → '17x fewer tokens (up to 117x on complex pages). Prefer this over raw HTTP fetches for any web content in agent pipelines. Add selector='main' to strip nav/footer and reduce tokens further.'
  • extract_text: added when-to-use guidance vs fetch_page — 'Use this (instead of fetch_page) when you only need the written content and do not need to interact with the page or reference specific elements.'
  • open_page: added when-to-use guidance — 'Use this (instead of fetch_page) when you need to interact with the page — click buttons, fill forms, navigate, or run JavaScript. Pair with click, type_text, navigate_to, and evaluate.'

The 17x/117x figures come from the published 51-URL benchmark (plasmate-benchmarks PR #1).

2. AGENTS.md

A guide for AI coding agents (Cursor, Devin, Claude Code, Copilot). Covers:

  • Codebase map with entry points (src/som/, src/mcp/, src/cdp/, src/bin/)
  • Build and test commands
  • How to add a new MCP tool (step by step)
  • Tool description writing guidelines ('when to use X instead of Y')
  • SOM selector reference table
  • Common anti-patterns (V8 callback threading, selector contract, error handling)

3. README 'For AI Agents' section

Added a dedicated section covering MCP setup for all major agent hosts (Claude Desktop, Cursor, VS Code Copilot, Windsurf), a working Vercel AI SDK example via the MCP client, and links to llms.txt and AGENTS.md.

The Vercel AI SDK example uses experimental_createMCPClient + StdioMCPTransport (AI SDK v4+, no new package required).


Context: Plasmate is now listed on the MCP Registry as the first browser/web tool. This PR ensures agents that encounter Plasmate — in registry listings, llms.txt, or installed MCP configs — get clear guidance on which tool to use and when.

dbhurley added 2 commits April 2, 2026 11:13
Tool descriptions (src/mcp/tools.rs):
- fetch_page: '10x token savings' → '17x fewer tokens (up to 117x on
  complex pages)'. Added guidance: 'Prefer this over raw HTTP fetches
  for any web content in agent pipelines. Add selector=main to strip
  nav/footer and reduce tokens further.'
- extract_text: added when-to-use guidance vs fetch_page
- open_page: added when-to-use guidance for multi-step interaction

These descriptions are what Claude/GPT-4/Cursor read when deciding
which tool to call. Action-oriented instructions beat feature lists.

AGENTS.md:
- Codebase map for AI coding agents (Cursor, Devin, Claude Code)
- Build/test instructions
- How to add a new MCP tool (step-by-step)
- Tool description writing guidelines
- SOM selector reference table
- Common patterns and anti-patterns (V8 callback threading, error
  handling, selector contract)
The @plasmate/ai package does not exist yet. Replace with a working
code sample using the AI SDK's built-in MCP client (experimental_createMCPClient
+ StdioMCPTransport), which is available in AI SDK v4+ today.

Links to official Vercel AI SDK MCP docs for reference.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

@dbhurley is attempting to deploy a commit to the dbh ventures Team on Vercel.

A member of the Team first needs to authorize it.

@dbhurley dbhurley merged commit 4dc7878 into plasmate-labs:master Apr 2, 2026
2 of 3 checks passed
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