Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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

NameTypeRequiredDescription
querystringyesProvider 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

NameTypeRequiredDescription
actionstringyesprovider.action format (e.g. linear.create_issue)
paramsobjectyesAction-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:

ActionPurpose
gateway.upload_fileUpload a file (base64 or URL) to Gateway storage. Returns file_id.
gateway.list_filesList files in your storage
gateway.file_download_urlGenerate a signed temporary download URL (15 min expiry)
gateway.delete_fileDelete 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 }