Edit

Command Palette

Search for a command to run...

Edit REST API Connector

Modify this tool gene.

Gene Details
apiintegrationhttprest
Content (Markdown)
Preview

REST API Connector Tool

Overview

A flexible tool for connecting to external REST APIs with built-in support for authentication, rate limiting, and error handling.

Configuration

Authentication Methods

  • API Key: Header or query parameter
  • Bearer Token: OAuth 2.0 bearer tokens
  • Basic Auth: Username/password combination

Rate Limiting

Configure rate limits to prevent API abuse:

rateLimit:
  requests: 100
  window: 60  # seconds
  strategy: sliding_window

Endpoints

GET Request

interface GetRequest {
  url: string;
  headers?: Record<string, string>;
  params?: Record<string, string>;
  timeout?: number;
}

POST Request

interface PostRequest {
  url: string;
  body: object;
  headers?: Record<string, string>;
  contentType?: 'json' | 'form' | 'multipart';
}

Error Handling

The tool automatically handles common HTTP errors:

  • 4xx errors: Returns structured error with message
  • 5xx errors: Implements exponential backoff retry
  • Timeouts: Configurable with sensible defaults

Security Considerations

  • Never log sensitive headers or credentials
  • Validate URLs to prevent SSRF attacks
  • Sanitize response data before processing