subagent_call
Call an external AI model for a subtask using OpenAI or Anthropic APIs with custom endpoint configuration; returns token usage statistics.
Instructions
Call an external AI model to handle a subtask.
Supports OpenAI and Anthropic APIs with custom endpoint configuration. Returns response with token usage statistics.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"provider": "<provider>",
"model": "<model>",
"messages": "<messages>"
},
"name": "subagent_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provider | Yes | AI provider - "openai" or "anthropic" | |
| model | Yes | Model name (e.g., "gpt-4", "claude-3-5-sonnet-20241022", or any custom model) | |
| messages | Yes | JSON string of message list [{"role": "user", "content": "..."}] | |
| max_tokens | No | Maximum tokens to generate (optional, max 32000) | |
| temperature | No | Temperature parameter 0.0-2.0 (default: 0.7) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |