Tools
Gateway exposes two MCP tools. All provider actions flow through this pair.
search
Discover available actions. Works like --help for your connected providers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Provider name, action name, or keywords |
Usage Examples
# List everything available for a provider
search("slack")
# Fuzzy match across all providers
search("send message")
# Get full details for a specific action
search("linear.create_issue")
# See parameter spec and examples
search("notion.query_database")Response
Returns matching actions with:
- Action name and description
- Parameter definitions (name, type, required, description)
- Usage examples
- User context (which providers are connected, which aren't)
exec
Execute a provider action. Format: provider.action.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | string | yes | provider.action format (e.g. linear.create_issue) |
params | object | yes | Action-specific parameters |
Usage Examples
# Search Linear issues
exec("linear.search", { query: "auth bug" })
# Create a Notion page
exec("notion.create_page", {
parent: { database_id: "abc123" },
properties: { title: "New Spec" }
})
# Send a Slack message
exec("slack.send_message", {
channel: "#engineering",
text: "Deploy complete"
})
# Batch create Linear issues
exec("linear.batch_create_issues", {
issues: [
{ teamId: "...", title: "Fix login" },
{ teamId: "...", title: "Fix signup" }
]
})Error Handling
If the action doesn't exist, exec returns an error suggesting you use search to find the right action. If parameters are missing or invalid, it returns the parameter spec so the AI can fix the call.
Gateway Actions
The gateway provider exposes file storage actions through exec:
| Action | Purpose |
|---|---|
gateway.upload_file | Upload a file (base64 or URL) to Gateway storage. Returns file_id. |
gateway.list_files | List files in your storage |
gateway.file_download_url | Generate a signed temporary download URL (15 min expiry) |
gateway.delete_file | Delete a file from storage |
File Storage
Files are stored in R2 and are private by default. Use gateway.upload_file to store files, then reference the file_id in provider actions:
# Upload a file from URL
exec("gateway.upload_file", { filename: "photo.jpg", url: "https://..." })
# -> { file_id: "abc123", filename: "photo.jpg", size: 245000 }
# Send it via Telegram
exec("telegram.send_file", { chat: "@user", file_id: "abc123" })
# Or get a download link
exec("gateway.file_download_url", { file_id: "abc123" })
# -> { url: "https://gateway-api.oxc.dev/files/abc123/download?sig=...&exp=...", expires_in: 900 }