Repository navigation
fix(tools): tool descriptions must describe, not direct the model #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e90590e
a2ceeea
386c4bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,17 +44,18 @@ export function registerBrowserTools( | |
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| }, | ||
| description: `Open a Zenrows Browser Sessions session and navigate to a URL. | ||
| description: `Open a Zenrows Browser session (a hosted browser) and navigate to a URL in one step. | ||
|
|
||
| This is the entry point for all browser automation. It creates a new session backed by | ||
| Zenrows' hosted browser infrastructure and navigates to the given URL in one step. | ||
| Every browser automation starts here. Returns a session_id that every other browser_* tool takes. | ||
|
|
||
| Returns a session_id that every other browser_* tool takes. The session holds one | ||
| concurrency slot until browser_close closes it. | ||
| Side effects: the session holds one concurrency slot and is billed for its open time | ||
| (5 credits per minute) and its traffic (25,000 credits per GB) until browser_close ends it; | ||
| a session closes after 3 minutes without a browser_* call, or 15 minutes after it opened, | ||
| and is billed until it closes. | ||
|
Comment on lines
+53
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do these two timeouts come from? The 5 credits per minute and 25,000 per GB match the docs, but I can't find "3 minutes without a browser_* call" or "15 minutes after it opened" in this repo. The docs only describe a session TTL of 3 minutes by default, configurable from 1 to 15: https://docs.zenrows.com/browser-sessions/features/session-ttl |
||
|
|
||
| When to use options: | ||
| Options: | ||
| - proxy_country: geo-restricted content (ISO 3166-1 alpha-2, e.g. "US", "DE") | ||
| - proxy_region: world region for geo-targeted proxy (eu, na, ap, sa, af, me)`, | ||
| - proxy_region: world region for a geo-targeted proxy (eu, na, ap, sa, af, me)`, | ||
| inputSchema: { | ||
| url: z.string().url().describe("The URL to navigate to"), | ||
| proxy_country: z | ||
|
|
@@ -113,7 +114,7 @@ When to use options: | |
| { | ||
| annotations: { title: "Close Browser Session", readOnlyHint: false, destructiveHint: false, openWorldHint: true }, | ||
| description: | ||
| "Close a browser session and free all associated resources, including the concurrency slot it holds.", | ||
| "Close a browser session: frees its concurrency slot and ends its billed time.", | ||
| inputSchema: { session_id: sessionId }, | ||
| }, | ||
| async ({ session_id }) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "subscription_inactive means the subscription is inactive" repeats itself, and the old "fix Billing" told the reader where the problem is. Maybe "means the subscription needs attention in Billing", which is a fact rather than an instruction.