The rt.tools.* methods shown below are planned but not yet implemented in the SDK. For now, use the REST API directly (tools.runtools.ai/v1/tools/*) or the CLI (runtools tool list/install/exec).
import { RunTools } from '@runtools/sdk';
const rt = new RunTools({ apiKey: process.env.RUNTOOLS_API_KEY });
// List installed tools
const tools = await rt.tools.list();
// List marketplace tools
const marketplace = await rt.marketplace.list();
// Filter by category
const emailTools = await rt.marketplace.list({
category: 'communication'
});
// Search
const results = await rt.marketplace.search('send notification');
// Install from marketplace
await rt.tools.install('gmail');
await rt.tools.install('slack');
await rt.tools.install('github');
await rt.tools.install('discord');
await rt.tools.install('google-calendar');
await rt.tools.install('google-sheets');
await rt.tools.install('outlook');
await rt.tools.install('x-twitter');
await rt.tools.install('linkedin');
await rt.tools.install('telegram');
// Check if installed
const isInstalled = await rt.tools.isInstalled('gmail');
Tools can be configured with manual credentials or OAuth:
// Manual credentials
await rt.tools.configure('github', {
token: process.env.GITHUB_TOKEN,
});
// OAuth flow (opens browser, connects account)
await rt.tools.configureOAuth('gmail');
await rt.tools.configureOAuth('slack');
await rt.tools.configureOAuth('google-calendar');
OAuth is the recommended approach for official tools. Once connected, tokens are automatically managed and refreshed. See OAuth & Connected Apps.
// Send email via Gmail
const result = await rt.tools.execute('gmail', {
action: 'send_email',
params: {
to: 'user@example.com',
subject: 'Hello from RunTools',
body: 'This email was sent via the Tools API!',
},
});
// Post to Slack
await rt.tools.execute('slack', {
action: 'post_message',
params: {
channel: '#general',
text: 'Hello from RunTools!',
},
});
// Create GitHub issue
await rt.tools.execute('github', {
action: 'create_issue',
params: {
repo: 'myorg/myrepo',
title: 'Bug report',
body: 'Description of the bug...',
},
});
Each tool supports different actions. Here are the key ones:
Gmail (gmail)
| Action | Description |
|---|
send_email | Send an email |
list_emails | List emails with optional search query |
get_email | Get full email by ID |
reply | Reply to an email thread |
search | Search emails |
GitHub (github)
| Action | Description |
|---|
list_repos | List user’s repositories |
get_repo | Get repository details |
create_repo | Create a new repository |
search_repos | Search GitHub repositories |
list_issues | List issues in a repo |
get_issue | Get a specific issue |
create_issue | Create a new issue |
comment | Comment on an issue or PR |
list_prs | List pull requests |
create_pr | Create a pull request |
Slack (slack)
| Action | Description |
|---|
post_message | Post to a channel |
send_dm | Send a direct message |
list_channels | List workspace channels |
read_messages | Read channel messages |
search | Search messages |
set_topic | Set a channel’s topic |
list_users | List workspace users |
Google Calendar (google-calendar)
| Action | Description |
|---|
list_events | List upcoming events |
create_event | Create a new event |
update_event | Update an existing event |
delete_event | Delete an event |
find_free_time | Find available time slots |
Google Sheets (google-sheets)
| Action | Description |
|---|
read_range | Read data from a cell range |
write_range | Write data to a cell range |
append_rows | Append rows to end of sheet |
create_spreadsheet | Create a new spreadsheet |
list_sheets | List sheets in a spreadsheet |
Discord (discord)
| Action | Description |
|---|
list_guilds | List user’s servers |
list_channels | List channels in a server |
send_message | Send a message |
read_messages | Read recent messages |
create_channel | Create a new channel |
Outlook (outlook)
| Action | Description |
|---|
send_email | Send an email |
list_emails | List inbox emails |
get_email | Get email by ID |
list_events | List calendar events |
create_event | Create a calendar event |
| Action | Description |
|---|
post_tweet | Post a tweet |
search_tweets | Search tweets |
get_user | Get user profile |
get_timeline | Get user’s timeline |
like_tweet | Like a tweet |
LinkedIn (linkedin)
| Action | Description |
|---|
get_profile | Get authenticated user’s profile |
create_post | Create a LinkedIn post |
get_network | Get connection count and network info |
Telegram (telegram)
| Action | Description |
|---|
send_message | Send a text message |
send_photo | Send a photo |
get_updates | Get recent updates |
await rt.tools.uninstall('gmail');
Types
import type {
Tool,
ToolConfig,
ToolExecuteResult,
MarketplaceTool,
} from '@runtools/sdk';