Skip to main content

List Tools

List all tools available in the current project.

Response

tools
array
Array of tool objects
curl --location --request GET 'https://api.plaisolutions.com/tools' \
--header 'Authorization: Bearer YOUR_TOKEN'

Create Tool

Create a new tool to extend agent capabilities.

Request Body

name
string
required
Tool name
type
string
required
Tool type:
  • BROWSER - Web browsing and interaction capabilities
  • HTTP - HTTP API requests and integrations
  • PERPLEXITY - Perplexity AI search integration
  • EXTERNAL_DATASOURCE - External data source connections
  • REMOTE_MCP_SERVER - Model Context Protocol server integration
description
string
Tool description (default: "")
config
object
Tool-specific configuration (default: )

Response

Returns the created tool object.
curl --location --request POST 'https://api.plaisolutions.com/tools' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Web Search Tool",
  "type": "HTTP",
  "description": "Tool for searching the web and retrieving information",
  "config": {
    "base_url": "https://api.search.example.com",
    "api_key_required": true,
    "rate_limit": 100
  }
}'

Get Tool

Get detailed information about a specific tool.

Path Parameters

id
string
required
The unique identifier of the tool

Response

Returns the tool object with all configuration details.
curl --location --request GET 'https://api.plaisolutions.com/tools/tool_123' \
--header 'Authorization: Bearer YOUR_TOKEN'

Update Tool

Update tool properties and configuration.

Path Parameters

id
string
required
The unique identifier of the tool

Request Body

All fields are optional and only provided fields will be updated.
name
string
Updated tool name
description
string
Updated tool description
config
object
Updated tool configuration

Response

Returns the updated tool object.
curl --location --request PATCH 'https://api.plaisolutions.com/tools/tool_123' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Enhanced Web Search Tool",
  "description": "Advanced web search with filtering capabilities",
  "config": {
    "base_url": "https://api.search.example.com/v2",
    "api_key_required": true,
    "rate_limit": 200,
    "filters_enabled": true
  }
}'

Delete Tool

Delete a tool. This will also remove it from any agents that are currently using it.

Path Parameters

id
string
required
The unique identifier of the tool to delete

Response

Returns a 204 status code on successful deletion.
Deleting a tool will:
  • Remove it from all agents that are using it
  • Disable any functionality that depends on this tool
  • This action cannot be undone
curl --location --request DELETE 'https://api.plaisolutions.com/tools/tool_123' \
--header 'Authorization: Bearer YOUR_TOKEN'

Tool Types and Configuration

Each tool type has specific configuration options and capabilities:

BROWSER Tools

{
  "headless": true,
  "viewport": {"width": 1280, "height": 720},
  "timeout": 30000,
  "user_agent": "PLai Browser Bot 1.0",
  "enable_javascript": true,
  "enable_images": false
}
  • Navigate to web pages
  • Click elements and fill forms
  • Take screenshots
  • Extract page content
  • Handle JavaScript interactions
  • Manage cookies and sessions
  • Web scraping and automation
  • Form filling and submissions
  • Interactive web testing
  • Content extraction from dynamic sites

HTTP Tools

{
  "base_url": "https://api.example.com",
  "headers": {
    "User-Agent": "PLai HTTP Tool",
    "Accept": "application/json"
  },
  "timeout": 30,
  "retry_count": 3,
  "rate_limit": 100
}
  • Make GET, POST, PUT, DELETE requests
  • Handle authentication (API keys, OAuth)
  • Process JSON, XML, and other formats
  • Custom headers and parameters
  • Error handling and retries
  • API integrations
  • Data retrieval from services
  • Webhook interactions
  • Third-party service connections

PERPLEXITY Tools

{
  "model": "llama-3.1-sonar-small-128k-online",
  "max_tokens": 1000,
  "temperature": 0.2,
  "search_domain_filter": ["example.com"],
  "return_citations": true
}
  • Real-time web search
  • Up-to-date information retrieval
  • Cited sources and references
  • Domain-specific searches
  • Multiple search models
  • Current events and news
  • Research and fact-checking
  • Market intelligence
  • Technical documentation lookup

EXTERNAL_DATASOURCE Tools

{
  "connection_string": "postgresql://user:pass@host:port/db",
  "query_timeout": 30,
  "max_results": 1000,
  "read_only": true,
  "connection_pool_size": 5
}
  • Connect to external databases
  • Execute queries and retrieve data
  • Support multiple database types
  • Connection pooling and optimization
  • Security and access control
  • Customer data lookup
  • Inventory management
  • Reporting and analytics
  • Legacy system integration

REMOTE_MCP_SERVER Tools

{
  "server_url": "https://mcp.example.com",
  "authentication": {
    "type": "bearer",
    "token": "your-token-here"
  },
  "timeout": 60,
  "retry_policy": "exponential"
}
  • Connect to MCP-compatible servers
  • Execute remote tool functions
  • Handle complex workflows
  • Cross-system integrations
  • Protocol-level communication
  • Enterprise system integration
  • Custom tool development
  • Workflow automation
  • Multi-service orchestration

Best Practices

1

Tool Design

Create tools with single, well-defined purposes rather than complex multi-function tools
2

Configuration

Use clear configuration schemas and provide sensible defaults
3

Error Handling

Implement robust error handling and provide meaningful error messages
4

Security

Store sensitive configuration (API keys, credentials) securely
5

Testing

Test tools thoroughly before assigning them to production agents

Tool Naming Convention

Good Names

  • “Web Search Tool”
  • “Customer Database Lookup”
  • “Email Sender”
  • “PDF Generator”

Avoid

  • “Tool1”
  • “My API Thing”
  • “Utility”
  • “Helper”

Configuration Management

Tool configurations should be environment-specific. Use different configurations for development, staging, and production environments.
Start with simple tool configurations and gradually add complexity as needed. Tools can be updated without recreating agent assignments.

Security Considerations

  • Never store plain-text credentials in tool configurations
  • Use environment variables or secure key management systems
  • Implement proper access controls and audit logging
  • Regularly rotate API keys and tokens