Start a tool description recommendation
Start a recommendation to generate optimized tool descriptions for your agent. The service analyzes agent traces to identify tool selection confusion and produces sharpened descriptions that reduce ambiguity when the agent chooses between tools.
Note
Recommendations are generated by LLMs. Review and test before applying them.
Code samples
Example
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
|
|
String |
Yes |
A name for the recommendation. Maximum 48 characters. Pattern: |
|
|
String |
Yes |
Must be |
|
|
Object |
Yes |
Contains |
|
|
String |
No |
Optional description. Maximum 4096 characters. |
|
|
String |
No |
Idempotency token. If you retry a request with the same client token, the service returns the existing recommendation instead of creating a new one. |
toolDescriptionRecommendationConfig fields
| Field | Type | Required | Description |
|---|---|---|---|
|
|
Union |
Yes |
The current tool descriptions to optimize. Provide either |
|
|
Union |
Yes |
Trace source for analysis. See Trace sources for recommendations. |
Note
Tool description recommendations do not require an evaluationConfig. Unlike system prompt recommendations, which use an evaluator as the optimization signal, tool description recommendations analyze tool selection patterns directly from the agent traces to identify ambiguity between tools and generate sharpened descriptions.
Tool description input modes
| Mode | CLI flags | API field |
|---|---|---|
|
Inline text |
|
|
|
Configuration bundle |
|
|
When using a configuration bundle, the result includes a new bundle version with the optimized tool descriptions applied.
Response
| Field | Type | Description |
|---|---|---|
|
|
String |
Unique identifier for the recommendation. |
|
|
String |
ARN of the recommendation. |
|
|
String |
The name you specified. |
|
|
String |
|
|
|
String |
Initial status: |
|
|
Timestamp |
When the recommendation was created. |
|
|
Timestamp |
When the recommendation was last updated. |
Recommendation result
When the recommendation reaches COMPLETED status (retrieved via Get a recommendation), the result contains:
| Field | Type | Description |
|---|---|---|
|
|
List |
Per-tool results. Each entry contains |
|
|
Object |
Present when the input was a configuration bundle. Contains |
|
|
String |
Present if the recommendation failed. Error code describing the failure. |
|
|
String |
Present if the recommendation failed. Human-readable error description. |
Errors
| Error | HTTP status | Description |
|---|---|---|
|
|
400 |
Invalid request parameters. Check field constraints and required fields. |
|
|
403 |
Insufficient permissions. Verify IAM policies. |
|
|
409 |
A recommendation with the same client token already exists with different parameters. |
|
|
402 |
You have exceeded the maximum number of concurrent recommendations. |
|
|
429 |
Request rate exceeded. Retry with exponential backoff. |
|
|
500 |
Service-side error. Retry the request. |