Skip to main content
New protocol version released: This page may contain outdated information.
Transform your HAIP Server into a powerful extensible platform with dynamic tool registration. Add custom functionality, integrate external services, and build sophisticated AI applications with runtime tool management.

Dynamic Registration

Register tools at runtime without server restart

Built-in Tools

Echo, add, and weather tools included for testing

Schema Validation

JSON Schema validation for inputs and outputs

Progress Updates

Real-time progress updates during tool execution

Built-in Tools

The server includes several built-in tools for testing and development:

Echo Tool

Echoes back the input message.
Usage:
Response:

Add Tool

Adds two numbers together.
Usage:
Response:

Weather Tool

Returns mock weather information.
Usage:
Response:

Custom Tool Development

Tool Definition

Tools are defined using a standard interface:

Simple Tool Example

Async Tool Example

Tool with Progress Updates

Tool Registration

Runtime Registration

Tools can be registered at runtime:

Tool Discovery

Clients can discover available tools:
Response:

Tool Schema Request

Get detailed schema for a specific tool:
Response:

Tool Execution Flow

1. Tool Call

Client sends a tool call:

2. Tool Update (Optional)

Server sends progress updates:

3. Tool Done

Server sends completion:

4. Tool Cancel (Optional)

Client can cancel a running tool:

Advanced Tool Features

Tool with Side Effects

Tool with Validation

Tool with Error Handling

Tool Management

List All Tools

Check Tool Existence

Tool Statistics

Best Practices

1. Use Descriptive Names

2. Provide Clear Descriptions

3. Validate Inputs

4. Handle Errors Gracefully

5. Use Progress Updates for Long Operations

Next Steps