rtrvr.ai agents aren't limited to browsing. They can call external APIs, query databases, and run custom logic using the Model Context Protocol (MCP) or secure JavaScript tools. Tools are a shared primitive — create them once, use them across the extension, cloud, and API.
Direct Tool Calls
When you know exactly which tool to use, bypass the AI planner with the @toolName syntax. This is highly efficient for repetitive tasks and gives you direct control.
@act(action="click submit") → Direct browser action
@extractToSheets(prompt="get emails") → Fast extraction across open tabs
@hubspot_lookup(email="user@example.com") → Call a custom/MCP tool directlyMCP Servers
Connect to any Model Context Protocol server by pasting its URL. Once connected, all MCP tools become available in your chat with @toolname syntax. rtrvr.ai supports SSE (Server-Sent Events), HTTP Streamable, and OAuth-protected servers.
- Open the Tools section in extension settings
- Paste the MCP server URL (e.g., your company's internal MCP, or a public one)
- Authenticate if required (OAuth flow handled in-browser)
- All server tools appear instantly — use them with @toolname in chat
AI Tool Generator
Don't have an MCP server? The Tool Generator sub-agent can create custom integrations automatically. Just describe what you need in plain English — or better yet, point the agent at an API documentation page and let it build the tool for you.
"Find my HubSpot API keys and create a tool to load contacts"
"Use this onscreen API docs to create a tool that searches our internal database"
"Create a tool that calls the OpenWeatherMap API with a city name and returns the forecast"Custom JavaScript Tools
Write your own tools in JavaScript or let the AI build them. Tools run securely in your browser via a sandboxed iframe. You can store API keys as default parameters — they remain local to your machine and are never sent to rtrvr.ai servers.
How Parameters Work
When you define parameters for a custom function, they become available as JavaScript variables in your code. The system automatically converts each parameter into a const declaration before running your code.
// Parameters defined: firstName (string), lastName (string), apiKey (string, default)
// Your code — parameters are pre-declared as const variables:
const res = await fetch(`https://api.example.com/users?name=${firstName}+${lastName}`, {
headers: { "Authorization": `Bearer ${apiKey}` }
});
const data = await res.json();
return data.results;- Define parameters with names, types, and optional defaults
- Reference parameters directly as variables (firstName, not params.firstName)
- Parameters are injected as const declarations before your code runs
- Return any JSON-serializable value — async/await is fully supported
- console.log() output is captured and shown in results for debugging
Code Examples
// Simple greeting
return `Hello ${firstName} ${lastName}!`;
// Math
return price * quantity * (1 + taxRate);
// API call
const r = await fetch(url);
return await r.json();
// Transform
return items.map(i => i.name).join(", ");Parameter names must be valid JavaScript identifiers (letters, numbers, underscores — no spaces).
Sheets Tool Mapping
In Sheets Workflows, the agent can map tool calls to run for every row — intelligently pulling arguments from specific columns. Just include instructions in your prompt:
"For each row, use the loadContact tool to upload the email in Column A and name in Column B to HubSpot"| Column A (Email) | Column B (Name) | Column C (Result) |
|---|---|---|
| user@example.com | Jane Doe | ✅ Contact created (ID: 12345) |
| admin@test.org | John Smith | ✅ Contact created (ID: 12346) |
Platform Availability
| Capability | Extension | Cloud | API |
|---|---|---|---|
| @toolname direct calls | ✅ | — | — |
| MCP server connections | ✅ | ✅ | ✅ |
| AI Tool Generator | ✅ | ✅ | — |
| Custom JavaScript tools | ✅ | ✅ | — |
| Sheets tool mapping | ✅ | ✅ | ✅ |
| Tools in replayed workflows | ✅ | ✅ | ✅ |